mirror of https://github.com/axmolengine/axmol.git
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into feature/configuration_VAO_runtime
Conflicts: cocos2dx/CCConfiguration.cpp cocos2dx/draw_nodes/CCDrawNode.cpp cocos2dx/particle_nodes/CCParticleSystemQuad.cpp cocos2dx/platform/android/CCEGLView.cpp cocos2dx/platform/ios/EAGLView.mm cocos2dx/textures/CCTextureAtlas.cpp cocos2dx/textures/CCTextureAtlas.h
This commit is contained in:
commit
683ce1692d
|
@ -21,11 +21,13 @@ Thumbs.db
|
|||
*.ilk
|
||||
*.log
|
||||
[Bb]in
|
||||
[Dd]ebug*/
|
||||
[Dd]ebug/
|
||||
[Dd]ebug.win32/
|
||||
*.sbr
|
||||
*.sdf
|
||||
obj/
|
||||
[Rr]elease*/
|
||||
[Rr]elease/
|
||||
[Rr]elease.win32/
|
||||
_ReSharper*/
|
||||
[Tt]est[Rr]esult*
|
||||
ipch/
|
||||
|
@ -63,12 +65,14 @@ build_*_vc10/
|
|||
*.xcuserstate
|
||||
*.xccheckout
|
||||
xcschememanagement.plist
|
||||
build/
|
||||
.DS_Store
|
||||
._.*
|
||||
xcuserdata/
|
||||
DerivedData/
|
||||
|
||||
# Ignore files built by AppCode
|
||||
.idea/
|
||||
|
||||
# Ignore files built by bada
|
||||
.Simulator-Debug/
|
||||
.Target-Debug/
|
||||
|
@ -96,3 +100,8 @@ tools/jenkins_scripts/mac/android/userconf.ini
|
|||
|
||||
# CTags
|
||||
tags
|
||||
|
||||
# ignore files, created with make-all-linux-project script
|
||||
/lib
|
||||
/build/linux-build
|
||||
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
[submodule "tools/bindings-generator"]
|
||||
path = tools/bindings-generator
|
||||
url = git://github.com/cocos2d/bindings-generator.git
|
||||
[submodule "scripting/javascript/bindings/generated"]
|
||||
path = scripting/auto-generated
|
||||
url = git://github.com/folecr/cocos2dx-autogen-bindings.git
|
||||
[submodule "cocos/scripting/auto-generated"]
|
||||
path = cocos/scripting/auto-generated
|
||||
url = git://github.com/cocos2d-x/bindings-auto-generated.git
|
||||
[submodule "samples/Javascript/Shared"]
|
||||
path = samples/Javascript/Shared
|
||||
url = git://github.com/cocos2d/cocos2d-js-tests.git
|
||||
[submodule "external/emscripten"]
|
||||
path = external/emscripten
|
||||
url = git://github.com/kripken/emscripten.git
|
||||
[submodule "tools/cocos2d-console"]
|
||||
path = tools/cocos2d-console
|
||||
url = git://github.com/cocos2d/cocos2d-console.git
|
||||
|
|
|
@ -26,3 +26,9 @@ script:
|
|||
- tools/travis-scripts/run-script.sh
|
||||
before_install:
|
||||
- tools/travis-scripts/before-install.sh
|
||||
|
||||
# whitelist
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
|
|
82
AUTHORS
82
AUTHORS
|
@ -587,6 +587,72 @@ Developers:
|
|||
signmotion (Andrey Syrokomsky)
|
||||
Fixed some compiling-warnings (MSVC2012).
|
||||
|
||||
michaelcontento
|
||||
[Android] use onWindowFocusChanged(bool) instead of onResume()/onPause()
|
||||
Prevent nullptr access in AssetsManager
|
||||
[Android] re-introduce Cocos2dxHelper.runOnGLThread(Runnable)
|
||||
[Android] added EGL_RENDERABLE_TYPE to OpenGL attributes
|
||||
Android: add xlargeScreens="true" to supports-screens
|
||||
Trigger onKeyReleased only after the key has been released.
|
||||
|
||||
bmanGH
|
||||
Use gl caching functions in TexturePVR::createGLTexture()
|
||||
|
||||
metadao
|
||||
make create_project.py more pythonic and fix some typoes
|
||||
|
||||
timothyqiu
|
||||
Project creator: use absolute path for json config files
|
||||
Documentation fixes
|
||||
A better way to locate project creator
|
||||
|
||||
rablwupei
|
||||
Fixed a memory leak in ScriptingCore::runScript()
|
||||
Fixed a memory leak in Spine.
|
||||
Added support of passing array to cc.Sequence.create and cc.Spawn.create.
|
||||
Fixed a bug that sys.localStorage.getItem() does not support non-ascii string.
|
||||
Fixed a memory leak in XMLHttpRequest.
|
||||
|
||||
Keita Obo (ktaobo)
|
||||
Avoid unnecessary object duplication for Scale9Sprite.
|
||||
|
||||
jimmystar
|
||||
Fixed a bug that cc.Scheduler.schedule(target, func) without repeat argument couldn't repeat schedule forever on device.
|
||||
|
||||
XiaoLongHan (kpkhxlgy0)
|
||||
Fixed a bug that outside of keyboard can't be responded to close keyboard when using EditBox.
|
||||
|
||||
lettas
|
||||
A fix for multi-platform template.
|
||||
|
||||
HoGarfield (garfield_ho)
|
||||
Fixed a bug that CCBReader can't play sequence automatically in JSB.
|
||||
Could not set next animation in CCBAnimationCompleted callback.
|
||||
Fixed missing to add JSAutoCompartment when invoking JS functions from C++.
|
||||
|
||||
lite3
|
||||
Fixed a bug that Node's anchor point was changed after being added to ScrollView.
|
||||
|
||||
superrad
|
||||
Clear NoSuchMethodError Exception when JniHelper fails to find methodID
|
||||
|
||||
Nite Luo (darkdukey)
|
||||
Added Mouse Support For Desktop Platforms.
|
||||
|
||||
ledyba
|
||||
Fixed a bug that EventListeners can't be removed sometimes.
|
||||
Fixed a bug that the data size has to be specified when parsing XML using TinyXML.
|
||||
Closed X display after getting DPI on Linux.
|
||||
|
||||
Luis Parravicini (luisparravicini)
|
||||
Fixed typos in create_project.py.
|
||||
|
||||
xhcnb
|
||||
Device::setAccelerometerEnabled needs to be invoked before adding ACC listener.
|
||||
|
||||
bopohaa
|
||||
Fixed a bug that Webp test crashes.
|
||||
|
||||
Retired Core Developers:
|
||||
WenSheng Yang
|
||||
Author of windows port, CCTextField,
|
||||
|
@ -599,22 +665,6 @@ Retired Core Developers:
|
|||
RongHong Huang (flyingpaper)
|
||||
Author of cocos2d-xna and spent all his time on wp7.
|
||||
|
||||
michaelcontento
|
||||
[Android] use onWindowFocusChanged(bool) instead of onResume()/onPause()
|
||||
Prevent nullptr access in AssetsManager
|
||||
[Android] re-introduce Cocos2dxHelper.runOnGLThread(Runnable)
|
||||
[Android] added EGL_RENDERABLE_TYPE to OpenGL attributes
|
||||
|
||||
bmanGH
|
||||
Use gl caching functions in TexturePVR::createGLTexture()
|
||||
|
||||
metadao
|
||||
make create_project.py more pythonic and fix some typoes
|
||||
|
||||
timothyqiu
|
||||
Project creator: use absolute path for json config files
|
||||
Documentation fixes
|
||||
A better way to locate project creator
|
||||
|
||||
|
||||
Cocos2d-x can not grow so fast without the active community.
|
||||
|
|
39
CHANGELOG
39
CHANGELOG
|
@ -2,11 +2,50 @@ cocos2d-x-3.0alpha1 @??? 2013
|
|||
[all platforms]
|
||||
[DOC] Added RELEASE_NOTES and CODING_STYLE.md files
|
||||
[FIX] Texture: use CCLOG to log when a texture is being decoded in software
|
||||
[FIX] Spine: fix memory leaks
|
||||
[FIX] fixed a memory leak in XMLHTTPRequest.cpp
|
||||
[FIX] removeSpriteFramesFromFile() crashes if file doesn't exist.
|
||||
[FIX] Avoid unnecessary object duplication for Scale9Sprite.
|
||||
[FIX] create_project.py does not rename/replace template projects completely.
|
||||
[FIX] Could not set next animation in CCBAnimationCompleted callback.
|
||||
[FIX] The Node's anchor point was changed after being added to ScrollView.
|
||||
[FIX] Refactored and improved EventDispatcher.
|
||||
[FIX] EventListeners can't be removed sometimes.
|
||||
[FIX] When parsing XML using TinyXML, the data size has to be specified.
|
||||
[FIX] Parameter type: const char* -> const string&
|
||||
[FIX] Armature: many bug fixed, add more samples, add function to skip some frames when playing animation
|
||||
[NEW] Arm64 support.
|
||||
[NEW] Added Mouse Support For Desktop Platforms.
|
||||
[NEW] Point: Adds ANCHOR_XXX constants like ANCHOR_MIDDLE, ANCHOR_TOP_RIGHT, etc.
|
||||
[NEW] Sprite: Override setScale(float scaleX, float scaleY)
|
||||
[NEW] External: added | operator for Control::EventType
|
||||
[NEW] Android & iOS screen size change support
|
||||
[FIX] Webp Test Crashes.
|
||||
[Android]
|
||||
[FIX] Added EGL_RENDERABLE_TYPE to OpenGL attributes
|
||||
[FIX] Fixed application will crash when pause and resume.
|
||||
[FIX] Clear NoSuchMethodError Exception when JniHelper fails to find method id
|
||||
[NEW] Added xlargeScreens="true" to supports-screens
|
||||
[NEW] Added build/android-build.py to build all Android samples, and remove all build_native.sh/cmd
|
||||
[NEW] Added build_native.py to build template projects, and remove build_native.sh/cmd
|
||||
[NEW] Added Cocos2dxHelper.runOnGLThread(Runnable) again
|
||||
[Mac]
|
||||
[FIX] Removed unused CCLOG() from GL initialization
|
||||
[iOS]
|
||||
[FIX] Can't click the area that outside of keyboard to close keyboard when using EditBox.
|
||||
[Linux]
|
||||
[NEW] Used CMake to build linux projects.
|
||||
[FIX] Closed X display after getting DPI on Linux.
|
||||
[Desktop]
|
||||
[FIX] Trigger onKeyReleased only after the key has been released.
|
||||
[Javascript binding]
|
||||
[FIX] Fixed a memory leak in ScriptingCore::runScript()
|
||||
[FIX] sys.localStorage.getItem() does not support non-ascii string.
|
||||
[FIX] cc.Scheduler.schedule(target, func) without repeat argument couldn't repeat schedule forever on device.
|
||||
[FIX] CCBReader can't play sequence automatically in JSB.
|
||||
[NEW] main.js -> cocos2d-jsb.js
|
||||
[Lua Binding]
|
||||
[NEW] Added Armature lua binding and added test samples.
|
||||
|
||||
cocos2d-x-3.0alpha0 @Sep.19 2013
|
||||
[all platforms]
|
||||
|
|
|
@ -0,0 +1,164 @@
|
|||
cmake_minimum_required(VERSION 2.6)
|
||||
project (Cocos2dx)
|
||||
|
||||
# The version number
|
||||
set(Cocos2dxSamples_VERSION_MAJOR 3)
|
||||
set(Cocos2dxSamples_VERSION_MINOR 0)
|
||||
|
||||
include(build/BuildHelpers.CMakeLists.txt)
|
||||
|
||||
option(USE_CHIPMUNK "Use chipmunk for physics library" ON)
|
||||
option(USE_BOX2D "Use box2d for physics library" OFF)
|
||||
option(DEBUG_MODE "Debug or release?" ON)
|
||||
option(BUILD_LIBS_LUA "Build lua libraries" ON)
|
||||
option(BUILD_GUI "Build GUI library" ON)
|
||||
option(BUILD_NETWORK "Build network library" ON)
|
||||
option(BUILD_EXTENSIONS "Build extension library" ON)
|
||||
option(BUILD_EDITOR_SPINE "Build editor support for spine" ON)
|
||||
option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON)
|
||||
option(BUILD_EDITOR_COCOSBUILDER "Build editor support for cocosbuilder" ON)
|
||||
|
||||
|
||||
option(BUILD_HelloCpp "Only build HelloCpp sample" ON)
|
||||
option(BUILD_TestCpp "Only build TestCpp sample" ON)
|
||||
option(BUILD_HelloLua "Only build HelloLua sample" ON)
|
||||
option(BUILD_TestLua "Only build TestLua sample" ON)
|
||||
|
||||
|
||||
if(DEBUG_MODE)
|
||||
set(CMAKE_BUILD_TYPE DEBUG)
|
||||
else(DEBUG_MODE)
|
||||
set(CMAKE_BUILD_TYPE RELEASE)
|
||||
endif(DEBUG_MODE)
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "-g -Wall -DCOCOS2D_DEBUG=1")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
|
||||
|
||||
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-std=c99")
|
||||
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11")
|
||||
|
||||
if(USE_CHIPMUNK)
|
||||
message("Using chipmunk ...")
|
||||
add_definitions(-DLINUX -DCC_ENABLE_CHIPMUNK_INTEGRATION=1)
|
||||
elseif(USE_BOX2D)
|
||||
message("Using box2d ...")
|
||||
add_definitions(-DLINUX -DCC_ENABLE_BOX2D_INTEGRATION=1)
|
||||
else(USE_CHIPMUNK)
|
||||
message(FATAL_ERROR "Must choose a physics library.")
|
||||
endif(USE_CHIPMUNK)
|
||||
|
||||
# architecture
|
||||
if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||
set(ARCH_DIR "64-bit")
|
||||
else()
|
||||
set(ARCH_DIR "32-bit")
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
.
|
||||
cocos
|
||||
cocos/audio/include
|
||||
cocos/2d
|
||||
cocos/2d/platform
|
||||
cocos/2d/platform/linux
|
||||
cocos/base
|
||||
cocos/physics
|
||||
cocos/editor-support
|
||||
cocos/math/kazmath/include
|
||||
extensions
|
||||
external
|
||||
external/jpeg/include/linux
|
||||
external/tiff/include/linux
|
||||
external/webp/include/linux
|
||||
external/glfw3/include/linux
|
||||
external/curl/include/linux/${ARCH_DIR}
|
||||
external/tinyxml2
|
||||
external/unzip
|
||||
external/chipmunk/include/chipmunk
|
||||
external/freetype2/include/linux
|
||||
external/linux-specific/fmod/include/${ARCH_DIR}
|
||||
)
|
||||
|
||||
link_directories(
|
||||
/usr/local/lib
|
||||
${CMAKE_SOURCE_DIR}/external/jpeg/prebuilt/linux/${ARCH_DIR}
|
||||
${CMAKE_SOURCE_DIR}/external/tiff/prebuilt/linux/${ARCH_DIR}
|
||||
${CMAKE_SOURCE_DIR}/external/webp/prebuilt/linux/${ARCH_DIR}
|
||||
${CMAKE_SOURCE_DIR}/external/freetype2/prebuilt/linux/${ARCH_DIR}
|
||||
${CMAKE_SOURCE_DIR}/external/curl/prebuilt/linux/${ARCH_DIR}
|
||||
${CMAKE_SOURCE_DIR}/external/linux-specific/fmod/prebuilt/${ARCH_DIR}
|
||||
)
|
||||
|
||||
|
||||
# kazmath
|
||||
add_subdirectory(cocos/math/kazmath)
|
||||
|
||||
# chipmunk library
|
||||
add_subdirectory(external/chipmunk/src)
|
||||
|
||||
# box2d library
|
||||
add_subdirectory(external/Box2D)
|
||||
|
||||
# unzip library
|
||||
add_subdirectory(external/unzip)
|
||||
|
||||
# tinyxml2 library
|
||||
add_subdirectory(external/tinyxml2)
|
||||
|
||||
# audio
|
||||
add_subdirectory(cocos/audio)
|
||||
|
||||
# cocos base library
|
||||
add_subdirectory(cocos/base)
|
||||
|
||||
# cocos 2d library
|
||||
add_subdirectory(cocos/2d)
|
||||
|
||||
if(BUILD_GUI)
|
||||
# gui
|
||||
add_subdirectory(cocos/gui)
|
||||
endif(BUILD_GUI)
|
||||
|
||||
if(BUILD_NETWORK)
|
||||
# network
|
||||
add_subdirectory(cocos/network)
|
||||
endif(BUILD_NETWORK)
|
||||
|
||||
if(BUILD_EXTENSIONS)
|
||||
# extensions
|
||||
add_subdirectory(extensions)
|
||||
endif(BUILD_EXTENSIONS)
|
||||
|
||||
## Editor Support
|
||||
|
||||
if(BUILD_EDITOR_SPINE)
|
||||
# spine
|
||||
add_subdirectory(cocos/editor-support/spine)
|
||||
endif(BUILD_EDITOR_SPINE)
|
||||
|
||||
if(BUILD_EDITOR_COCOSBUILDER)
|
||||
# cocosbuilder
|
||||
add_subdirectory(cocos/editor-support/cocosbuilder)
|
||||
endif(BUILD_EDITOR_COCOSBUILDER)
|
||||
|
||||
if(BUILD_EDITOR_COCOSTUDIO)
|
||||
# cocostudio
|
||||
add_subdirectory(cocos/editor-support/cocostudio)
|
||||
# jsoncpp library, cocostuido depends on jsoncpp
|
||||
add_subdirectory(external/json)
|
||||
endif(BUILD_EDITOR_COCOSTUDIO)
|
||||
|
||||
if(BUILD_LIBS_LUA)
|
||||
## Scripting
|
||||
# lua
|
||||
add_subdirectory(external/lua/lua)
|
||||
|
||||
# tolua
|
||||
add_subdirectory(external/lua/tolua)
|
||||
|
||||
# luabinding
|
||||
add_subdirectory(cocos/scripting)
|
||||
endif(BUILD_LIBS_LUA)
|
||||
|
||||
# build samples
|
||||
add_subdirectory(samples)
|
131
CODING_STYLE.md
131
CODING_STYLE.md
|
@ -1,131 +0,0 @@
|
|||
# cocos2d-x C++ coding sytle
|
||||
|
||||
|
||||
## Detailed information
|
||||
|
||||
Please, refer to this document for a detailed version of the cocos2d-x C++ coding sytle:
|
||||
|
||||
* [cocos2d-x c++ coding style](http://www.cocos2d-x.org/wiki/Cocos2d_c++_coding_style)
|
||||
|
||||
|
||||
## Quick Sample
|
||||
|
||||
Use this sample as a quick reference. But DO READ the detailed doc for more info.
|
||||
|
||||
Header file:
|
||||
|
||||
```c++
|
||||
/**
|
||||
* We use Doxygen strings for documentation.
|
||||
* All public classes, methods, structs should be documented using Doxygen Strings
|
||||
*/
|
||||
class CC_DLL Sprite : public NodeRGBA, public TextureProtocol
|
||||
{ /* class braces start in a new line */
|
||||
|
||||
/* no indentation here for public, protected or private */
|
||||
/* First add all the "public" stuff, then all the "protected" stuff, and finally all the "private" stuff
|
||||
public:
|
||||
|
||||
/* we don't use tabs, we use spaces, and we use a 4 space identation */
|
||||
/* 1st add all static const */
|
||||
static const int INDEX_NOT_INITIALIZED = -1;
|
||||
|
||||
/* then add all the creators and other relevant static methods */
|
||||
static Sprite* create();
|
||||
static Sprite* create(const char *filename);
|
||||
static Sprite* create(const char *filename, const Rect& rect);
|
||||
|
||||
/* if applicable, then add the consturctors / destructors */
|
||||
Sprite();
|
||||
virtual ~Sprite(void);
|
||||
|
||||
/* then add all the initialization methods */
|
||||
/* notice that they are in the same order as the creators */
|
||||
virtual bool init(void);
|
||||
virtual bool initWithTexture(Texture2D *texture);
|
||||
virtual bool initWithTexture(Texture2D *texture, const Rect& rect);
|
||||
|
||||
|
||||
|
||||
/* then add the regular instace methods */
|
||||
virtual void updateTransform(void);
|
||||
virtual SpriteBatchNode* getBatchNode(void);
|
||||
virtual void setBatchNode(SpriteBatchNode *spriteBatchNode);
|
||||
|
||||
|
||||
/* then add all the overriden methods */
|
||||
/* notice that all overriden methods must use the 'override' keyword */
|
||||
/* overriden methods are not forced to have doxygen strings UNLESS they change the behavior in a non obvios way */
|
||||
virtual void setPosition(const Point& pos) override;
|
||||
virtual void setRotation(float rotation) override;
|
||||
virtual void setRotationX(float rotationX) override;
|
||||
|
||||
|
||||
/* once you finish with the 'public' methods, start with the 'protected' ones */
|
||||
protected:
|
||||
|
||||
/* protected methods are not forced to have Doxygen strings, but if they have it, better */
|
||||
void updateColor(void);
|
||||
virtual void setTextureCoords(Rect rect);
|
||||
|
||||
/* After adding all the methods, add the ivars */
|
||||
/* all ivars must start with _ */
|
||||
/* Do not use Hungarian notation */
|
||||
TextureAtlas* _textureAtlas;
|
||||
int _atlasIndex;
|
||||
SpriteBatchNode* _batchNode;
|
||||
};
|
||||
|
||||
```
|
||||
|
||||
Implementation file:
|
||||
|
||||
```c++
|
||||
/* Do not use doxygen comments on the implementation file */
|
||||
|
||||
/* The methos MUST be in the same order as where declared in the header file */
|
||||
|
||||
Sprite* Sprite::create(const char *filename)
|
||||
{
|
||||
/* Don't use tabs. Use spaces. Use 4-space indentation */
|
||||
Sprite *sprite = new Sprite();
|
||||
|
||||
/* put curly braces in the same line as in the 'if'*/
|
||||
/* leave a space between the 'if' and the '(' */
|
||||
/* don't leave spaces between '()' */
|
||||
if (sprite && sprite->initWithFile(filename)) {
|
||||
sprite->autorelease();
|
||||
return sprite;
|
||||
}
|
||||
CC_SAFE_DELETE(sprite);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Initialization list can be indented to 0 spaces, or to 4 spaces. If in doubt, be consistent with the indentation already used in the file */
|
||||
/* Only use the Initialization lists for types that can't fail when initialized */
|
||||
Sprite::Sprite()
|
||||
: _shouldBeHidden(false)
|
||||
, _texture(nullptr)
|
||||
, _physicsBody(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
/* use the 'initXXX' methods to initialize types that might fail */
|
||||
bool Sprite::initWithTexture(Texture2D *texture, const Rect& rect, bool rotated)
|
||||
{
|
||||
/* it ok not use use curly braces */
|
||||
if (something)
|
||||
do_something();
|
||||
else
|
||||
something_else();
|
||||
|
||||
/* but if you use curly branches in one branch, all the branches should use curly branches */
|
||||
if (something) {
|
||||
do_something1();
|
||||
do_something2();
|
||||
} else {
|
||||
so_something_else();
|
||||
}
|
||||
}
|
||||
|
||||
```
|
|
@ -1,304 +0,0 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013 Zynga Inc.
|
||||
Copyright (c) 2010 cocos2d-x.org
|
||||
|
||||
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.
|
||||
****************************************************************************/
|
||||
|
||||
// XXX: This is all just a bit of a hack. SDL uses channels as its underlying
|
||||
// abstraction, whilst CocosDenshion deals in individual effects. Consequently
|
||||
// we can't set start/stop, because to SDL, effects (chunks) are just opaque
|
||||
// blocks of data that get scheduled on channels. To workaround this, we assign
|
||||
// each sound to a channel, but since there are only 32 channels, we use the
|
||||
// modulus of the sound's address (which on Emscripten is just an incrementing
|
||||
// integer) to decide which channel.
|
||||
//
|
||||
// A more rigorous implementation would have logic to store the state of
|
||||
// channels and restore it as necessary. This should probably just be
|
||||
// considered a toy for now, but it will probably prove sufficient for many
|
||||
// use-cases. Recall also that Emscripten undoes this abstraction on the other
|
||||
// side because it is using HTML5 audio objects as its underlying primitive!
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "SimpleAudioEngine.h"
|
||||
#include "cocos2d.h"
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL/SDL_mixer.h>
|
||||
|
||||
USING_NS_CC;
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace CocosDenshion
|
||||
{
|
||||
struct soundData {
|
||||
Mix_Chunk *chunk;
|
||||
bool isLooped;
|
||||
};
|
||||
|
||||
typedef map<string, soundData *> EffectsMap;
|
||||
EffectsMap s_effects;
|
||||
float s_effectsVolume = 1.0;
|
||||
|
||||
typedef enum {
|
||||
PLAYING,
|
||||
STOPPED,
|
||||
PAUSED,
|
||||
} playStatus;
|
||||
|
||||
struct backgroundMusicData {
|
||||
Mix_Music *music;
|
||||
};
|
||||
typedef map<string, backgroundMusicData *> BackgroundMusicsMap;
|
||||
BackgroundMusicsMap s_backgroundMusics;
|
||||
float s_backgroundVolume = 1.0;
|
||||
|
||||
static SimpleAudioEngine *s_engine = 0;
|
||||
|
||||
// Unfortunately this is just hard-coded in Emscripten's SDL
|
||||
// implementation.
|
||||
static const int NR_CHANNELS = 32;
|
||||
static void stopBackground(bool bReleaseData)
|
||||
{
|
||||
SimpleAudioEngine *engine = SimpleAudioEngine::getInstance();
|
||||
engine->stopBackgroundMusic();
|
||||
}
|
||||
|
||||
SimpleAudioEngine::SimpleAudioEngine()
|
||||
{
|
||||
}
|
||||
|
||||
SimpleAudioEngine::~SimpleAudioEngine()
|
||||
{
|
||||
}
|
||||
|
||||
SimpleAudioEngine* SimpleAudioEngine::getInstance()
|
||||
{
|
||||
if (!s_engine)
|
||||
s_engine = new SimpleAudioEngine();
|
||||
|
||||
return s_engine;
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::end()
|
||||
{
|
||||
// clear all the sounds
|
||||
EffectsMap::const_iterator end = s_effects.end();
|
||||
for (EffectsMap::iterator it = s_effects.begin(); it != end; it++)
|
||||
{
|
||||
Mix_FreeChunk(it->second->chunk);
|
||||
delete it->second;
|
||||
}
|
||||
s_effects.clear();
|
||||
|
||||
// and the background too
|
||||
stopBackground(true);
|
||||
|
||||
for (BackgroundMusicsMap::iterator it = s_backgroundMusics.begin(); it != s_backgroundMusics.end(); ++it)
|
||||
{
|
||||
Mix_FreeMusic(it->second->music);
|
||||
delete it->second;
|
||||
}
|
||||
s_backgroundMusics.clear();
|
||||
}
|
||||
|
||||
//
|
||||
// background audio
|
||||
//
|
||||
void SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath)
|
||||
{
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop)
|
||||
{
|
||||
std::string key = std::string(pszFilePath);
|
||||
struct backgroundMusicData *musicData;
|
||||
if(!s_backgroundMusics.count(key))
|
||||
{
|
||||
musicData = new struct backgroundMusicData();
|
||||
musicData->music = Mix_LoadMUS(pszFilePath);
|
||||
s_backgroundMusics[key] = musicData;
|
||||
}
|
||||
else
|
||||
{
|
||||
musicData = s_backgroundMusics[key];
|
||||
}
|
||||
|
||||
Mix_PlayMusic(musicData->music, bLoop ? -1 : 0);
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::stopBackgroundMusic(bool bReleaseData)
|
||||
{
|
||||
Mix_HaltMusic();
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::pauseBackgroundMusic()
|
||||
{
|
||||
Mix_PauseMusic();
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::resumeBackgroundMusic()
|
||||
{
|
||||
Mix_ResumeMusic();
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::rewindBackgroundMusic()
|
||||
{
|
||||
CCLOGWARN("Cannot rewind background in Emscripten");
|
||||
}
|
||||
|
||||
bool SimpleAudioEngine::willPlayBackgroundMusic()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SimpleAudioEngine::isBackgroundMusicPlaying()
|
||||
{
|
||||
return Mix_PlayingMusic();
|
||||
}
|
||||
|
||||
float SimpleAudioEngine::getBackgroundMusicVolume()
|
||||
{
|
||||
return s_backgroundVolume;
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::setBackgroundMusicVolume(float volume)
|
||||
{
|
||||
// Ensure volume is between 0.0 and 1.0.
|
||||
volume = volume > 1.0 ? 1.0 : volume;
|
||||
volume = volume < 0.0 ? 0.0 : volume;
|
||||
|
||||
Mix_VolumeMusic(volume * MIX_MAX_VOLUME);
|
||||
s_backgroundVolume = volume;
|
||||
}
|
||||
|
||||
float SimpleAudioEngine::getEffectsVolume()
|
||||
{
|
||||
return s_effectsVolume;
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::setEffectsVolume(float volume)
|
||||
{
|
||||
volume = volume > 1.0 ? 1.0 : volume;
|
||||
volume = volume < 0.0 ? 0.0 : volume;
|
||||
|
||||
// Need to set volume on every channel. SDL will then read this volume
|
||||
// level and apply it back to the individual sample.
|
||||
for(int i = 0; i < NR_CHANNELS; i++)
|
||||
{
|
||||
Mix_Volume(i, volume * MIX_MAX_VOLUME);
|
||||
}
|
||||
|
||||
s_effectsVolume = volume;
|
||||
}
|
||||
|
||||
unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop,
|
||||
float pitch, float pan, float gain)
|
||||
{
|
||||
std::string key = std::string(pszFilePath);
|
||||
struct soundData *sound;
|
||||
if(!s_effects.count(key))
|
||||
{
|
||||
sound = new struct soundData();
|
||||
sound->chunk = Mix_LoadWAV(pszFilePath);
|
||||
sound->isLooped = bLoop;
|
||||
s_effects[key] = sound;
|
||||
}
|
||||
else
|
||||
{
|
||||
sound = s_effects[key];
|
||||
}
|
||||
// This is safe here since Emscripten is just passing back an
|
||||
// incrementing integer each time you use the Mix_LoadWAV method.
|
||||
unsigned int result = (unsigned int) sound->chunk;
|
||||
|
||||
// XXX: This is a bit of a hack, but... Choose a channel based on the
|
||||
// modulo of the # of channels. This allows us to set the volume
|
||||
// without passing around both chunk address and channel.
|
||||
Mix_PlayChannel(result % NR_CHANNELS, sound->chunk, bLoop ? -1 : 0);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::stopEffect(unsigned int nSoundId)
|
||||
{
|
||||
Mix_HaltChannel(nSoundId % NR_CHANNELS);
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::preloadEffect(const char* pszFilePath)
|
||||
{
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::unloadEffect(const char* pszFilePath)
|
||||
{
|
||||
std::string key = std::string(pszFilePath);
|
||||
if(!s_effects.count(key))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
struct soundData *sound = s_effects[key];
|
||||
|
||||
Mix_FreeChunk(sound->chunk);
|
||||
delete sound;
|
||||
s_effects.erase(key);
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::pauseEffect(unsigned int nSoundId)
|
||||
{
|
||||
Mix_Pause(nSoundId % NR_CHANNELS);
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::pauseAllEffects()
|
||||
{
|
||||
for(int i = 0; i < NR_CHANNELS; i++)
|
||||
{
|
||||
Mix_Pause(i);
|
||||
}
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::resumeEffect(unsigned int nSoundId)
|
||||
{
|
||||
Mix_Resume(nSoundId % NR_CHANNELS);
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::resumeAllEffects()
|
||||
{
|
||||
for(int i = 0; i < NR_CHANNELS; i++)
|
||||
{
|
||||
Mix_Resume(i);
|
||||
}
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::stopAllEffects()
|
||||
{
|
||||
for(int i = 0; i < NR_CHANNELS; i++)
|
||||
{
|
||||
Mix_HaltChannel(i);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
TARGET = libcocosdenshion.so
|
||||
|
||||
INCLUDES += -I.. -I../include
|
||||
|
||||
SOURCES = ../emscripten/SimpleAudioEngine.cpp
|
||||
|
||||
COCOS_ROOT = ../..
|
||||
include $(COCOS_ROOT)/cocos2dx/proj.emscripten/cocos2dx.mk
|
||||
|
||||
TARGET := $(LIB_DIR)/$(TARGET)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST)
|
||||
@mkdir -p $(@D)
|
||||
$(CXX) $(CXXFLAGS) $(OBJECTS) -shared -o $(TARGET) $(SHAREDLIBS) $(STATICLIBS)
|
||||
|
||||
$(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST)
|
||||
@mkdir -p $(@D)
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
|
|
@ -1,348 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
41E01E4E16D5D5E600ED686C /* Export.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E01E4116D5D5E600ED686C /* Export.h */; };
|
||||
41E01E4F16D5D5E600ED686C /* SimpleAudioEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E01E4216D5D5E600ED686C /* SimpleAudioEngine.h */; };
|
||||
41E01E5016D5D5E600ED686C /* CDAudioManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E01E4416D5D5E600ED686C /* CDAudioManager.h */; };
|
||||
41E01E5116D5D5E600ED686C /* CDAudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 41E01E4516D5D5E600ED686C /* CDAudioManager.m */; };
|
||||
41E01E5216D5D5E600ED686C /* CDConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E01E4616D5D5E600ED686C /* CDConfig.h */; };
|
||||
41E01E5316D5D5E600ED686C /* CDOpenALSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E01E4716D5D5E600ED686C /* CDOpenALSupport.h */; };
|
||||
41E01E5416D5D5E600ED686C /* CDOpenALSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 41E01E4816D5D5E600ED686C /* CDOpenALSupport.m */; };
|
||||
41E01E5516D5D5E600ED686C /* CocosDenshion.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E01E4916D5D5E600ED686C /* CocosDenshion.h */; };
|
||||
41E01E5616D5D5E600ED686C /* CocosDenshion.m in Sources */ = {isa = PBXBuildFile; fileRef = 41E01E4A16D5D5E600ED686C /* CocosDenshion.m */; };
|
||||
41E01E5716D5D5E600ED686C /* SimpleAudioEngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41E01E4B16D5D5E600ED686C /* SimpleAudioEngine.mm */; };
|
||||
41E01E5816D5D5E600ED686C /* SimpleAudioEngine_objc.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E01E4C16D5D5E600ED686C /* SimpleAudioEngine_objc.h */; };
|
||||
41E01E5916D5D5E600ED686C /* SimpleAudioEngine_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 41E01E4D16D5D5E600ED686C /* SimpleAudioEngine_objc.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
41E01E4116D5D5E600ED686C /* Export.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = "<group>"; };
|
||||
41E01E4216D5D5E600ED686C /* SimpleAudioEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine.h; sourceTree = "<group>"; };
|
||||
41E01E4416D5D5E600ED686C /* CDAudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDAudioManager.h; sourceTree = "<group>"; };
|
||||
41E01E4516D5D5E600ED686C /* CDAudioManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDAudioManager.m; sourceTree = "<group>"; };
|
||||
41E01E4616D5D5E600ED686C /* CDConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDConfig.h; sourceTree = "<group>"; };
|
||||
41E01E4716D5D5E600ED686C /* CDOpenALSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDOpenALSupport.h; sourceTree = "<group>"; };
|
||||
41E01E4816D5D5E600ED686C /* CDOpenALSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDOpenALSupport.m; sourceTree = "<group>"; };
|
||||
41E01E4916D5D5E600ED686C /* CocosDenshion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosDenshion.h; sourceTree = "<group>"; };
|
||||
41E01E4A16D5D5E600ED686C /* CocosDenshion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CocosDenshion.m; sourceTree = "<group>"; };
|
||||
41E01E4B16D5D5E600ED686C /* SimpleAudioEngine.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleAudioEngine.mm; sourceTree = "<group>"; };
|
||||
41E01E4C16D5D5E600ED686C /* SimpleAudioEngine_objc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine_objc.h; sourceTree = "<group>"; };
|
||||
41E01E4D16D5D5E600ED686C /* SimpleAudioEngine_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleAudioEngine_objc.m; sourceTree = "<group>"; };
|
||||
D87CC2E5154FC6C500AAFE11 /* libCocosDenshion.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCocosDenshion.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D87CC2E2154FC6C500AAFE11 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
4193AF8416C39EB1007E21D7 /* CocosDenshion */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
41E01E4016D5D5E600ED686C /* include */,
|
||||
41E01E4316D5D5E600ED686C /* ios */,
|
||||
);
|
||||
name = CocosDenshion;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
41E01E4016D5D5E600ED686C /* include */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
41E01E4116D5D5E600ED686C /* Export.h */,
|
||||
41E01E4216D5D5E600ED686C /* SimpleAudioEngine.h */,
|
||||
);
|
||||
name = include;
|
||||
path = ../include;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
41E01E4316D5D5E600ED686C /* ios */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
41E01E4416D5D5E600ED686C /* CDAudioManager.h */,
|
||||
41E01E4516D5D5E600ED686C /* CDAudioManager.m */,
|
||||
41E01E4616D5D5E600ED686C /* CDConfig.h */,
|
||||
41E01E4716D5D5E600ED686C /* CDOpenALSupport.h */,
|
||||
41E01E4816D5D5E600ED686C /* CDOpenALSupport.m */,
|
||||
41E01E4916D5D5E600ED686C /* CocosDenshion.h */,
|
||||
41E01E4A16D5D5E600ED686C /* CocosDenshion.m */,
|
||||
41E01E4B16D5D5E600ED686C /* SimpleAudioEngine.mm */,
|
||||
41E01E4C16D5D5E600ED686C /* SimpleAudioEngine_objc.h */,
|
||||
41E01E4D16D5D5E600ED686C /* SimpleAudioEngine_objc.m */,
|
||||
);
|
||||
name = ios;
|
||||
path = ../ios;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D87CC2BB154FC66100AAFE11 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4193AF8416C39EB1007E21D7 /* CocosDenshion */,
|
||||
D87CC2C9154FC66100AAFE11 /* Frameworks */,
|
||||
D87CC2C7154FC66100AAFE11 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D87CC2C7154FC66100AAFE11 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D87CC2E5154FC6C500AAFE11 /* libCocosDenshion.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D87CC2C9154FC66100AAFE11 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
D87CC2E3154FC6C500AAFE11 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
41E01E4E16D5D5E600ED686C /* Export.h in Headers */,
|
||||
41E01E4F16D5D5E600ED686C /* SimpleAudioEngine.h in Headers */,
|
||||
41E01E5016D5D5E600ED686C /* CDAudioManager.h in Headers */,
|
||||
41E01E5216D5D5E600ED686C /* CDConfig.h in Headers */,
|
||||
41E01E5316D5D5E600ED686C /* CDOpenALSupport.h in Headers */,
|
||||
41E01E5516D5D5E600ED686C /* CocosDenshion.h in Headers */,
|
||||
41E01E5816D5D5E600ED686C /* SimpleAudioEngine_objc.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D87CC2E4154FC6C500AAFE11 /* CocosDenshion */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D87CC2ED154FC6C500AAFE11 /* Build configuration list for PBXNativeTarget "CocosDenshion" */;
|
||||
buildPhases = (
|
||||
D87CC2E1154FC6C500AAFE11 /* Sources */,
|
||||
D87CC2E2154FC6C500AAFE11 /* Frameworks */,
|
||||
D87CC2E3154FC6C500AAFE11 /* Headers */,
|
||||
185ADB8915A3935900CD7CE0 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = CocosDenshion;
|
||||
productName = SPII;
|
||||
productReference = D87CC2E5154FC6C500AAFE11 /* libCocosDenshion.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
D87CC2BD154FC66100AAFE11 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = SP;
|
||||
LastUpgradeCheck = 0430;
|
||||
ORGANIZATIONNAME = Cocoachina;
|
||||
};
|
||||
buildConfigurationList = D87CC2C0154FC66100AAFE11 /* Build configuration list for PBXProject "CocosDenshion" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
"zh-Hans",
|
||||
"zh-Hant",
|
||||
);
|
||||
mainGroup = D87CC2BB154FC66100AAFE11;
|
||||
productRefGroup = D87CC2C7154FC66100AAFE11 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D87CC2E4154FC6C500AAFE11 /* CocosDenshion */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
185ADB8915A3935900CD7CE0 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D87CC2E1154FC6C500AAFE11 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
41E01E5116D5D5E600ED686C /* CDAudioManager.m in Sources */,
|
||||
41E01E5416D5D5E600ED686C /* CDOpenALSupport.m in Sources */,
|
||||
41E01E5616D5D5E600ED686C /* CocosDenshion.m in Sources */,
|
||||
41E01E5716D5D5E600ED686C /* SimpleAudioEngine.mm in Sources */,
|
||||
41E01E5916D5D5E600ED686C /* SimpleAudioEngine_objc.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
D87CC2DC154FC66100AAFE11 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
|
||||
CLANG_CXX_LIBRARY = "compiler-default";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = c89;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "";
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_VERSION = "";
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALID_ARCHS = armv7;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
D87CC2DD154FC66100AAFE11 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
|
||||
CLANG_CXX_LIBRARY = "compiler-default";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = c89;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "";
|
||||
GCC_VERSION = "";
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
|
||||
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VALID_ARCHS = armv7;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
D87CC2EE154FC6C500AAFE11 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
DSTROOT = /tmp/CocosDenshion.dst;
|
||||
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO;
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"COCOS2D_DEBUG=1",
|
||||
CC_TARGET_OS_IPHONE,
|
||||
);
|
||||
GENERATE_PKGINFO_FILE = NO;
|
||||
HEADER_SEARCH_PATHS = "\"$(SDKROOT)/usr/include/libxml2\"";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRIVATE_HEADERS_FOLDER_PATH = /usr/local/include;
|
||||
PRODUCT_NAME = CocosDenshion;
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "../../cocos2dx/platform/ios ../../cocos2dx/include ../../cocos2dx/kazmath/include ../../cocos2dx/";
|
||||
VALID_ARCHS = "armv7 armv7s";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
D87CC2EF154FC6C500AAFE11 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
DSTROOT = /tmp/CocosDenshion.dst;
|
||||
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO;
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = CC_TARGET_OS_IPHONE;
|
||||
GENERATE_PKGINFO_FILE = NO;
|
||||
HEADER_SEARCH_PATHS = "\"$(SDKROOT)/usr/include/libxml2\"";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRIVATE_HEADERS_FOLDER_PATH = /usr/local/include;
|
||||
PRODUCT_NAME = CocosDenshion;
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "../../cocos2dx/platform/ios ../../cocos2dx/include ../../cocos2dx/kazmath/include ../../cocos2dx/";
|
||||
VALID_ARCHS = "armv7 armv7s";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
D87CC2C0154FC66100AAFE11 /* Build configuration list for PBXProject "CocosDenshion" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D87CC2DC154FC66100AAFE11 /* Debug */,
|
||||
D87CC2DD154FC66100AAFE11 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
D87CC2ED154FC6C500AAFE11 /* Build configuration list for PBXNativeTarget "CocosDenshion" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D87CC2EE154FC6C500AAFE11 /* Debug */,
|
||||
D87CC2EF154FC6C500AAFE11 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = D87CC2BD154FC66100AAFE11 /* Project object */;
|
||||
}
|
|
@ -1,378 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1982681102">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1982681102" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings>
|
||||
<externalSetting>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/libCocosDenshion"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/libCocosDenshion/Debug"/>
|
||||
<entry flags="RESOLVED" kind="libraryFile" name="cocosdenshion" srcPrefixMapping="" srcRootPath=""/>
|
||||
</externalSetting>
|
||||
</externalSettings>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="so" artifactName="cocosdenshion" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1982681102" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug" postannouncebuildStep="" postbuildStep="">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1982681102." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1290289406" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.1343594495" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/libCocosDenshion/Debug}" id="cdt.managedbuild.target.gnu.builder.exe.debug.2041927999" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1293331295" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.2092876171" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.2020537008" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.886209200" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1002280254" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../../include"/>
|
||||
<listOptionValue builtIn="false" value="../../third_party/fmod/api/inc"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/linux"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.865815406" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.other.other.839117113" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 -std=c++0x" valueType="string"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1604049990" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1178240227" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.206236808" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.debug.option.debugging.level.828037565" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.985313341" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.370598124" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.1145844969" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug">
|
||||
<option defaultValue="true" id="gnu.c.link.option.shared.1822605485" name="Shared (-shared)" superClass="gnu.c.link.option.shared" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1767253018" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.libs.956474372" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="fmodex"/>
|
||||
</option>
|
||||
<option defaultValue="true" id="gnu.cpp.link.option.shared.430688089" name="Shared (-shared)" superClass="gnu.cpp.link.option.shared" valueType="boolean"/>
|
||||
<option id="gnu.cpp.link.option.paths.1630974641" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../../third_party/fmod/api/lib"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1207468004" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1192863353" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2047527740" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="linux"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="third_party"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1982681102.2081582318">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1982681102.2081582318" moduleId="org.eclipse.cdt.core.settings" name="Debug64">
|
||||
<externalSettings>
|
||||
<externalSetting>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/libCocosDenshion"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/libCocosDenshion/Debug64"/>
|
||||
<entry flags="RESOLVED" kind="libraryFile" name="cocosdenshion" srcPrefixMapping="" srcRootPath=""/>
|
||||
</externalSetting>
|
||||
</externalSettings>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="so" artifactName="cocosdenshion" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1982681102.2081582318" name="Debug64" parent="cdt.managedbuild.config.gnu.exe.debug" postannouncebuildStep="" postbuildStep="">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1982681102.2081582318." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1251965262" name="Linux GCC" resourceTypeBasedDiscovery="false" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.211842" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/libCocosDenshion/Debug}" id="cdt.managedbuild.target.gnu.builder.exe.debug.320790206" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1969425105" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.672235223" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.903351554" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.1967729847" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.2029142422" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../../include"/>
|
||||
<listOptionValue builtIn="false" value="../../third_party/fmod/lib64/api/inc"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/linux"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.other.pic.2083020950" name="Position Independent Code (-fPIC)" superClass="gnu.cpp.compiler.option.other.pic" value="true" valueType="boolean"/>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.1494127435" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.other.other.2109978312" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 -std=c++0x" valueType="string"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1392083650" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1363971045" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1819118208" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.debug.option.debugging.level.899323922" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.418636795" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.519362348" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.92652741" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug">
|
||||
<option defaultValue="true" id="gnu.c.link.option.shared.1744079703" name="Shared (-shared)" superClass="gnu.c.link.option.shared" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.295915722" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.libs.540157938" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="fmodex64"/>
|
||||
</option>
|
||||
<option defaultValue="true" id="gnu.cpp.link.option.shared.1948419879" name="Shared (-shared)" superClass="gnu.cpp.link.option.shared" valueType="boolean"/>
|
||||
<option id="gnu.cpp.link.option.paths.1944745188" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../../third_party/fmod/lib64/api/lib"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1586199085" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1645649559" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.210703151" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="linux"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="third_party"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1982681102.187750332">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1982681102.187750332" moduleId="org.eclipse.cdt.core.settings" name="Release64">
|
||||
<externalSettings>
|
||||
<externalSetting>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/libCocosDenshion"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/libCocosDenshion/Release64"/>
|
||||
<entry flags="RESOLVED" kind="libraryFile" name="cocosdenshion" srcPrefixMapping="" srcRootPath=""/>
|
||||
</externalSetting>
|
||||
</externalSettings>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="so" artifactName="cocosdenshion" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1982681102.187750332" name="Release64" parent="cdt.managedbuild.config.gnu.exe.debug" postannouncebuildStep="" postbuildStep="">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1982681102.187750332." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1938658621" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.288132493" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/libCocosDenshion/Debug}" id="cdt.managedbuild.target.gnu.builder.exe.debug.328031139" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1714134548" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.120170295" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.712619352" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.427176521" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.55801596" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../../include"/>
|
||||
<listOptionValue builtIn="false" value="../../third_party/fmod/lib64/api/inc"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/linux"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.other.pic.146404933" name="Position Independent Code (-fPIC)" superClass="gnu.cpp.compiler.option.other.pic" value="true" valueType="boolean"/>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.1600218526" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.other.other.800236610" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 -std=c++0x" valueType="string"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1588316235" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.181942020" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.877368673" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.debug.option.debugging.level.906521804" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.1194563088" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1768675996" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.1360213002" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug">
|
||||
<option defaultValue="true" id="gnu.c.link.option.shared.349128126" name="Shared (-shared)" superClass="gnu.c.link.option.shared" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.320821186" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.libs.1692331593" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="fmodex64"/>
|
||||
</option>
|
||||
<option defaultValue="true" id="gnu.cpp.link.option.shared.413846573" name="Shared (-shared)" superClass="gnu.cpp.link.option.shared" valueType="boolean"/>
|
||||
<option id="gnu.cpp.link.option.paths.1389333736" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../../third_party/fmod/lib64/api/lib"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.752809568" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1770910937" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.425462237" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="linux"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="third_party"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1982681102.1980455286">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1982681102.1980455286" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings>
|
||||
<externalSetting>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/libCocosDenshion"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/libCocosDenshion/Release"/>
|
||||
<entry flags="RESOLVED" kind="libraryFile" name="cocosdenshion" srcPrefixMapping="" srcRootPath=""/>
|
||||
</externalSetting>
|
||||
</externalSettings>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="so" artifactName="cocosdenshion" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1982681102.1980455286" name="Release" parent="cdt.managedbuild.config.gnu.exe.debug" postannouncebuildStep="" postbuildStep="">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1982681102.1980455286." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.290994940" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.1518934121" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/libCocosDenshion/Debug}" id="cdt.managedbuild.target.gnu.builder.exe.debug.1444592736" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1436936172" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1343498054" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1947435447" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.1318058097" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.659832591" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../../include"/>
|
||||
<listOptionValue builtIn="false" value="../../third_party/fmod/api/inc"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/linux"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.916772535" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.other.other.1960189312" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 -std=c++0x" valueType="string"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1203366553" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1152172860" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1273401393" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.debug.option.debugging.level.2067549607" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.1667632524" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.752229897" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.1392521528" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug">
|
||||
<option defaultValue="true" id="gnu.c.link.option.shared.542656166" name="Shared (-shared)" superClass="gnu.c.link.option.shared" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1985024281" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.libs.191504636" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="fmodex"/>
|
||||
</option>
|
||||
<option defaultValue="true" id="gnu.cpp.link.option.shared.1603126572" name="Shared (-shared)" superClass="gnu.cpp.link.option.shared" valueType="boolean"/>
|
||||
<option id="gnu.cpp.link.option.paths.1309346195" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../../third_party/fmod/api/lib"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.183238299" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.400809389" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1500024287" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="linux"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="third_party"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="libCocosDenshion.cdt.managedbuild.target.gnu.exe.346390339" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/libCocosDenshion"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug64">
|
||||
<resource resourceType="PROJECT" workspacePath="/libCocosDenshion"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Release64">
|
||||
<resource resourceType="PROJECT" workspacePath="/libCocosDenshion"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/libCocosDenshion"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1982681102.2081582318;cdt.managedbuild.config.gnu.exe.debug.1982681102.2081582318.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.672235223;cdt.managedbuild.tool.gnu.cpp.compiler.input.1392083650">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1982681102.2081582318">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1982681102.2081582318;cdt.managedbuild.config.gnu.exe.debug.1982681102.2081582318.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1363971045;cdt.managedbuild.tool.gnu.c.compiler.input.519362348">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1982681102;cdt.managedbuild.config.gnu.exe.debug.1982681102.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.2092876171;cdt.managedbuild.tool.gnu.cpp.compiler.input.1604049990">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.509246766.545780261;cdt.managedbuild.config.gnu.exe.release.509246766.545780261.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.874883491;cdt.managedbuild.tool.gnu.c.compiler.input.2040937042">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.509246766.545780261;cdt.managedbuild.config.gnu.exe.release.509246766.545780261.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.461135607;cdt.managedbuild.tool.gnu.cpp.compiler.input.340228974">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.509246766.545780261">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.509246766;cdt.managedbuild.config.gnu.exe.release.509246766.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.222121229;cdt.managedbuild.tool.gnu.cpp.compiler.input.1557365568">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.509246766;cdt.managedbuild.config.gnu.exe.release.509246766.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.1919066836;cdt.managedbuild.tool.gnu.c.compiler.input.757092405">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1982681102;cdt.managedbuild.config.gnu.exe.debug.1982681102.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1178240227;cdt.managedbuild.tool.gnu.c.compiler.input.370598124">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
</cproject>
|
|
@ -1,100 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>libCocosDenshion</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||
<value>${workspace_loc:/CocosDenshion/Debug}</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>include</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/include</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>linux</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/linux</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>third_party</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/third_party</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
|
@ -1,20 +0,0 @@
|
|||
################################################################################
|
||||
# Do not include this file in your project: see cocos2dx.pri.
|
||||
################################################################################
|
||||
|
||||
linux {
|
||||
# We will compile extensions on demand using Makefile.
|
||||
build_CocosDension.name = Build extension static library
|
||||
build_CocosDension.input = $$PWD/Makefile
|
||||
build_CocosDension.output = $$CC_LIBRARY_DIR/libcocosdenshion.so
|
||||
build_CocosDension.target = $$CC_LIBRARY_DIR/libcocosdenshion.so
|
||||
build_CocosDension.CONFIG = no_link target_predeps
|
||||
build_CocosDension.commands = cd $$PWD && make $$CC_MAKE_FLAGS
|
||||
|
||||
QMAKE_EXTRA_COMPILERS += build_CocosDension
|
||||
QMAKE_EXTRA_TARGETS += build_CocosDension
|
||||
|
||||
PRE_TARGETDEPS += $$CC_LIBRARY_DIR/libcocosdenshion.so
|
||||
LIBS += -lcocosdenshion
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
TARGET = libcocosdenshion.so
|
||||
|
||||
INCLUDES += -I.. -I../include
|
||||
|
||||
##Using OpenAL
|
||||
ifeq ($(OPENAL),1)
|
||||
SOURCES = ../openal/OpenALDecoder.cpp \
|
||||
../openal/SimpleAudioEngineOpenAL.cpp
|
||||
SHAREDLIBS += -lopenal -lalut
|
||||
|
||||
ifeq ($(OPENAL_MP3),1)
|
||||
DEFINES += -DENABLE_MPG123
|
||||
SHAREDLIBS += -lmpg123
|
||||
endif
|
||||
|
||||
ifneq ($(NOVORBIS),1)
|
||||
SHAREDLIBS += -logg -lvorbis -lvorbisfile
|
||||
else
|
||||
DEFINES += -DDISABLE_VORBIS
|
||||
endif
|
||||
|
||||
##Using FMOD
|
||||
else
|
||||
SOURCES = \
|
||||
../linux/SimpleAudioEngineFMOD.cpp \
|
||||
../linux/FmodAudioPlayer.cpp
|
||||
|
||||
ifeq ($(LBITS),64)
|
||||
INCLUDES += -I../third_party/fmod/lib64/api/inc
|
||||
else
|
||||
INCLUDES += -I../third_party/fmod/api/inc
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
COCOS_ROOT = ../..
|
||||
include $(COCOS_ROOT)/cocos2dx/proj.linux/cocos2dx.mk
|
||||
|
||||
TARGET := $(LIB_DIR)/$(TARGET)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST)
|
||||
@mkdir -p $(@D)
|
||||
$(LOG_LINK)$(CXX) $(CXXFLAGS) $(OBJECTS) -shared -o $(TARGET) $(SHAREDLIBS) $(STATICLIBS)
|
||||
|
||||
$(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST)
|
||||
@mkdir -p $(@D)
|
||||
$(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
|
|
@ -1,342 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
41E01E4E16D5D5E600ED686C /* Export.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E01E4116D5D5E600ED686C /* Export.h */; };
|
||||
41E01E4F16D5D5E600ED686C /* SimpleAudioEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E01E4216D5D5E600ED686C /* SimpleAudioEngine.h */; };
|
||||
A0C2188717791E6D00BE78B5 /* CDAudioManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A0C2187B17791E6D00BE78B5 /* CDAudioManager.h */; };
|
||||
A0C2188817791E6D00BE78B5 /* CDAudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = A0C2187C17791E6D00BE78B5 /* CDAudioManager.m */; };
|
||||
A0C2188917791E6D00BE78B5 /* CDConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = A0C2187D17791E6D00BE78B5 /* CDConfig.h */; };
|
||||
A0C2188A17791E6D00BE78B5 /* CDOpenALSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = A0C2187E17791E6D00BE78B5 /* CDOpenALSupport.h */; };
|
||||
A0C2188B17791E6D00BE78B5 /* CDOpenALSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = A0C2187F17791E6D00BE78B5 /* CDOpenALSupport.m */; };
|
||||
A0C2188C17791E6D00BE78B5 /* CDXMacOSXSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = A0C2188017791E6D00BE78B5 /* CDXMacOSXSupport.h */; };
|
||||
A0C2188D17791E6D00BE78B5 /* CDXMacOSXSupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = A0C2188117791E6D00BE78B5 /* CDXMacOSXSupport.mm */; };
|
||||
A0C2188E17791E6D00BE78B5 /* CocosDenshion.h in Headers */ = {isa = PBXBuildFile; fileRef = A0C2188217791E6D00BE78B5 /* CocosDenshion.h */; };
|
||||
A0C2188F17791E6D00BE78B5 /* CocosDenshion.m in Sources */ = {isa = PBXBuildFile; fileRef = A0C2188317791E6D00BE78B5 /* CocosDenshion.m */; };
|
||||
A0C2189017791E6D00BE78B5 /* SimpleAudioEngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = A0C2188417791E6D00BE78B5 /* SimpleAudioEngine.mm */; };
|
||||
A0C2189117791E6D00BE78B5 /* SimpleAudioEngine_objc.h in Headers */ = {isa = PBXBuildFile; fileRef = A0C2188517791E6D00BE78B5 /* SimpleAudioEngine_objc.h */; };
|
||||
A0C2189217791E6D00BE78B5 /* SimpleAudioEngine_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = A0C2188617791E6D00BE78B5 /* SimpleAudioEngine_objc.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
41E01E4116D5D5E600ED686C /* Export.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = "<group>"; };
|
||||
41E01E4216D5D5E600ED686C /* SimpleAudioEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine.h; sourceTree = "<group>"; };
|
||||
A0C2187B17791E6D00BE78B5 /* CDAudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDAudioManager.h; sourceTree = "<group>"; };
|
||||
A0C2187C17791E6D00BE78B5 /* CDAudioManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDAudioManager.m; sourceTree = "<group>"; };
|
||||
A0C2187D17791E6D00BE78B5 /* CDConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDConfig.h; sourceTree = "<group>"; };
|
||||
A0C2187E17791E6D00BE78B5 /* CDOpenALSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDOpenALSupport.h; sourceTree = "<group>"; };
|
||||
A0C2187F17791E6D00BE78B5 /* CDOpenALSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDOpenALSupport.m; sourceTree = "<group>"; };
|
||||
A0C2188017791E6D00BE78B5 /* CDXMacOSXSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDXMacOSXSupport.h; sourceTree = "<group>"; };
|
||||
A0C2188117791E6D00BE78B5 /* CDXMacOSXSupport.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CDXMacOSXSupport.mm; sourceTree = "<group>"; };
|
||||
A0C2188217791E6D00BE78B5 /* CocosDenshion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosDenshion.h; sourceTree = "<group>"; };
|
||||
A0C2188317791E6D00BE78B5 /* CocosDenshion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CocosDenshion.m; sourceTree = "<group>"; };
|
||||
A0C2188417791E6D00BE78B5 /* SimpleAudioEngine.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleAudioEngine.mm; sourceTree = "<group>"; };
|
||||
A0C2188517791E6D00BE78B5 /* SimpleAudioEngine_objc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine_objc.h; sourceTree = "<group>"; };
|
||||
A0C2188617791E6D00BE78B5 /* SimpleAudioEngine_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleAudioEngine_objc.m; sourceTree = "<group>"; };
|
||||
D87CC2E5154FC6C500AAFE11 /* libCocosDenshion.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCocosDenshion.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D87CC2E2154FC6C500AAFE11 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
4193AF8416C39EB1007E21D7 /* CocosDenshion */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A0C2187A17791E6D00BE78B5 /* mac */,
|
||||
41E01E4016D5D5E600ED686C /* include */,
|
||||
);
|
||||
name = CocosDenshion;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
41E01E4016D5D5E600ED686C /* include */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
41E01E4116D5D5E600ED686C /* Export.h */,
|
||||
41E01E4216D5D5E600ED686C /* SimpleAudioEngine.h */,
|
||||
);
|
||||
name = include;
|
||||
path = ../include;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A0C2187A17791E6D00BE78B5 /* mac */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A0C2187B17791E6D00BE78B5 /* CDAudioManager.h */,
|
||||
A0C2187C17791E6D00BE78B5 /* CDAudioManager.m */,
|
||||
A0C2187D17791E6D00BE78B5 /* CDConfig.h */,
|
||||
A0C2187E17791E6D00BE78B5 /* CDOpenALSupport.h */,
|
||||
A0C2187F17791E6D00BE78B5 /* CDOpenALSupport.m */,
|
||||
A0C2188017791E6D00BE78B5 /* CDXMacOSXSupport.h */,
|
||||
A0C2188117791E6D00BE78B5 /* CDXMacOSXSupport.mm */,
|
||||
A0C2188217791E6D00BE78B5 /* CocosDenshion.h */,
|
||||
A0C2188317791E6D00BE78B5 /* CocosDenshion.m */,
|
||||
A0C2188417791E6D00BE78B5 /* SimpleAudioEngine.mm */,
|
||||
A0C2188517791E6D00BE78B5 /* SimpleAudioEngine_objc.h */,
|
||||
A0C2188617791E6D00BE78B5 /* SimpleAudioEngine_objc.m */,
|
||||
);
|
||||
name = mac;
|
||||
path = ../mac;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D87CC2BB154FC66100AAFE11 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4193AF8416C39EB1007E21D7 /* CocosDenshion */,
|
||||
D87CC2C9154FC66100AAFE11 /* Frameworks */,
|
||||
D87CC2C7154FC66100AAFE11 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D87CC2C7154FC66100AAFE11 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D87CC2E5154FC6C500AAFE11 /* libCocosDenshion.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D87CC2C9154FC66100AAFE11 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
D87CC2E3154FC6C500AAFE11 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
41E01E4E16D5D5E600ED686C /* Export.h in Headers */,
|
||||
41E01E4F16D5D5E600ED686C /* SimpleAudioEngine.h in Headers */,
|
||||
A0C2188717791E6D00BE78B5 /* CDAudioManager.h in Headers */,
|
||||
A0C2188917791E6D00BE78B5 /* CDConfig.h in Headers */,
|
||||
A0C2188A17791E6D00BE78B5 /* CDOpenALSupport.h in Headers */,
|
||||
A0C2188C17791E6D00BE78B5 /* CDXMacOSXSupport.h in Headers */,
|
||||
A0C2188E17791E6D00BE78B5 /* CocosDenshion.h in Headers */,
|
||||
A0C2189117791E6D00BE78B5 /* SimpleAudioEngine_objc.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D87CC2E4154FC6C500AAFE11 /* CocosDenshion */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D87CC2ED154FC6C500AAFE11 /* Build configuration list for PBXNativeTarget "CocosDenshion" */;
|
||||
buildPhases = (
|
||||
D87CC2E1154FC6C500AAFE11 /* Sources */,
|
||||
D87CC2E2154FC6C500AAFE11 /* Frameworks */,
|
||||
D87CC2E3154FC6C500AAFE11 /* Headers */,
|
||||
185ADB8915A3935900CD7CE0 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = CocosDenshion;
|
||||
productName = SPII;
|
||||
productReference = D87CC2E5154FC6C500AAFE11 /* libCocosDenshion.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
D87CC2BD154FC66100AAFE11 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = SP;
|
||||
LastUpgradeCheck = 0430;
|
||||
ORGANIZATIONNAME = Cocoachina;
|
||||
};
|
||||
buildConfigurationList = D87CC2C0154FC66100AAFE11 /* Build configuration list for PBXProject "CocosDenshion" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
"zh-Hans",
|
||||
"zh-Hant",
|
||||
);
|
||||
mainGroup = D87CC2BB154FC66100AAFE11;
|
||||
productRefGroup = D87CC2C7154FC66100AAFE11 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D87CC2E4154FC6C500AAFE11 /* CocosDenshion */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
185ADB8915A3935900CD7CE0 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D87CC2E1154FC6C500AAFE11 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A0C2188817791E6D00BE78B5 /* CDAudioManager.m in Sources */,
|
||||
A0C2188B17791E6D00BE78B5 /* CDOpenALSupport.m in Sources */,
|
||||
A0C2188D17791E6D00BE78B5 /* CDXMacOSXSupport.mm in Sources */,
|
||||
A0C2188F17791E6D00BE78B5 /* CocosDenshion.m in Sources */,
|
||||
A0C2189017791E6D00BE78B5 /* SimpleAudioEngine.mm in Sources */,
|
||||
A0C2189217791E6D00BE78B5 /* SimpleAudioEngine_objc.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
D87CC2DC154FC66100AAFE11 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
CC_TARGET_OS_MAC,
|
||||
DEBUG,
|
||||
"COCOS2D_DEBUG=1",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
D87CC2DD154FC66100AAFE11 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
CC_TARGET_OS_MAC,
|
||||
NDEBUG,
|
||||
);
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
SDKROOT = macosx;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
D87CC2EE154FC6C500AAFE11 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
DSTROOT = /tmp/CocosDenshion.dst;
|
||||
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO;
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GENERATE_PKGINFO_FILE = NO;
|
||||
HEADER_SEARCH_PATHS = "\"$(SDKROOT)/usr/include/libxml2\"";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRIVATE_HEADERS_FOLDER_PATH = /usr/local/include;
|
||||
PRODUCT_NAME = CocosDenshion;
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "../../cocos2dx/platform/mac ../../cocos2dx/include ../../cocos2dx/kazmath/include ../../cocos2dx/";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
D87CC2EF154FC6C500AAFE11 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
DSTROOT = /tmp/CocosDenshion.dst;
|
||||
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO;
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GENERATE_PKGINFO_FILE = NO;
|
||||
HEADER_SEARCH_PATHS = "\"$(SDKROOT)/usr/include/libxml2\"";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRIVATE_HEADERS_FOLDER_PATH = /usr/local/include;
|
||||
PRODUCT_NAME = CocosDenshion;
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "../../cocos2dx/platform/mac ../../cocos2dx/include ../../cocos2dx/kazmath/include ../../cocos2dx/";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
D87CC2C0154FC66100AAFE11 /* Build configuration list for PBXProject "CocosDenshion" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D87CC2DC154FC66100AAFE11 /* Debug */,
|
||||
D87CC2DD154FC66100AAFE11 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
D87CC2ED154FC6C500AAFE11 /* Build configuration list for PBXNativeTarget "CocosDenshion" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D87CC2EE154FC6C500AAFE11 /* Debug */,
|
||||
D87CC2EF154FC6C500AAFE11 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = D87CC2BD154FC66100AAFE11 /* Project object */;
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
COCOS_ROOT = ../..
|
||||
|
||||
INCLUDES = -I../include
|
||||
|
||||
SOURCES = ../openal/OpenALDecoder.cpp \
|
||||
../openal/SimpleAudioEngine.cpp
|
||||
|
||||
include $(COCOS_ROOT)/cocos2dx/proj.nacl/cocos2dx.mk
|
||||
|
||||
TARGET = $(LIB_DIR)/libcocosdenshion.a
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST)
|
||||
@mkdir -p $(@D)
|
||||
$(LOG_AR)$(NACL_AR) $(ARFLAGS) $(TARGET) $(OBJECTS)
|
||||
|
||||
$(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST)
|
||||
@mkdir -p $(@D)
|
||||
$(LOG_CXX)$(NACL_CXX) -MMD $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
|
|
@ -1,15 +0,0 @@
|
|||
|
||||
include(../../cocos2dx/proj.qt5/common.pri)
|
||||
|
||||
TEMPLATE = lib
|
||||
|
||||
SOURCES += $$files(../qt5/*.cpp)
|
||||
|
||||
INCLUDEPATH += ..
|
||||
INCLUDEPATH += ../include
|
||||
|
||||
TARGET = $${LIB_OUTPUT_DIR}/cocosdenshion
|
||||
|
||||
INSTALLS += target
|
||||
target.path = $${LIB_INSTALL_DIR}
|
||||
|
|
@ -1,345 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.lib.debug.emulator.1855378280">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.lib.debug.emulator.1855378280" moduleId="org.eclipse.cdt.core.settings" name="Debug-Tizen-Emulator">
|
||||
<macros>
|
||||
<stringMacro name="COCOS_ROOT" type="VALUE_PATH_ANY" value="../../.."/>
|
||||
<stringMacro name="COCOS_SRC" type="VALUE_PATH_ANY" value="${COCOS_ROOT}/cocos2dx"/>
|
||||
</macros>
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="a" artifactName="cocosdenshion" buildArtefactType="org.tizen.nativecpp.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecpp.buildArtefactType.staticLib" cleanCommand="rm -f" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecpp.config.sbi.gcc45.lib.debug.emulator.1855378280" name="Debug-Tizen-Emulator" parent="org.tizen.nativecpp.config.sbi.gcc45.lib.debug.emulator">
|
||||
<folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.lib.debug.emulator.1855378280." name="/" resourcePath="">
|
||||
<toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.lib.debug.emulator.2014007899" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.lib.debug.emulator">
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.1067387441" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
|
||||
<builder autoBuildTarget="all" buildPath="${workspace_loc:/cocosdenshion/Debug-Tizen-Emulator}" enableAutoBuild="true" id="org.tizen.nativecpp.target.sbi.gnu.builder.1261707379" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecpp.target.sbi.gnu.builder"/>
|
||||
<tool command="i386-linux-gnueabi-ar.exe" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="org.tizen.nativecpp.tool.sbi.gnu.archiver.689316005" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
|
||||
<tool command="i386-linux-gnueabi-g++.exe" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.1533358351" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.1726560828" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="sbi.gnu.cpp.compiler.option.debugging.level.1554282679" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="sbi.gnu.cpp.compiler.option.debug.applog.1800109419" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.cpp.compiler.option.debug.applog" value="true" valueType="boolean"/>
|
||||
<option id="sbi.gnu.cpp.compiler.option.796499718" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value="tizen-emulator-2.2.native_gcc45.i386.cpp.staticLib"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1887202981" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/>
|
||||
<listOptionValue builtIn="false" value="../../include"/>
|
||||
<listOptionValue builtIn="false" value=""${COCOS_SRC}""/>
|
||||
<listOptionValue builtIn="false" value=""${COCOS_SRC}/include""/>
|
||||
<listOptionValue builtIn="false" value=""${COCOS_SRC}/kazmath/include""/>
|
||||
<listOptionValue builtIn="false" value=""${COCOS_SRC}/platform/tizen""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.140749819" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value="osp-static"/>
|
||||
</option>
|
||||
<option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.1250550482" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/>
|
||||
<listOptionValue builtIn="false" value=""C:\tizen-sdk\library""/>
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/osp""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp.1942713160" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=" -fPIC"/>
|
||||
<listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.67860287" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="TIZEN"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.other.other.1642224950" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 -std=c++0x" valueType="string"/>
|
||||
<inputType id="sbi.gnu.cpp.compiler.tizen.inputType.2085750802" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
|
||||
</tool>
|
||||
<tool command="i386-linux-gnueabi-gcc.exe" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.263460224" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.819197061" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="sbi.gnu.c.compiler.option.debugging.level.709891206" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="sbi.gnu.c.compiler.option.debug.applog.1166511754" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.c.compiler.option.debug.applog" value="true" valueType="boolean"/>
|
||||
<option id="sbi.gnu.c.compiler.option.1738169580" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value="tizen-emulator-2.2.native_gcc45.i386.cpp.staticLib"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.821405214" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.c.compiler.option.frameworks.cpp.229730784" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value="osp-static"/>
|
||||
</option>
|
||||
<option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.1139638882" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.cpp" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/>
|
||||
<listOptionValue builtIn="false" value=""C:\tizen-sdk\library""/>
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/osp""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.c.compiler.option.frameworks_cflags.cpp.1131449804" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.cpp" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=" -fPIC"/>
|
||||
<listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.31661523" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_DEBUG"/>
|
||||
</option>
|
||||
<inputType id="sbi.gnu.c.compiler.tizen.inputType.94264147" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
|
||||
</tool>
|
||||
<tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.792552065" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
|
||||
<tool command="i386-linux-gnueabi-g++.exe" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.1518096171" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker">
|
||||
<option id="gnu.cpp.link.option.paths.43791296" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib}""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.181465864" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool command="i386-linux-gnueabi-as.exe" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.165476943" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.517365643" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="org.tizen.nativecpp.tool.sbi.po.compiler.254627421" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
|
||||
<tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.8480881" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.lib.debug.device.1240851129">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.lib.debug.device.1240851129" moduleId="org.eclipse.cdt.core.settings" name="Debug-Tizen-Device">
|
||||
<macros>
|
||||
<stringMacro name="COCOS_ROOT" type="VALUE_PATH_ANY" value="../../.."/>
|
||||
<stringMacro name="COCOS_SRC" type="VALUE_PATH_ANY" value="${COCOS_ROOT}/cocos2dx"/>
|
||||
</macros>
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.tizen.nativecpp.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecpp.buildArtefactType.staticLib" cleanCommand="rm -f" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecpp.config.sbi.gcc45.lib.debug.device.1240851129" name="Debug-Tizen-Device" parent="org.tizen.nativecpp.config.sbi.gcc45.lib.debug.device">
|
||||
<folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.lib.debug.device.1240851129." name="/" resourcePath="">
|
||||
<toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.lib.debug.device.1011815399" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.lib.debug.device">
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.205106495" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
|
||||
<builder buildPath="${workspace_loc:/cocosdenshion/Debug-Tizen-Device}" id="org.tizen.nativecpp.target.sbi.gnu.builder.391616426" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecpp.target.sbi.gnu.builder"/>
|
||||
<tool command="arm-linux-gnueabi-ar.exe" id="org.tizen.nativecpp.tool.sbi.gnu.archiver.1946190238" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
|
||||
<tool command="arm-linux-gnueabi-g++.exe" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.806237946" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.1141078136" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="sbi.gnu.cpp.compiler.option.debugging.level.412266760" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="sbi.gnu.cpp.compiler.option.debug.applog.48357772" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.cpp.compiler.option.debug.applog" value="true" valueType="boolean"/>
|
||||
<option id="sbi.gnu.cpp.compiler.option.738324429" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value="tizen-device-2.2.native_gcc45.armel.cpp.staticLib"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1372067183" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/>
|
||||
<listOptionValue builtIn="false" value="../../include"/>
|
||||
<listOptionValue builtIn="false" value=""${COCOS_SRC}""/>
|
||||
<listOptionValue builtIn="false" value=""${COCOS_SRC}/include""/>
|
||||
<listOptionValue builtIn="false" value=""${COCOS_SRC}/kazmath/include""/>
|
||||
<listOptionValue builtIn="false" value=""${COCOS_SRC}/platform/tizen""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.1270990666" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value="osp-static"/>
|
||||
</option>
|
||||
<option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.579636391" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/>
|
||||
<listOptionValue builtIn="false" value=""C:\tizen-sdk\library""/>
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/osp""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp.1644102691" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=" -fPIC"/>
|
||||
<listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.1398462050" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="TIZEN"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.other.other.611968827" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 -std=c++0x" valueType="string"/>
|
||||
<inputType id="sbi.gnu.cpp.compiler.tizen.inputType.1890676098" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
|
||||
</tool>
|
||||
<tool command="arm-linux-gnueabi-gcc.exe" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.800077346" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.73052907" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="sbi.gnu.c.compiler.option.debugging.level.641100997" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="sbi.gnu.c.compiler.option.debug.applog.2000116514" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.c.compiler.option.debug.applog" value="true" valueType="boolean"/>
|
||||
<option id="sbi.gnu.c.compiler.option.1751855743" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value="tizen-device-2.2.native_gcc45.armel.cpp.staticLib"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.1641648644" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.c.compiler.option.frameworks.cpp.356824867" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value="osp-static"/>
|
||||
</option>
|
||||
<option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.843251170" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.cpp" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/>
|
||||
<listOptionValue builtIn="false" value=""C:\tizen-sdk\library""/>
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/osp""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.c.compiler.option.frameworks_cflags.cpp.2073478823" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.cpp" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=" -fPIC"/>
|
||||
<listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1732125980" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_DEBUG"/>
|
||||
</option>
|
||||
<inputType id="sbi.gnu.c.compiler.tizen.inputType.565155338" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
|
||||
</tool>
|
||||
<tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.1321059471" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
|
||||
<tool command="arm-linux-gnueabi-g++.exe" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.517614783" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker">
|
||||
<option id="gnu.cpp.link.option.paths.316493253" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib}""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.557112687" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool command="arm-linux-gnueabi-as.exe" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1047247012" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1262361730" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="org.tizen.nativecpp.tool.sbi.po.compiler.1138371781" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
|
||||
<tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.2045899075" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.lib.release.2023052084">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.lib.release.2023052084" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<macros>
|
||||
<stringMacro name="COCOS_ROOT" type="VALUE_PATH_ANY" value="../../.."/>
|
||||
<stringMacro name="COCOS_SRC" type="VALUE_PATH_ANY" value="${COCOS_ROOT}/cocos2dx"/>
|
||||
</macros>
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.tizen.nativecpp.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecpp.buildArtefactType.staticLib" cleanCommand="rm -f" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecpp.config.sbi.gcc45.lib.release.2023052084" name="Release" parent="org.tizen.nativecpp.config.sbi.gcc45.lib.release">
|
||||
<folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.lib.release.2023052084." name="/" resourcePath="">
|
||||
<toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.lib.release.1978438453" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.lib.release">
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.216744962" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
|
||||
<builder buildPath="${workspace_loc:/cocosdenshion/Release}" id="org.tizen.nativecpp.target.sbi.gnu.builder.2102360604" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecpp.target.sbi.gnu.builder"/>
|
||||
<tool command="i386-linux-gnueabi-ar.exe" id="org.tizen.nativecpp.tool.sbi.gnu.archiver.1826014056" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
|
||||
<tool command="clang++.exe" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.2111905100" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.1297088223" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="sbi.gnu.cpp.compiler.option.debugging.level.459894355" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level"/>
|
||||
<option id="sbi.gnu.cpp.compiler.option.debug.applog.849008186" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.cpp.compiler.option.debug.applog"/>
|
||||
<option id="sbi.gnu.cpp.compiler.option.74299026" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value="tizen-emulator-2.2.native_llvm31.i386.cpp.staticLib"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1217915212" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.448934412" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value="osp-static"/>
|
||||
</option>
|
||||
<option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.1627502718" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/>
|
||||
<listOptionValue builtIn="false" value=""C:\tizen-sdk\library""/>
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/osp""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp.138455270" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain C:/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Wno-gnu"/>
|
||||
<listOptionValue builtIn="false" value=" -fPIC"/>
|
||||
<listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
|
||||
</option>
|
||||
<inputType id="sbi.gnu.cpp.compiler.tizen.inputType.1145329261" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
|
||||
</tool>
|
||||
<tool command="clang.exe" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.19577634" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.1635131080" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="sbi.gnu.c.compiler.option.debugging.level.220381318" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level"/>
|
||||
<option id="sbi.gnu.c.compiler.option.debug.applog.753089515" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.c.compiler.option.debug.applog"/>
|
||||
<option id="sbi.gnu.c.compiler.option.215142124" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value="tizen-emulator-2.2.native_llvm31.i386.cpp.staticLib"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.632347119" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.c.compiler.option.frameworks.cpp.1474026339" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value="osp-static"/>
|
||||
</option>
|
||||
<option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.468493190" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.cpp" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/>
|
||||
<listOptionValue builtIn="false" value=""C:\tizen-sdk\library""/>
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/>
|
||||
<listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/osp""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.c.compiler.option.frameworks_cflags.cpp.1218800554" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.cpp" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain C:/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Wno-gnu"/>
|
||||
<listOptionValue builtIn="false" value=" -fPIC"/>
|
||||
<listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
|
||||
</option>
|
||||
<inputType id="sbi.gnu.c.compiler.tizen.inputType.1344515254" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
|
||||
</tool>
|
||||
<tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.59626261" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
|
||||
<tool command="clang++.exe" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.563167499" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker">
|
||||
<option id="gnu.cpp.link.option.paths.618042967" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib}""/>
|
||||
</option>
|
||||
<option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.620416347" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain C:/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Xlinker --as-needed"/>
|
||||
<listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool command="i386-linux-gnueabi-as.exe" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1990045494" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.879926948" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="org.tizen.nativecpp.tool.sbi.po.compiler.1674758948" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
|
||||
<tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.1792629643" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="cocosdenshion.org.tizen.nativecpp.target.sbi.gcc45.lib.1874463476" name="Tizen Static Library" projectType="org.tizen.nativecpp.target.sbi.gcc45.lib"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.lib.debug.emulator.1855378280">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.lib.release.2023052084">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.lib.debug.device.1240851129">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="com.samsung.tizen.nativeapp.projectInfo" version="1.0.0"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="1">
|
||||
<resource resourceType="PROJECT" workspacePath="/cocosdenshion"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
</cproject>
|
|
@ -1,106 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>cocosdenshion</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>sbi-make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||
<value>${workspace_loc:/cocosdenshion/Debug-Tizen-Emulator}</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.tizen.nativecpp.apichecker.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
<nature>org.tizen.nativecpp.apichecker.core.tizenCppNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>src/OpenALDecoder.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/openal/OpenALDecoder.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/OpenALDecoder.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/openal/OpenALDecoder.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/SimpleAudioEngineOpenAL.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/openal/SimpleAudioEngineOpenAL.cpp</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
|
@ -1,407 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* Cocos2D-X Qt 5 Platform
|
||||
*
|
||||
* Copyright (C) 2013 Jolla Ltd.
|
||||
* Contact: Thomas Perl <thomas.perl@jollamobile.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
**/
|
||||
|
||||
|
||||
#include "SimpleAudioEngine.h"
|
||||
|
||||
#include "platform/CCCommon.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
|
||||
#include <QMap>
|
||||
#include <QMediaPlayer>
|
||||
|
||||
USING_NS_CC;
|
||||
|
||||
namespace CocosDenshion {
|
||||
|
||||
static QString
|
||||
fullPath(const char *filename)
|
||||
{
|
||||
return QString::fromStdString(FileUtils::getInstance()->fullPathForFilename(filename));
|
||||
}
|
||||
|
||||
class CocosQt5AudioBackend {
|
||||
public:
|
||||
static void cleanup();
|
||||
static void gcEffects();
|
||||
|
||||
static QMediaPlayer *player() {
|
||||
if (background_music == NULL) {
|
||||
background_music = new QMediaPlayer;
|
||||
}
|
||||
|
||||
return background_music;
|
||||
}
|
||||
|
||||
static void setEffectsVolume(float volume)
|
||||
{
|
||||
effects_volume = volume;
|
||||
|
||||
foreach (QMediaPlayer *effect, effects.values()) {
|
||||
effect->setVolume(volume * 100.0);
|
||||
}
|
||||
}
|
||||
|
||||
static QMap<int,QMediaPlayer*> effects;
|
||||
static QMediaPlayer *background_music;
|
||||
static int next_effect_id;
|
||||
static float effects_volume;
|
||||
};
|
||||
|
||||
QMap<int,QMediaPlayer*>
|
||||
CocosQt5AudioBackend::effects;
|
||||
|
||||
QMediaPlayer *
|
||||
CocosQt5AudioBackend::background_music = NULL;
|
||||
|
||||
int
|
||||
CocosQt5AudioBackend::next_effect_id = 0;
|
||||
|
||||
float
|
||||
CocosQt5AudioBackend::effects_volume = 1.0;
|
||||
|
||||
void
|
||||
CocosQt5AudioBackend::cleanup()
|
||||
{
|
||||
foreach (QMediaPlayer *effect, effects.values()) {
|
||||
delete effect;
|
||||
}
|
||||
|
||||
if (background_music != NULL) {
|
||||
delete background_music;
|
||||
background_music = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CocosQt5AudioBackend::gcEffects()
|
||||
{
|
||||
foreach (int id, effects.keys()) {
|
||||
QMediaPlayer *effect = effects[id];
|
||||
if (effect->state() == QMediaPlayer::StoppedState) {
|
||||
delete effect;
|
||||
effects.remove(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Singleton object */
|
||||
static SimpleAudioEngine *
|
||||
simple_audio_engine = NULL;
|
||||
|
||||
|
||||
/**
|
||||
@brief Get the shared Engine object,it will new one when first time be called
|
||||
*/
|
||||
SimpleAudioEngine *
|
||||
SimpleAudioEngine::getInstance()
|
||||
{
|
||||
if (simple_audio_engine == NULL) {
|
||||
simple_audio_engine = new SimpleAudioEngine;
|
||||
}
|
||||
|
||||
return simple_audio_engine;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Release the shared Engine object
|
||||
@warning It must be called before the application exit, or a memroy leak will be casued.
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::end()
|
||||
{
|
||||
if (simple_audio_engine != NULL) {
|
||||
delete simple_audio_engine;
|
||||
simple_audio_engine = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SimpleAudioEngine::SimpleAudioEngine()
|
||||
{
|
||||
}
|
||||
|
||||
SimpleAudioEngine::~SimpleAudioEngine()
|
||||
{
|
||||
// Free sound effects and stop background music
|
||||
CocosQt5AudioBackend::cleanup();
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Preload background music
|
||||
@param pszFilePath The path of the background music file,or the FileName of T_SoundResInfo
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath)
|
||||
{
|
||||
QString filename = fullPath(pszFilePath);
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Play background music
|
||||
@param pszFilePath The path of the background music file,or the FileName of T_SoundResInfo
|
||||
@param bLoop Whether the background music loop or not
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop)
|
||||
{
|
||||
QString filename = fullPath(pszFilePath);
|
||||
|
||||
CocosQt5AudioBackend::player()->setMedia(QUrl::fromLocalFile(filename));
|
||||
if (bLoop) {
|
||||
// TODO: Set QMediaPlayer to loop infinitely
|
||||
}
|
||||
CocosQt5AudioBackend::player()->play();
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Stop playing background music
|
||||
@param bReleaseData If release the background music data or not.As default value is false
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::stopBackgroundMusic(bool bReleaseData)
|
||||
{
|
||||
CocosQt5AudioBackend::player()->stop();
|
||||
|
||||
if (bReleaseData) {
|
||||
CocosQt5AudioBackend::player()->setMedia(QMediaContent());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Pause playing background music
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::pauseBackgroundMusic()
|
||||
{
|
||||
CocosQt5AudioBackend::player()->pause();
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Resume playing background music
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::resumeBackgroundMusic()
|
||||
{
|
||||
CocosQt5AudioBackend::player()->play();
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Rewind playing background music
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::rewindBackgroundMusic()
|
||||
{
|
||||
CocosQt5AudioBackend::player()->stop();
|
||||
CocosQt5AudioBackend::player()->setPosition(0);
|
||||
CocosQt5AudioBackend::player()->play();
|
||||
}
|
||||
|
||||
bool
|
||||
SimpleAudioEngine::willPlayBackgroundMusic()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Whether the background music is playing
|
||||
@return If is playing return true,or return false
|
||||
*/
|
||||
bool
|
||||
SimpleAudioEngine::isBackgroundMusicPlaying()
|
||||
{
|
||||
return (CocosQt5AudioBackend::player()->state() == QMediaPlayer::PlayingState);
|
||||
}
|
||||
|
||||
/**
|
||||
@brief The volume of the background music max value is 1.0,the min value is 0.0
|
||||
*/
|
||||
float
|
||||
SimpleAudioEngine::getBackgroundMusicVolume()
|
||||
{
|
||||
return (float)(CocosQt5AudioBackend::player()->volume()) / 100.;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief set the volume of background music
|
||||
@param volume must be in 0.0~1.0
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::setBackgroundMusicVolume(float volume)
|
||||
{
|
||||
CocosQt5AudioBackend::player()->setVolume(100. * volume);
|
||||
}
|
||||
|
||||
/**
|
||||
@brief The volume of the effects max value is 1.0,the min value is 0.0
|
||||
*/
|
||||
float
|
||||
SimpleAudioEngine::getEffectsVolume()
|
||||
{
|
||||
return CocosQt5AudioBackend::effects_volume;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief set the volume of sound effecs
|
||||
@param volume must be in 0.0~1.0
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::setEffectsVolume(float volume)
|
||||
{
|
||||
CocosQt5AudioBackend::setEffectsVolume(volume);
|
||||
}
|
||||
|
||||
// for sound effects
|
||||
/**
|
||||
@brief Play sound effect
|
||||
@param pszFilePath The path of the effect file,or the FileName of T_SoundResInfo
|
||||
@bLoop Whether to loop the effect playing, default value is false
|
||||
*/
|
||||
unsigned int
|
||||
SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop,
|
||||
float pitch, float pan, float gain)
|
||||
{
|
||||
// TODO: Handle pitch, pan and gain
|
||||
|
||||
CocosQt5AudioBackend::gcEffects();
|
||||
|
||||
QString filename = fullPath(pszFilePath);
|
||||
int id = CocosQt5AudioBackend::next_effect_id++;
|
||||
|
||||
QMediaPlayer *effect = new QMediaPlayer;
|
||||
effect->setMedia(QUrl::fromLocalFile(filename));
|
||||
effect->setVolume(CocosQt5AudioBackend::effects_volume * 100.0);
|
||||
if (bLoop) {
|
||||
// TODO: Set QMediaPlayer to loop infinitely
|
||||
}
|
||||
effect->play();
|
||||
|
||||
CocosQt5AudioBackend::effects[id] = effect;
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Pause playing sound effect
|
||||
@param nSoundId The return value of function playEffect
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::pauseEffect(unsigned int nSoundId)
|
||||
{
|
||||
if (CocosQt5AudioBackend::effects.contains(nSoundId)) {
|
||||
QMediaPlayer *effect = CocosQt5AudioBackend::effects[nSoundId];
|
||||
effect->pause();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Pause all playing sound effect
|
||||
@param nSoundId The return value of function playEffect
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::pauseAllEffects()
|
||||
{
|
||||
foreach (QMediaPlayer *effect, CocosQt5AudioBackend::effects.values()) {
|
||||
effect->pause();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Resume playing sound effect
|
||||
@param nSoundId The return value of function playEffect
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::resumeEffect(unsigned int nSoundId)
|
||||
{
|
||||
if (CocosQt5AudioBackend::effects.contains(nSoundId)) {
|
||||
QMediaPlayer *effect = CocosQt5AudioBackend::effects[nSoundId];
|
||||
effect->play();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Resume all playing sound effect
|
||||
@param nSoundId The return value of function playEffect
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::resumeAllEffects()
|
||||
{
|
||||
foreach (QMediaPlayer *effect, CocosQt5AudioBackend::effects.values()) {
|
||||
if (effect->state() == QMediaPlayer::PausedState) {
|
||||
effect->play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Stop playing sound effect
|
||||
@param nSoundId The return value of function playEffect
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::stopEffect(unsigned int nSoundId)
|
||||
{
|
||||
if (CocosQt5AudioBackend::effects.contains(nSoundId)) {
|
||||
QMediaPlayer *effect = CocosQt5AudioBackend::effects[nSoundId];
|
||||
CocosQt5AudioBackend::effects.remove(nSoundId);
|
||||
delete effect;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Stop all playing sound effects
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::stopAllEffects()
|
||||
{
|
||||
foreach (QMediaPlayer *effect, CocosQt5AudioBackend::effects.values()) {
|
||||
delete effect;
|
||||
}
|
||||
CocosQt5AudioBackend::effects.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
@brief preload a compressed audio file
|
||||
@details the compressed audio will be decode to wave, then write into an
|
||||
internal buffer in SimpleAudioEngine
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::preloadEffect(const char* pszFilePath)
|
||||
{
|
||||
QString filename = fullPath(pszFilePath);
|
||||
}
|
||||
|
||||
/**
|
||||
@brief unload the preloaded effect from internal buffer
|
||||
@param[in] pszFilePath The path of the effect file,or the FileName of T_SoundResInfo
|
||||
*/
|
||||
void
|
||||
SimpleAudioEngine::unloadEffect(const char* pszFilePath)
|
||||
{
|
||||
QString filename = fullPath(pszFilePath);
|
||||
}
|
||||
|
||||
} /* end namespace CocosDenshion */
|
|
@ -1,81 +0,0 @@
|
|||
LBITS := $(shell getconf LONG_BIT)
|
||||
ifeq ($(LBITS),64)
|
||||
FMODEX = libfmodex64
|
||||
FMODEXL = libfmodexL64
|
||||
VERSION = 4.38.00
|
||||
LIBDIR = lib64/api/lib
|
||||
HDRDIR = lib64/api/inc
|
||||
else
|
||||
FMODEX = libfmodex
|
||||
FMODEXL = libfmodexL
|
||||
VERSION = 4.36.01
|
||||
LIBDIR = api/lib
|
||||
HDRDIR = api/inc
|
||||
endif
|
||||
|
||||
DESTLIBDIR = /usr/local/lib
|
||||
DESTHDRDIR = /usr/local/include/fmodex
|
||||
|
||||
all:
|
||||
@echo "Possible targets:"
|
||||
@echo "'make fmod_examples' - Build all examples"
|
||||
@echo "'make install' - Install FMOD Ex libraries and headers"
|
||||
@echo "'make uninstall' - Uninstall FMOD Ex libraries and headers"
|
||||
|
||||
fmod_examples:
|
||||
cd examples/3d && make
|
||||
cd examples/cdplayer && make
|
||||
cd examples/channelgroups && make
|
||||
cd examples/dsp_effectperspeaker && make
|
||||
cd examples/dsp_custom && make
|
||||
cd examples/effects && make
|
||||
cd examples/filecallbacks && make
|
||||
cd examples/generatetone && make
|
||||
cd examples/loadfrommemory && make
|
||||
cd examples/multiplesoundcard && make
|
||||
cd examples/multispeakeroutput && make
|
||||
cd examples/netstream && make
|
||||
cd examples/offlinedecoding && make
|
||||
cd examples/pitchdetection && make
|
||||
cd examples/playlist && make
|
||||
cd examples/playsound && make
|
||||
cd examples/playstream && make
|
||||
cd examples/plugin_dev/codec_raw && make
|
||||
cd examples/plugin_dev/dsp_gain && make
|
||||
cd examples/readtags && make
|
||||
cd examples/realtimestitching && make
|
||||
cd examples/recording && make
|
||||
cd examples/recordtodisk && make
|
||||
cd examples/ripnetstream && make
|
||||
cd examples/submixing && make
|
||||
cd examples/useplugins && make
|
||||
cd examples/usercreatedsound && make
|
||||
cd fmoddesignerapi/examples/effects && make
|
||||
cd fmoddesignerapi/examples/info_only && make
|
||||
cd fmoddesignerapi/examples/load_data && make
|
||||
cd fmoddesignerapi/examples/max_playbacks && make
|
||||
cd fmoddesignerapi/examples/parameters && make
|
||||
cd fmoddesignerapi/examples/programmer_selected && make
|
||||
cd fmoddesignerapi/examples/programmer_sound && make
|
||||
cd fmoddesignerapi/examples/simple_event && make
|
||||
|
||||
install:
|
||||
@echo "Installing FMOD Ex libraries and headers..."
|
||||
cp -f ${LIBDIR}/${FMODEX}-${VERSION}.so ${DESTLIBDIR}
|
||||
cp -f ${LIBDIR}/${FMODEXL}-${VERSION}.so ${DESTLIBDIR}
|
||||
ln -s -f ${DESTLIBDIR}/${FMODEX}-${VERSION}.so ${DESTLIBDIR}/${FMODEX}.so
|
||||
ln -s -f ${DESTLIBDIR}/${FMODEXL}-${VERSION}.so ${DESTLIBDIR}/${FMODEXL}.so
|
||||
ldconfig -n ${DESTLIBDIR}
|
||||
mkdir -p ${DESTHDRDIR}
|
||||
cp -f ${HDRDIR}/*.h* ${DESTHDRDIR}
|
||||
@echo "done."
|
||||
|
||||
uninstall:
|
||||
@echo "Uninstalling FMOD Ex libraries..."
|
||||
rm -f ${DESTLIBDIR}/${FMODEX}.so
|
||||
rm -f ${DESTLIBDIR}/${FMODEXL}.so
|
||||
rm -f ${DESTLIBDIR}/${FMODEX}-${VERSION}.so
|
||||
rm -f ${DESTLIBDIR}/${FMODEXL}-${VERSION}.so
|
||||
ldconfig -n ${DESTLIBDIR}
|
||||
rm -rf ${DESTHDRDIR}
|
||||
@echo "done."
|
|
@ -1,65 +0,0 @@
|
|||
VERSION = 4.38.00
|
||||
LIBDIR = api/lib
|
||||
HDRDIR = api/inc
|
||||
DESTLIBDIR = /usr/local/lib
|
||||
DESTHDRDIR = /usr/local/include/fmodex
|
||||
|
||||
all:
|
||||
@echo "Possible targets:"
|
||||
@echo "'make fmod_examples' - Build all examples"
|
||||
@echo "'make install' - Install FMOD Ex libraries and headers"
|
||||
@echo "'make uninstall' - Uninstall FMOD Ex libraries and headers"
|
||||
|
||||
fmod_examples:
|
||||
cd examples/3d && make
|
||||
cd examples/cdplayer && make
|
||||
cd examples/channelgroups && make
|
||||
cd examples/dsp_effectperspeaker && make
|
||||
cd examples/dsp_custom && make
|
||||
cd examples/effects && make
|
||||
cd examples/filecallbacks && make
|
||||
cd examples/generatetone && make
|
||||
cd examples/loadfrommemory && make
|
||||
cd examples/multiplesoundcard && make
|
||||
cd examples/multispeakeroutput && make
|
||||
cd examples/netstream && make
|
||||
cd examples/offlinedecoding && make
|
||||
cd examples/pitchdetection && make
|
||||
cd examples/playlist && make
|
||||
cd examples/playsound && make
|
||||
cd examples/playstream && make
|
||||
cd examples/plugin_dev/codec_raw && make
|
||||
cd examples/plugin_dev/dsp_gain && make
|
||||
cd examples/readtags && make
|
||||
cd examples/realtimestitching && make
|
||||
cd examples/recording && make
|
||||
cd examples/recordtodisk && make
|
||||
cd examples/ripnetstream && make
|
||||
cd examples/submixing && make
|
||||
cd examples/useplugins && make
|
||||
cd examples/usercreatedsound && make
|
||||
cd fmoddesignerapi/examples/effects && make
|
||||
cd fmoddesignerapi/examples/info_only && make
|
||||
cd fmoddesignerapi/examples/load_data && make
|
||||
cd fmoddesignerapi/examples/max_playbacks && make
|
||||
cd fmoddesignerapi/examples/parameters && make
|
||||
cd fmoddesignerapi/examples/programmer_selected && make
|
||||
cd fmoddesignerapi/examples/programmer_sound && make
|
||||
cd fmoddesignerapi/examples/simple_event && make
|
||||
|
||||
install:
|
||||
@echo "Installing FMOD Ex libraries and headers..."
|
||||
cp -f ${LIBDIR}/libfmodex64-${VERSION}.so ${DESTLIBDIR}
|
||||
cp -f ${LIBDIR}/libfmodexL64-${VERSION}.so ${DESTLIBDIR}
|
||||
ldconfig -n ${DESTLIBDIR}
|
||||
mkdir -p ${DESTHDRDIR}
|
||||
cp -f ${HDRDIR}/*.h* ${DESTHDRDIR}
|
||||
@echo "done."
|
||||
|
||||
uninstall:
|
||||
@echo "Uninstalling FMOD Ex libraries..."
|
||||
rm -f ${DESTLIBDIR}/libfmodex64-${VERSION}.so
|
||||
rm -f ${DESTLIBDIR}/libfmodexL64-${VERSION}.so
|
||||
ldconfig -n ${DESTLIBDIR}
|
||||
rm -rf ${DESTHDRDIR}
|
||||
@echo "done."
|
|
@ -1,60 +0,0 @@
|
|||
* Need to figure out how to get correct screen resolutions consistently.
|
||||
|
||||
* Touch handler screwed up after TouchesTest? MenuTest? (TestCpp sample)
|
||||
|
||||
* TTF Font rendering is slow and seems to wrap around by a few pixels
|
||||
horizontally. Need to investigate here, but I suspect the right answer is to
|
||||
offload font rendering to an offscreen canvas and let the browser handle it.
|
||||
Potentially creates new challenges in packaging which would need to be solved
|
||||
somehow.
|
||||
|
||||
|
||||
|
||||
###
|
||||
DONE:
|
||||
###
|
||||
|
||||
* Need to switch to server-side buffers in
|
||||
- cocos2dx/draw_nodes/CCDrawingPrimitives
|
||||
|
||||
* Need to compile with -O2 -- possible -s VERBOSE=1 will give a clue?
|
||||
|
||||
* SchedulerTest crashes
|
||||
- cocos2d::CCNode::boundingBox()
|
||||
|
||||
* Parallax Test crashes
|
||||
- cocos2d::CCAtlasNode::calculateMaxItems()
|
||||
|
||||
* Particle Test crashes
|
||||
- TIFFClientOpen not a function. Looks like we need to build and link in libtiff.
|
||||
|
||||
* cocos2d::CCAtlasNode::calculateMaxItems() throwing an error; related to
|
||||
CCTextureAtlas? Preventing particle test from working.
|
||||
|
||||
* Need to switch to server-side buffers in
|
||||
- cocos2dx/draw_nodes/CCDrawNode.cpp -- Think this is fixed by undef CC_TEXTURE_ATLAS_USE_VAO?
|
||||
- cocos2dx/particle_nodes/CCParticleSystemQuad.cpp -- Think this is fixed by CC_REBIND_INDICES_BUFFER?
|
||||
- cocos2dx/textures/CCTextureAtlas.cpp -- Think this works already.
|
||||
|
||||
* Layer Test crashes
|
||||
- cocos2d::CCLabelBMFont::create(char const*, char const*, float, cocos2d::CCTextAlignment, cocos2d::CCPoint)
|
||||
|
||||
* IntervalTest crashes
|
||||
- cocos2d::CCLabelBMFont::create(char const*, char const*, float, cocos2d::CCTextAlignment, cocos2d::CCPoint)
|
||||
|
||||
* TileMap Test crashes
|
||||
- void CCNode::insertChild(CCNode* child, int z)
|
||||
|
||||
* LabelTest crashes
|
||||
- cocos2d::CCAtlasNode::calculateMaxItems()
|
||||
|
||||
* ZwoptexTest crashes.
|
||||
- ZwoptexGenericTest::onEnter()
|
||||
|
||||
* ChipmunkTest crashes:
|
||||
Aborting due to Chipmunk error: Moment of Inertia must be positive and non-zero.
|
||||
Failed condition: moment > 0.0f
|
||||
Source:../src/cpBody.c:151
|
||||
|
||||
* Add linkage to libjpeg to get RenderTexture test to work.
|
||||
|
70
Makefile
70
Makefile
|
@ -1,70 +0,0 @@
|
|||
PLATFORM ?= linux
|
||||
|
||||
all:
|
||||
|
||||
chipmunk:
|
||||
$(MAKE) -C external/chipmunk/proj.$(PLATFORM)
|
||||
chipmunk-clean:
|
||||
$(MAKE) -C external/chipmunk/proj.$(PLATFORM) clean
|
||||
|
||||
box2d:
|
||||
$(MAKE) -C external/Box2D/proj.$(PLATFORM)
|
||||
box2d-clean:
|
||||
$(MAKE) -C external/Box2D/proj.$(PLATFORM) clean
|
||||
|
||||
libextensions: chipmunk cocosdenshion box2d
|
||||
$(MAKE) -C extensions/proj.$(PLATFORM)
|
||||
libextensions-clean:
|
||||
$(MAKE) -C extensions/proj.$(PLATFORM) clean
|
||||
|
||||
libcocos2dx: libextensions
|
||||
$(MAKE) -C cocos2dx/proj.$(PLATFORM)
|
||||
libcocos2dx-clean:
|
||||
$(MAKE) -C cocos2dx/proj.$(PLATFORM) clean
|
||||
|
||||
cocosdenshion: libcocos2dx
|
||||
$(MAKE) -C CocosDenshion/proj.$(PLATFORM)
|
||||
cocosdenshion-clean:
|
||||
$(MAKE) -C CocosDenshion/proj.$(PLATFORM) clean
|
||||
|
||||
lua: libextensions
|
||||
$(MAKE) -C scripting/lua/proj.$(PLATFORM)
|
||||
lua-clean:
|
||||
$(MAKE) -C scripting/lua/proj.$(PLATFORM) clean
|
||||
|
||||
hellocpp: libcocos2dx
|
||||
$(MAKE) -C samples/Cpp/HelloCpp/proj.$(PLATFORM)
|
||||
hellocpp-clean:
|
||||
$(MAKE) -C samples/Cpp/HelloCpp/proj.$(PLATFORM) clean
|
||||
|
||||
testcpp: libcocos2dx libextensions
|
||||
$(MAKE) -C samples/Cpp/TestCpp/proj.$(PLATFORM)
|
||||
testcpp-clean:
|
||||
$(MAKE) -C samples/Cpp/TestCpp/proj.$(PLATFORM) clean
|
||||
|
||||
simplegame: libcocos2dx
|
||||
$(MAKE) -C samples/Cpp/SimpleGame/proj.$(PLATFORM)
|
||||
simplegame-clean:
|
||||
$(MAKE) -C samples/Cpp/SimpleGame/proj.$(PLATFORM) clean
|
||||
|
||||
all: chipmunk cocosdenshion libextensions libcocos2dx lua hellocpp testcpp simplegame
|
||||
clean: libcocos2dx-clean box2d-clean chipmunk-clean cocosdenshion-clean libextensions-clean lua-clean hellocpp-clean testcpp-clean simplegame-clean
|
||||
|
||||
# Haven't yet got the lua projects working with emscripten
|
||||
ifneq ($(PLATFORM),emscripten)
|
||||
|
||||
hellolua: libcocos2dx lua
|
||||
$(MAKE) -C samples/Lua/HelloLua/proj.$(PLATFORM)
|
||||
hellolua-clean:
|
||||
$(MAKE) -C samples/Lua/HelloLua/proj.$(PLATFORM) clean
|
||||
|
||||
testlua: libcocos2dx lua
|
||||
$(MAKE) -C samples/Lua/TestLua/proj.$(PLATFORM)
|
||||
testlua-clean:
|
||||
$(MAKE) -C samples/Lua/TestLua/proj.$(PLATFORM) clean
|
||||
|
||||
all: hellolua testlua
|
||||
clean: hellolua-clean testlua-clean
|
||||
endif
|
||||
|
||||
.PHONY: all clean
|
31
README.md
31
README.md
|
@ -23,14 +23,15 @@ How to start a new game
|
|||
-----------------------
|
||||
|
||||
1. Download the code from [cocos2d download site][4]
|
||||
2. Enter `tools/project-creator`
|
||||
|
||||
2. Run the `create-multi-platform-projects.py` script
|
||||
2. Run the `create-projects.py` script
|
||||
|
||||
Example:
|
||||
|
||||
$ cd cocos2d-x
|
||||
$ ./create-multi-platform-projects.py -p mygame -k com.your_company.mygame -l cpp
|
||||
$ cd projects/mygame
|
||||
$ cd cocos2d-x/tools/project-creator
|
||||
$ ./create-multi-platform-projects.py -p mygame -k com.your_company.mygame -l cpp
|
||||
$ cd ../../projects/mygame
|
||||
|
||||
|
||||
Main features
|
||||
|
@ -69,7 +70,7 @@ Build Requirements
|
|||
------------------
|
||||
|
||||
* Mac OS X 10.7+, Xcode 4.6+
|
||||
* or Ubuntu 13.04+
|
||||
* or Ubuntu 12.10+, CMake 2.6+
|
||||
* or Windows 7+, VS 2012+
|
||||
|
||||
|
||||
|
@ -79,9 +80,6 @@ Runtime Requirements
|
|||
* Android 2.3+ for Android games
|
||||
* OS X v10.6+ for Mac games
|
||||
* Windows 7+ for Win games
|
||||
* Tizen 2.2+
|
||||
* Emscripten
|
||||
* Google Native Client
|
||||
|
||||
|
||||
Running Tests
|
||||
|
@ -92,28 +90,31 @@ Select the test you want from Xcode Scheme chooser.
|
|||
* For OS X / iOS
|
||||
|
||||
```
|
||||
$ cd cocos2d-x/samples
|
||||
$ cd cocos2d-x/build
|
||||
$ open samples.xcodeproj
|
||||
```
|
||||
|
||||
* For Linux
|
||||
|
||||
```
|
||||
$ cd cocos2d-x
|
||||
$ ./make-all-linux-projects.sh
|
||||
$ cd cocos2d-x/build
|
||||
$ ./install-deps-linux.sh
|
||||
$ cmake ..
|
||||
$ make
|
||||
```
|
||||
|
||||
or open the `cocos2d-x/cocos2dx-qt5.pro` file using QT Creator 5.
|
||||
You may meet building errors when building libGLFW.so. It is because libGL.so directs to an error target,
|
||||
you should make it to direct to a correct one. `install-deps-linux.sh` only has to be run onece.
|
||||
|
||||
* For Windows
|
||||
|
||||
Open the `cocos2d-x/cocos2d-win32.vc2012.sln`
|
||||
Open the `cocos2d-x/build/cocos2d-win32.vc2012.sln`
|
||||
|
||||
* For Android
|
||||
|
||||
```
|
||||
$ cd cocos2d-x/samples/Cpp/HelloCpp/proj.android
|
||||
$ ./build_native.sh
|
||||
$ cd cocos2d-x/build
|
||||
$ python ./android-build.py hellocpp
|
||||
```
|
||||
|
||||
Import HelloCpp Android project using Eclipse(released with Android SDK). The path to be imported is `cocos2d-x/samples/Cpp/HelloCpp/proj.android`.
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Build script to build all components for emscripten.
|
||||
#
|
||||
# By default this script will build the 'all' target in
|
||||
# both debug and release configurations. Pass "clean" to
|
||||
# clean all configuration.
|
||||
|
||||
SCRIPT_DIR=$(dirname ${BASH_SOURCE})
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
if [ "$PYTHON" == "" ]; then
|
||||
command -v python >/dev/null 2>&1 || (echo "Please install python and set \$PYTHON" && exit 1)
|
||||
PYTHON=`which python`
|
||||
fi
|
||||
|
||||
if [ "$LLVM" == "" ]; then
|
||||
command -v clang >/dev/null 2>&1 || (echo "Please install LLVM and clang, and set \$LLVM" && exit 1)
|
||||
LLVM=$(dirname `which clang`)
|
||||
fi
|
||||
|
||||
export LLVM_ROOT=$LLVM
|
||||
|
||||
make PLATFORM=emscripten DEBUG=1 -j10 $*
|
||||
make PLATFORM=emscripten DEBUG=0 -j10 $*
|
|
@ -1,45 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Build script to build all components for Native Client.
|
||||
#
|
||||
# By default this script will build the 'all' target in
|
||||
# both debug and release configurations. Pass "clean" to
|
||||
# clean all configuration.
|
||||
#
|
||||
# Before running this script you need to set NACL_SDK_ROOT
|
||||
# and add the NaCl compiler bin folder to your path.
|
||||
#
|
||||
# There are several libraries from naclports that are
|
||||
# prerequisite for building cocos2dx on NaCl. These ship
|
||||
# with recent versions of the NaCl SDK or you can build
|
||||
# them yourself by checking out naclports and running:
|
||||
# $ make png tiff freetype xml2 freealut jpeg vorbis ogg
|
||||
|
||||
if [ -z "$NACL_SDK_ROOT" ]; then
|
||||
echo "Please set \$NACL_SDK_ROOT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SCRIPT_DIR=$(dirname ${BASH_SOURCE})
|
||||
OUTPUT_DEBUG=lib/nacl/Debug/
|
||||
OUTPUT_RELEASE=lib/nacl/Release/
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
mkdir -p $OUTPUT_DEBUG
|
||||
mkdir -p $OUTPUT_RELEASE
|
||||
|
||||
export MAKEFLAGS="-j10 PLATFORM=nacl"
|
||||
|
||||
make NACL_ARCH=x86_64 DEBUG=1 $*
|
||||
make NACL_ARCH=x86_64 DEBUG=0 $*
|
||||
|
||||
make NACL_ARCH=i686 DEBUG=1 $*
|
||||
make NACL_ARCH=i686 DEBUG=0 $*
|
||||
|
||||
if [ "${NACL_GLIBC:-}" != "1" ]; then
|
||||
make NACL_ARCH=arm DEBUG=1 $*
|
||||
make NACL_ARCH=arm DEBUG=0 $*
|
||||
fi
|
|
@ -1,89 +0,0 @@
|
|||
@echo off
|
||||
|
||||
echo./*
|
||||
echo. * Check VC++ environment...
|
||||
echo. */
|
||||
echo.
|
||||
|
||||
if defined VS110COMNTOOLS (
|
||||
set VSTOOLS="%VS110COMNTOOLS%"
|
||||
set VC_VER=110
|
||||
)
|
||||
|
||||
|
||||
|
||||
set VSTOOLS=%VSTOOLS:"=%
|
||||
set "VSTOOLS=%VSTOOLS:\=/%"
|
||||
|
||||
set VSVARS="%VSTOOLS%vsvars32.bat"
|
||||
|
||||
if not defined VSVARS (
|
||||
echo Can't find VC2012 installed!
|
||||
goto ERROR
|
||||
)
|
||||
|
||||
echo./*
|
||||
echo. * Building cocos2d-x library binary, please wait a while...
|
||||
echo. */
|
||||
echo.
|
||||
|
||||
call %VSVARS%
|
||||
if %VC_VER%==110 (
|
||||
msbuild cocos2d-win32.vc2012.sln /t:Clean
|
||||
msbuild cocos2d-win32.vc2012.sln /p:Configuration="Debug" /m
|
||||
msbuild cocos2d-win32.vc2012.sln /p:Configuration="Release" /m
|
||||
) else (
|
||||
echo Script error.
|
||||
goto ERROR
|
||||
)
|
||||
|
||||
echo./*
|
||||
echo. * Check the cocos2d-win32 application "TestCpp.exe" ...
|
||||
echo. */
|
||||
echo.
|
||||
|
||||
pushd ".\Release.win32\"
|
||||
|
||||
set CC_TEST_BIN=TestCpp.exe
|
||||
|
||||
set CC_TEST_RES=..\samples\Cpp\TestCpp\Resources
|
||||
set CC_HELLOWORLD_RES=..\samples\Cpp\HelloCpp\Resources
|
||||
set CC_TESTLUA_RES=..\samples\Lua\TestLua\Resources
|
||||
set CC_SIMPLEGAME_RES=..\samples\Cpp\SimpleGame\Resources
|
||||
set CC_HELLOLUA_RES=..\samples\Lua\HelloLua\Resources
|
||||
set CC_JSB_SOURCES=..\scripting\javascript\bindings\js
|
||||
set CC_TESTJS_RES=..\samples\Javascript\Shared\tests
|
||||
set CC_DRAGONJS_RES=..\samples\Javascript\Shared\games\CocosDragonJS\Published files iOS
|
||||
set CC_MOONWARRIORS_RES=..\samples\Javascript\Shared\games\MoonWarriors
|
||||
set CC_WATERMELONWITHME_RES=..\samples\Javascript\Shared\games\WatermelonWithMe
|
||||
|
||||
|
||||
echo./*
|
||||
echo. * Run cocos2d-win32 tests.exe and view Cocos2d-x Application Wizard for Visual Studio User Guide.
|
||||
echo. */
|
||||
echo.
|
||||
xcopy /E /Y /Q "%CC_TEST_RES%" .
|
||||
xcopy /E /Y /Q "%CC_HELLOWORLD_RES%" .
|
||||
xcopy /E /Y /Q "%CC_HELLOLUA_RES%" .
|
||||
xcopy /E /Y /Q "%CC_TESTLUA_RES%" .
|
||||
xcopy /E /Y /Q "%CC_SIMPLEGAME_RES%" .
|
||||
xcopy /E /Y /Q "%CC_JSB_SOURCES%" .
|
||||
xcopy /E /Y /Q "%CC_TESTJS_RES%" .
|
||||
xcopy /E /Y /Q "%CC_MOONWARRIORS_RES%" .
|
||||
xcopy /E /Y /Q "%CC_WATERMELONWITHME_RES%" .
|
||||
xcopy /E /Y /Q "%CC_DRAGONJS_RES%" .
|
||||
|
||||
if not exist "%CC_TEST_BIN%" (
|
||||
echo Can't find the binary "TestCpp.exe", is there build error?
|
||||
goto ERROR
|
||||
)
|
||||
|
||||
call "%CC_TEST_BIN%"
|
||||
popd
|
||||
|
||||
goto EOF
|
||||
|
||||
:ERROR
|
||||
pause
|
||||
|
||||
:EOF
|
|
@ -0,0 +1,13 @@
|
|||
macro(pre_build TARGET_NAME)
|
||||
add_custom_target( ${TARGET_NAME}_PRE_BUILD ALL )
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${TARGET_NAME}_PRE_BUILD
|
||||
${ARGN}
|
||||
PRE_BUILD
|
||||
COMMENT "${TARGET_NAME}_PRE_BUILD ..."
|
||||
)
|
||||
|
||||
add_custom_target( ${TARGET_NAME}_CORE_PRE_BUILD )
|
||||
add_dependencies( ${TARGET_NAME}_PRE_BUILD ${TARGET_NAME}_CORE_PRE_BUILD )
|
||||
endmacro()
|
|
@ -0,0 +1,227 @@
|
|||
#!/usr/bin/python
|
||||
# android-build.py
|
||||
# Build android samples
|
||||
|
||||
import sys
|
||||
import os, os.path
|
||||
import shutil
|
||||
from optparse import OptionParser
|
||||
|
||||
CPP_SAMPLES = ['hellocpp', 'testcpp', 'simplegame', 'assetsmanager']
|
||||
LUA_SAMPLES = ['hellolua', 'testlua']
|
||||
JSB_SAMPLES = ['cocosdragon', 'crystalcraze', 'moonwarriors', 'testjavascript', 'watermelonwithme']
|
||||
ALL_SAMPLES = CPP_SAMPLES + LUA_SAMPLES + JSB_SAMPLES
|
||||
|
||||
|
||||
def usage():
|
||||
|
||||
print """%s [-n ndk-build-parameter] target.
|
||||
|
||||
Valid targets are: [hellocpp|testcpp|simplegame|assetsmanager|hellolua|testlua|cocosdragon
|
||||
|crystalcraze|moonwarriors|testjavascript|watermelonwithme]
|
||||
|
||||
You can use [all|cpp|lua|jsb], to build all, or all the C++, or all the Lua, or all the JavaScript samples respectevely.""" % sys.argv[0]
|
||||
|
||||
def check_environment_variables():
|
||||
''' Checking the environment NDK_ROOT, which will be used for building
|
||||
'''
|
||||
|
||||
try:
|
||||
NDK_ROOT = os.environ['NDK_ROOT']
|
||||
except Exception:
|
||||
print "NDK_ROOT not defined. Please define NDK_ROOT in your environment"
|
||||
sys.exit(1)
|
||||
|
||||
return NDK_ROOT
|
||||
|
||||
def select_toolchain_version():
|
||||
'''Because ndk-r8e uses gcc4.6 as default. gcc4.6 doesn't support c++11. So we should select gcc4.7 when
|
||||
using ndk-r8e. But gcc4.7 is removed in ndk-r9, so we should determine whether gcc4.7 exist.
|
||||
Conclution:
|
||||
ndk-r8e -> use gcc4.7
|
||||
ndk-r9 -> use gcc4.8
|
||||
'''
|
||||
|
||||
ndk_root = check_environment_variables()
|
||||
if os.path.isdir(os.path.join(ndk_root,"toolchains/arm-linux-androideabi-4.8")):
|
||||
os.environ['NDK_TOOLCHAIN_VERSION'] = '4.8'
|
||||
print "The Selected NDK toolchain version was 4.8 !"
|
||||
elif os.path.isdir(os.path.join(ndk_root,"toolchains/arm-linux-androideabi-4.7")):
|
||||
os.environ['NDK_TOOLCHAIN_VERSION'] = '4.7'
|
||||
print "The Selected NDK toolchain version was 4.7 !"
|
||||
else:
|
||||
print "Couldn't find the gcc toolchain."
|
||||
exit(1)
|
||||
|
||||
def caculate_built_samples(args):
|
||||
''' Compute the sampels to be built
|
||||
'cpp' for short of all cpp samples
|
||||
'lua' for short of all lua smpleas
|
||||
'jsb' for short of all javascript samples
|
||||
'''
|
||||
|
||||
if 'all' in args:
|
||||
return ALL_SAMPLES
|
||||
|
||||
targets = []
|
||||
if 'cpp' in args:
|
||||
targets += CPP_SAMPLES
|
||||
args.remove('cpp')
|
||||
if 'lua' in args:
|
||||
targets += LUA_SAMPLES
|
||||
args.remove('lua')
|
||||
if 'jsb' in args:
|
||||
targets += JSB_SAMPLES
|
||||
args.remove('jsb')
|
||||
|
||||
targets += args
|
||||
|
||||
# remove duplicate elements, for example
|
||||
# python android-build.py cpp hellocpp
|
||||
targets = set(targets)
|
||||
return list(targets)
|
||||
|
||||
def do_build(cocos_root, ndk_root, app_android_root, ndk_build_param):
|
||||
|
||||
ndk_path = os.path.join(ndk_root, "ndk-build")
|
||||
|
||||
# windows should use ";" to seperate module paths
|
||||
platform = sys.platform
|
||||
if platform == 'win32':
|
||||
ndk_module_path = 'NDK_MODULE_PATH=%s;%s/external;%s/cocos' % (cocos_root, cocos_root, cocos_root)
|
||||
else:
|
||||
ndk_module_path = 'NDK_MODULE_PATH=%s:%s/external:%s/cocos' % (cocos_root, cocos_root, cocos_root)
|
||||
|
||||
if ndk_build_param == None:
|
||||
command = '%s -C %s %s' % (ndk_path, app_android_root, ndk_module_path)
|
||||
else:
|
||||
command = '%s -C %s %s %s' % (ndk_path, app_android_root, ndk_build_param, ndk_module_path)
|
||||
if os.system(command) != 0:
|
||||
raise Exception("Build project [ " + app_android_root + " ] fails!")
|
||||
|
||||
def copy_files(src, dst):
|
||||
|
||||
for item in os.listdir(src):
|
||||
path = os.path.join(src, item)
|
||||
# Android can not package the file that ends with ".gz"
|
||||
if not item.startswith('.') and not item.endswith('.gz') and os.path.isfile(path):
|
||||
shutil.copy(path, dst)
|
||||
if os.path.isdir(path):
|
||||
new_dst = os.path.join(dst, item)
|
||||
os.mkdir(new_dst)
|
||||
copy_files(path, new_dst)
|
||||
|
||||
def copy_resources(target, app_android_root):
|
||||
|
||||
# remove app_android_root/assets if it exists
|
||||
assets_dir = os.path.join(app_android_root, "assets")
|
||||
if os.path.isdir(assets_dir):
|
||||
shutil.rmtree(assets_dir)
|
||||
|
||||
# copy resources(cpp samples and lua samples)
|
||||
os.mkdir(assets_dir)
|
||||
resources_dir = os.path.join(app_android_root, "../Resources")
|
||||
if os.path.isdir(resources_dir):
|
||||
copy_files(resources_dir, assets_dir)
|
||||
|
||||
# jsb samples should copy javascript files and resources(shared with cocos2d-html5)
|
||||
if target in JSB_SAMPLES:
|
||||
resources_dir = os.path.join(app_android_root, "../../../../cocos/scripting/javascript/script")
|
||||
copy_files(resources_dir, assets_dir)
|
||||
|
||||
if target == "cocosdragon":
|
||||
resources_dir = os.path.join(app_android_root, "../../Shared/games/CocosDragonJS/Published files Android")
|
||||
if target == "crystalcraze":
|
||||
resources_dir = os.path.join(app_android_root, "../../Shared/games/CrystalCraze/Published-Android")
|
||||
if target == "testjavascript":
|
||||
resources_dir = os.path.join(app_android_root, "../../Shared/tests/")
|
||||
if target == "watermelonwithme":
|
||||
resources_dir = os.path.join(app_android_root, "../../Shared/games/WatermelonWithMe")
|
||||
if target != "moonwarriors":
|
||||
copy_files(resources_dir, assets_dir)
|
||||
else:
|
||||
resources_dir = os.path.join(app_android_root, "../../Shared/games/MoonWarriors/res")
|
||||
dst_dir = os.path.join(assets_dir, "res")
|
||||
os.mkdir(dst_dir)
|
||||
copy_files(resources_dir, dst_dir)
|
||||
resources_dir = os.path.join(app_android_root, "../../Shared/games/MoonWarriors/src")
|
||||
dst_dir = os.path.join(assets_dir, "src")
|
||||
os.mkdir(dst_dir)
|
||||
copy_files(resources_dir, dst_dir)
|
||||
resources_dir = os.path.join(app_android_root, "../../Shared/games/MoonWarriors")
|
||||
for item in os.listdir(resources_dir):
|
||||
path = os.path.join(resources_dir, item)
|
||||
if item.endswith('.js') and os.path.isfile(path):
|
||||
shutil.copy(path, assets_dir)
|
||||
|
||||
# AssetsManager test should also copy javascript files
|
||||
if target == "assetsmanager":
|
||||
resources_dir = os.path.join(app_android_root, "../../../../cocos/scripting/javascript/script")
|
||||
copy_files(resources_dir, assets_dir)
|
||||
|
||||
# lua samples should copy lua script
|
||||
if target in LUA_SAMPLES:
|
||||
resources_dir = os.path.join(app_android_root, "../../../../cocos/scripting/lua/script")
|
||||
copy_files(resources_dir, assets_dir)
|
||||
|
||||
# TestLua shared resources with TestCpp
|
||||
if target == "testlua":
|
||||
resources_dir = os.path.join(app_android_root, "../../../Cpp/TestCpp/Resources")
|
||||
copy_files(resources_dir, assets_dir)
|
||||
|
||||
def build_samples(target,ndk_build_param):
|
||||
|
||||
ndk_root = check_environment_variables()
|
||||
select_toolchain_version()
|
||||
build_targets = caculate_built_samples(target)
|
||||
|
||||
current_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
cocos_root = os.path.join(current_dir, "..")
|
||||
|
||||
app_android_root = ''
|
||||
for target in build_targets:
|
||||
if target == 'hellocpp':
|
||||
app_android_root = os.path.join(cocos_root, 'samples/Cpp/HelloCpp/proj.android')
|
||||
elif target == 'testcpp':
|
||||
app_android_root = os.path.join(cocos_root, 'samples/Cpp/TestCpp/proj.android')
|
||||
elif target == 'simplegame':
|
||||
app_android_root = os.path.join(cocos_root, 'samples/Cpp/SimpleGame/proj.android')
|
||||
elif target == 'assetsmanager':
|
||||
app_android_root = os.path.join(cocos_root, 'samples/Cpp/AssetsManagerTest/proj.android')
|
||||
elif target == 'hellolua':
|
||||
app_android_root = os.path.join(cocos_root, 'samples/Lua/HelloLua/proj.android')
|
||||
elif target == 'testlua':
|
||||
app_android_root = os.path.join(cocos_root, 'samples/Lua/TestLua/proj.android')
|
||||
elif target == 'cocosdragon':
|
||||
app_android_root = os.path.join(cocos_root, 'samples/Javascript/CocosDragonJS/proj.android')
|
||||
elif target == 'crystalcraze':
|
||||
app_android_root = os.path.join(cocos_root, 'samples/Javascript/CrystalCraze/proj.android')
|
||||
elif target == 'moonwarriors':
|
||||
app_android_root = os.path.join(cocos_root, 'samples/Javascript/MoonWarriors/proj.android')
|
||||
elif target == 'testjavascript':
|
||||
app_android_root = os.path.join(cocos_root, 'samples/Javascript/TestJavascript/proj.android')
|
||||
elif target == 'watermelonwithme':
|
||||
app_android_root = os.path.join(cocos_root, 'samples/Javascript/WatermelonWithMe/proj.android')
|
||||
else:
|
||||
print 'unknown target: %s' % target
|
||||
continue
|
||||
|
||||
copy_resources(target, app_android_root)
|
||||
do_build(cocos_root, ndk_root, app_android_root, ndk_build_param)
|
||||
|
||||
# -------------- main --------------
|
||||
if __name__ == '__main__':
|
||||
|
||||
#parse the params
|
||||
parser = OptionParser()
|
||||
parser.add_option("-n", "--ndk", dest="ndk_build_param", help='parameter for ndk-build')
|
||||
(opts, args) = parser.parse_args()
|
||||
|
||||
if len(args) == 0:
|
||||
usage()
|
||||
else:
|
||||
try:
|
||||
build_samples(args, opts.ndk_build_param)
|
||||
except Exception as e:
|
||||
print e
|
||||
sys.exit(1)
|
|
@ -0,0 +1,211 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp", "..\samples\Cpp\HelloCpp\proj.win32\HelloCpp.vcxproj", "{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBox2D", "..\external\Box2D\proj.win32\Box2D.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCpp", "..\samples\Cpp\TestCpp\proj.win32\TestCpp.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosBuilder", "..\cocos\editor-support\cocosbuilder\proj.win32\libCocosBuilder.vcxproj", "{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj", "{B57CF53F-2E49-4031-9822-047CC0E6BDE2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\cocos\gui\proj.win32\libGUI.vcxproj", "{7E06E92C-537A-442B-9E4A-4761C84F8A1A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libNetwork", "..\cocos\network\proj.win32\libNetwork.vcxproj", "{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AssetsManagerTest", "..\samples\Cpp\AssetsManagerTest\proj.win32\AssetsManagerTest.vcxproj", "{6D37505F-A890-441D-BD3F-A61E2C0469CE}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBinding", "..\cocos\scripting\javascript\bindings\proj.win32\libJSBinding.vcxproj", "{39379840-825A-45A0-B363-C09FFEF864BD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestJavascript", "..\samples\Javascript\TestJavascript\proj.win32\TestJavascript.vcxproj", "{D0F06A44-A245-4D13-A498-0120C203B539}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libLocalStorage", "..\cocos\storage\local-storage\proj.win32\libLocalStorage.vcxproj", "{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CocosDragonJS", "..\samples\Javascript\CocosDragonJS\proj.win32\CocosDragonJS.vcxproj", "{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrystalCraze", "..\samples\Javascript\CrystalCraze\proj.win32\CrystalCraze.vcxproj", "{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MoonWarriors", "..\samples\Javascript\MoonWarriors\proj.win32\MoonWarriors.vcxproj", "{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WatermelonWithMe", "..\samples\Javascript\WatermelonWithMe\proj.win32\WatermelonWithMe.vcxproj", "{BE092D9E-95AE-4F86-84CE-F4519E4F3F15}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "..\cocos\scripting\lua\bindings\liblua.vcxproj", "{DDC3E27F-004D-4DD4-9DD3-931A013D2159}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloLua", "..\samples\Lua\HelloLua\proj.win32\HelloLua.vcxproj", "{13E55395-94A2-4CD9-BFC2-1A051F80C17D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLua", "..\samples\Lua\TestLua\proj.win32\TestLua.win32.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleGame", "..\samples\Cpp\SimpleGame\proj.win32\SimpleGame.vcxproj", "{E0E282F4-8487-452C-BFAB-CB960EB4D22F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForBuilder", "..\cocos\scripting\javascript\bindings\cocosbuilder\libJSBindingForBuilder.vcxproj", "{F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForStudio", "..\cocos\scripting\javascript\bindings\cocostudio\libJSBindingForStudio.vcxproj", "{79D34511-E54E-410A-8BBA-EF175AD6C695}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForNetwork", "..\cocos\scripting\javascript\bindings\network\libJSBindingForNetwork.vcxproj", "{3BEC13F5-E227-4D80-BC77-1C857F83BCFC}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForExtension", "..\cocos\scripting\javascript\bindings\extension\libJSBindingForExtension.vcxproj", "{625F7391-9A91-48A1-8CFC-79508C822637}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libJSBinding", "libJSBinding", "{10F98A57-B9A1-47DA-9FBA-12D328E72ED1}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForChipmunk", "..\cocos\scripting\javascript\bindings\chipmunk\libJSBindingForChipmunk.vcxproj", "{21070E58-EEC6-4E16-8B4F-6D083DF55790}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForLocalStorage", "..\cocos\scripting\javascript\bindings\localstorage\libJSBindingForLocalStorage.vcxproj", "{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.Build.0 = Release|Win32
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32
|
||||
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.Build.0 = Release|Win32
|
||||
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.Build.0 = Release|Win32
|
||||
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.Build.0 = Release|Win32
|
||||
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.Build.0 = Release|Win32
|
||||
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.Build.0 = Release|Win32
|
||||
{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.Build.0 = Release|Win32
|
||||
{B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Release|Win32.Build.0 = Release|Win32
|
||||
{7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.Build.0 = Release|Win32
|
||||
{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Release|Win32.Build.0 = Release|Win32
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.Build.0 = Release|Win32
|
||||
{6D37505F-A890-441D-BD3F-A61E2C0469CE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6D37505F-A890-441D-BD3F-A61E2C0469CE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6D37505F-A890-441D-BD3F-A61E2C0469CE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6D37505F-A890-441D-BD3F-A61E2C0469CE}.Release|Win32.Build.0 = Release|Win32
|
||||
{39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.Build.0 = Release|Win32
|
||||
{D0F06A44-A245-4D13-A498-0120C203B539}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D0F06A44-A245-4D13-A498-0120C203B539}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.Build.0 = Release|Win32
|
||||
{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Release|Win32.Build.0 = Release|Win32
|
||||
{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Release|Win32.Build.0 = Release|Win32
|
||||
{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}.Release|Win32.Build.0 = Release|Win32
|
||||
{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Release|Win32.Build.0 = Release|Win32
|
||||
{BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Release|Win32.Build.0 = Release|Win32
|
||||
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Release|Win32.Build.0 = Release|Win32
|
||||
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.Build.0 = Release|Win32
|
||||
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.Build.0 = Release|Win32
|
||||
{E0E282F4-8487-452C-BFAB-CB960EB4D22F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E0E282F4-8487-452C-BFAB-CB960EB4D22F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E0E282F4-8487-452C-BFAB-CB960EB4D22F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E0E282F4-8487-452C-BFAB-CB960EB4D22F}.Release|Win32.Build.0 = Release|Win32
|
||||
{F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}.Release|Win32.Build.0 = Release|Win32
|
||||
{79D34511-E54E-410A-8BBA-EF175AD6C695}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{79D34511-E54E-410A-8BBA-EF175AD6C695}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{79D34511-E54E-410A-8BBA-EF175AD6C695}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{79D34511-E54E-410A-8BBA-EF175AD6C695}.Release|Win32.Build.0 = Release|Win32
|
||||
{3BEC13F5-E227-4D80-BC77-1C857F83BCFC}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3BEC13F5-E227-4D80-BC77-1C857F83BCFC}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3BEC13F5-E227-4D80-BC77-1C857F83BCFC}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3BEC13F5-E227-4D80-BC77-1C857F83BCFC}.Release|Win32.Build.0 = Release|Win32
|
||||
{625F7391-9A91-48A1-8CFC-79508C822637}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{625F7391-9A91-48A1-8CFC-79508C822637}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{625F7391-9A91-48A1-8CFC-79508C822637}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{625F7391-9A91-48A1-8CFC-79508C822637}.Release|Win32.Build.0 = Release|Win32
|
||||
{21070E58-EEC6-4E16-8B4F-6D083DF55790}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{21070E58-EEC6-4E16-8B4F-6D083DF55790}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{21070E58-EEC6-4E16-8B4F-6D083DF55790}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{21070E58-EEC6-4E16-8B4F-6D083DF55790}.Release|Win32.Build.0 = Release|Win32
|
||||
{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{39379840-825A-45A0-B363-C09FFEF864BD} = {10F98A57-B9A1-47DA-9FBA-12D328E72ED1}
|
||||
{F9DA0FC1-651B-457B-962E-A4D61CEBF5FD} = {10F98A57-B9A1-47DA-9FBA-12D328E72ED1}
|
||||
{625F7391-9A91-48A1-8CFC-79508C822637} = {10F98A57-B9A1-47DA-9FBA-12D328E72ED1}
|
||||
{3BEC13F5-E227-4D80-BC77-1C857F83BCFC} = {10F98A57-B9A1-47DA-9FBA-12D328E72ED1}
|
||||
{79D34511-E54E-410A-8BBA-EF175AD6C695} = {10F98A57-B9A1-47DA-9FBA-12D328E72ED1}
|
||||
{21070E58-EEC6-4E16-8B4F-6D083DF55790} = {10F98A57-B9A1-47DA-9FBA-12D328E72ED1}
|
||||
{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE} = {10F98A57-B9A1-47DA-9FBA-12D328E72ED1}
|
||||
EndGlobalSection
|
||||
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
|
||||
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
|
||||
EndGlobalSection
|
||||
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
|
||||
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1 @@
|
|||
a70914e0a87ee8ced4d662bd6038fc955e77f6ca
|
|
@ -0,0 +1 @@
|
|||
3ff18018375c71f683a484652678740cc6395eaf
|
|
@ -32,5 +32,5 @@ if [ -n "$MISSING" ]; then
|
|||
fi
|
||||
|
||||
# install glfw
|
||||
tools/travis-scripts/install_glfw.sh
|
||||
../tools/travis-scripts/install_glfw.sh
|
||||
|
|
@ -0,0 +1,210 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := cocos2dx_static
|
||||
|
||||
LOCAL_MODULE_FILENAME := libcocos2d
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
base64.cpp \
|
||||
CCAction.cpp \
|
||||
CCActionCamera.cpp \
|
||||
CCActionCatmullRom.cpp \
|
||||
CCActionEase.cpp \
|
||||
CCActionGrid.cpp \
|
||||
CCActionGrid3D.cpp \
|
||||
CCActionInstant.cpp \
|
||||
CCActionInterval.cpp \
|
||||
CCActionManager.cpp \
|
||||
CCActionPageTurn3D.cpp \
|
||||
CCActionProgressTimer.cpp \
|
||||
CCActionTiledGrid.cpp \
|
||||
CCActionTween.cpp \
|
||||
CCAnimation.cpp \
|
||||
CCAnimationCache.cpp \
|
||||
CCAtlasNode.cpp \
|
||||
CCCamera.cpp \
|
||||
ccCArray.cpp \
|
||||
CCClippingNode.cpp \
|
||||
CCComponent.cpp \
|
||||
CCComponentContainer.cpp \
|
||||
CCConfiguration.cpp \
|
||||
CCDeprecated.cpp \
|
||||
CCDirector.cpp \
|
||||
CCDrawingPrimitives.cpp \
|
||||
CCDrawNode.cpp \
|
||||
CCEvent.cpp \
|
||||
CCEventAcceleration.cpp \
|
||||
CCEventCustom.cpp \
|
||||
CCEventDispatcher.cpp \
|
||||
CCEventKeyboard.cpp \
|
||||
CCEventMouse.cpp \
|
||||
CCEventListenerMouse.cpp \
|
||||
CCEventListener.cpp \
|
||||
CCEventListenerAcceleration.cpp \
|
||||
CCEventListenerCustom.cpp \
|
||||
CCEventListenerKeyboard.cpp \
|
||||
CCEventListenerTouch.cpp \
|
||||
CCEventTouch.cpp \
|
||||
CCFont.cpp \
|
||||
CCFontAtlas.cpp \
|
||||
CCFontAtlasCache.cpp \
|
||||
CCFontAtlasFactory.cpp \
|
||||
CCFontDefinition.cpp \
|
||||
CCFontFNT.cpp \
|
||||
CCFontFreeType.cpp \
|
||||
ccFPSImages.c \
|
||||
CCGLBufferedNode.cpp \
|
||||
CCGLProgram.cpp \
|
||||
ccGLStateCache.cpp \
|
||||
CCGrabber.cpp \
|
||||
CCGrid.cpp \
|
||||
CCIMEDispatcher.cpp \
|
||||
CCLabel.cpp \
|
||||
CCLabelAtlas.cpp \
|
||||
CCLabelBMFont.cpp \
|
||||
CCLabelTextFormatter.cpp \
|
||||
CCLabelTTF.cpp \
|
||||
CCLayer.cpp \
|
||||
CCMenu.cpp \
|
||||
CCMenuItem.cpp \
|
||||
CCMotionStreak.cpp \
|
||||
CCNode.cpp \
|
||||
CCNotificationCenter.cpp \
|
||||
CCParallaxNode.cpp \
|
||||
CCParticleBatchNode.cpp \
|
||||
CCParticleExamples.cpp \
|
||||
CCParticleSystem.cpp \
|
||||
CCParticleSystemQuad.cpp \
|
||||
CCProfiling.cpp \
|
||||
CCProgressTimer.cpp \
|
||||
CCRenderTexture.cpp \
|
||||
CCScene.cpp \
|
||||
CCScheduler.cpp \
|
||||
CCScriptSupport.cpp \
|
||||
CCShaderCache.cpp \
|
||||
ccShaders.cpp \
|
||||
CCSprite.cpp \
|
||||
CCSpriteBatchNode.cpp \
|
||||
CCSpriteFrame.cpp \
|
||||
CCSpriteFrameCache.cpp \
|
||||
CCTextFieldTTF.cpp \
|
||||
CCTextImage.cpp \
|
||||
CCTexture2D.cpp \
|
||||
CCTextureAtlas.cpp \
|
||||
CCTextureCache.cpp \
|
||||
CCTileMapAtlas.cpp \
|
||||
CCTMXLayer.cpp \
|
||||
CCTMXObjectGroup.cpp \
|
||||
CCTMXTiledMap.cpp \
|
||||
CCTMXXMLParser.cpp \
|
||||
CCTouch.cpp \
|
||||
CCTransition.cpp \
|
||||
CCTransitionPageTurn.cpp \
|
||||
CCTransitionProgress.cpp \
|
||||
ccTypes.cpp \
|
||||
CCUserDefault.cpp \
|
||||
CCUserDefaultAndroid.cpp \
|
||||
ccUTF8.cpp \
|
||||
ccUtils.cpp \
|
||||
CCVertex.cpp \
|
||||
cocos2d.cpp \
|
||||
TGAlib.cpp \
|
||||
TransformUtils.cpp \
|
||||
ZipUtils.cpp \
|
||||
platform/CCEGLViewProtocol.cpp \
|
||||
platform/CCFileUtils.cpp \
|
||||
platform/CCSAXParser.cpp \
|
||||
platform/CCThread.cpp \
|
||||
../base/atitc.cpp \
|
||||
../base/CCAffineTransform.cpp \
|
||||
../base/CCArray.cpp \
|
||||
../base/CCAutoreleasePool.cpp \
|
||||
../base/CCData.cpp \
|
||||
../base/CCDataVisitor.cpp \
|
||||
../base/CCDictionary.cpp \
|
||||
../base/CCGeometry.cpp \
|
||||
../base/CCNS.cpp \
|
||||
../base/CCObject.cpp \
|
||||
../base/CCSet.cpp \
|
||||
../base/CCString.cpp \
|
||||
../base/etc1.cpp \
|
||||
../base/s3tc.cpp \
|
||||
../math/kazmath/src/aabb.c \
|
||||
../math/kazmath/src/mat3.c \
|
||||
../math/kazmath/src/mat4.c \
|
||||
../math/kazmath/src/neon_matrix_impl.c \
|
||||
../math/kazmath/src/plane.c \
|
||||
../math/kazmath/src/quaternion.c \
|
||||
../math/kazmath/src/ray2.c \
|
||||
../math/kazmath/src/utility.c \
|
||||
../math/kazmath/src/vec2.c \
|
||||
../math/kazmath/src/vec3.c \
|
||||
../math/kazmath/src/vec4.c \
|
||||
../math/kazmath/src/GL/mat4stack.c \
|
||||
../math/kazmath/src/GL/matrix.c \
|
||||
../physics/CCPhysicsBody.cpp \
|
||||
../physics/CCPhysicsContact.cpp \
|
||||
../physics/CCPhysicsJoint.cpp \
|
||||
../physics/CCPhysicsShape.cpp \
|
||||
../physics/CCPhysicsWorld.cpp \
|
||||
../physics/box2d/CCPhysicsBodyInfo_box2d.cpp \
|
||||
../physics/box2d/CCPhysicsContactInfo_box2d.cpp \
|
||||
../physics/box2d/CCPhysicsJointInfo_box2d.cpp \
|
||||
../physics/box2d/CCPhysicsShapeInfo_box2d.cpp \
|
||||
../physics/box2d/CCPhysicsWorldInfo_box2d.cpp \
|
||||
../physics/chipmunk/CCPhysicsBodyInfo_chipmunk.cpp \
|
||||
../physics/chipmunk/CCPhysicsContactInfo_chipmunk.cpp \
|
||||
../physics/chipmunk/CCPhysicsJointInfo_chipmunk.cpp \
|
||||
../physics/chipmunk/CCPhysicsShapeInfo_chipmunk.cpp \
|
||||
../physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp \
|
||||
../../external/tinyxml2/tinyxml2.cpp \
|
||||
../../external/unzip/ioapi.cpp \
|
||||
../../external/unzip/unzip.cpp
|
||||
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \
|
||||
$(LOCAL_PATH)/../math/kazmath/include \
|
||||
platform/android \
|
||||
$(LOCAL_PATH)/../physics \
|
||||
$(LOCAL_PATH)/../base \
|
||||
$(LOCAL_PATH)/../../external/tinyxml2 \
|
||||
$(LOCAL_PATH)/../../external/unzip \
|
||||
$(LOCAL_PATH)/../../external/chipmunk/include/chipmunk
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
|
||||
$(LOCAL_PATH)/../math/kazmath/include \
|
||||
$(LOCAL_PATH)/platform/android \
|
||||
$(LOCAL_PATH)/../physics \
|
||||
$(LOCAL_PATH)/../base \
|
||||
$(LOCAL_PATH)/../../external/tinyxml2 \
|
||||
$(LOCAL_PATH)/../../external/unzip \
|
||||
$(LOCAL_PATH)/../../external/chipmunk/include/chipmunk
|
||||
|
||||
|
||||
LOCAL_LDLIBS := -lGLESv2 \
|
||||
-llog \
|
||||
-lz \
|
||||
-landroid
|
||||
|
||||
LOCAL_EXPORT_LDLIBS := -lGLESv2 \
|
||||
-llog \
|
||||
-lz \
|
||||
-landroid
|
||||
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := cocos_freetype2_static
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += chipmunk_static
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dxandroid_static
|
||||
|
||||
# define the macro to compile through support/zip_support/ioapi.c
|
||||
LOCAL_CFLAGS := -Wno-psabi -DUSE_FILE32API
|
||||
LOCAL_CPPFLAGS := -Wno-literal-suffix
|
||||
LOCAL_EXPORT_CFLAGS := -Wno-psabi -DUSE_FILE32API
|
||||
LOCAL_EXPORT_CPPFLAGS := -Wno-literal-suffix
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
$(call import-module,freetype2/prebuilt/android)
|
||||
$(call import-module,chipmunk)
|
||||
$(call import-module,2d/platform/android)
|
|
@ -26,7 +26,7 @@ THE SOFTWARE.
|
|||
|
||||
#include "CCAction.h"
|
||||
#include "CCActionInterval.h"
|
||||
#include "base_nodes/CCNode.h"
|
||||
#include "CCNode.h"
|
||||
#include "CCDirector.h"
|
||||
|
||||
NS_CC_BEGIN
|
|
@ -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 "CCObject.h"
|
||||
#include "CCGeometry.h"
|
||||
#include "CCPlatformMacros.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
|
||||
#include "CCActionCamera.h"
|
||||
#include "base_nodes/CCNode.h"
|
||||
#include "CCNode.h"
|
||||
#include "CCCamera.h"
|
||||
#include "CCStdC.h"
|
||||
|
|
@ -40,8 +40,8 @@
|
|||
#include <vector>
|
||||
|
||||
#include "CCActionInterval.h"
|
||||
#include "base_nodes/CCNode.h"
|
||||
#include "cocoa/CCGeometry.h"
|
||||
#include "CCNode.h"
|
||||
#include "CCGeometry.h"
|
||||
|
||||
NS_CC_BEGIN;
|
||||
|
|
@ -24,7 +24,7 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
#include "CCActionGrid.h"
|
||||
#include "CCDirector.h"
|
||||
#include "effects/CCGrid.h"
|
||||
#include "CCGrid.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
// implementation of GridAction
|
|
@ -25,9 +25,9 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "CCActionInstant.h"
|
||||
#include "base_nodes/CCNode.h"
|
||||
#include "sprite_nodes/CCSprite.h"
|
||||
#include "script_support/CCScriptSupport.h"
|
||||
#include "CCNode.h"
|
||||
#include "CCSprite.h"
|
||||
#include "CCScriptSupport.h"
|
||||
|
||||
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
@ -25,8 +25,8 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
|
||||
#include "CCActionInterval.h"
|
||||
#include "sprite_nodes/CCSprite.h"
|
||||
#include "base_nodes/CCNode.h"
|
||||
#include "CCSprite.h"
|
||||
#include "CCNode.h"
|
||||
#include "CCStdC.h"
|
||||
#include "CCActionInstant.h"
|
||||
#include <stdarg.h>
|
||||
|
@ -203,7 +203,7 @@ Sequence* Sequence::create(Array* arrayOfActions)
|
|||
Sequence* pRet = NULL;
|
||||
do
|
||||
{
|
||||
unsigned int count = arrayOfActions->count();
|
||||
long count = arrayOfActions->count();
|
||||
CC_BREAK_IF(count == 0);
|
||||
|
||||
FiniteTimeAction* prev = static_cast<FiniteTimeAction*>(arrayOfActions->getObjectAtIndex(0));
|
||||
|
@ -576,7 +576,7 @@ Spawn* Spawn::create(Array *arrayOfActions)
|
|||
Spawn* pRet = NULL;
|
||||
do
|
||||
{
|
||||
unsigned int count = arrayOfActions->count();
|
||||
long count = arrayOfActions->count();
|
||||
CC_BREAK_IF(count == 0);
|
||||
FiniteTimeAction* prev = static_cast<FiniteTimeAction*>(arrayOfActions->getObjectAtIndex(0));
|
||||
if (count > 1)
|
||||
|
@ -2100,7 +2100,7 @@ void Animate::update(float t)
|
|||
}
|
||||
|
||||
Array* frames = _animation->getFrames();
|
||||
int numberOfFrames = frames->count();
|
||||
long numberOfFrames = frames->count();
|
||||
SpriteFrame *frameToDisplay = NULL;
|
||||
|
||||
for( int i=_nextFrame; i < numberOfFrames; i++ ) {
|
|
@ -27,11 +27,11 @@ THE SOFTWARE.
|
|||
#ifndef __ACTION_CCINTERVAL_ACTION_H__
|
||||
#define __ACTION_CCINTERVAL_ACTION_H__
|
||||
|
||||
#include "base_nodes/CCNode.h"
|
||||
#include "CCNode.h"
|
||||
#include "CCAction.h"
|
||||
#include "CCProtocols.h"
|
||||
#include "sprite_nodes/CCSpriteFrame.h"
|
||||
#include "sprite_nodes/CCAnimation.h"
|
||||
#include "CCSpriteFrame.h"
|
||||
#include "CCAnimation.h"
|
||||
#include <vector>
|
||||
|
||||
NS_CC_BEGIN
|
|
@ -26,12 +26,12 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
|
||||
#include "CCActionManager.h"
|
||||
#include "base_nodes/CCNode.h"
|
||||
#include "CCNode.h"
|
||||
#include "CCScheduler.h"
|
||||
#include "ccMacros.h"
|
||||
#include "support/data_support/ccCArray.h"
|
||||
#include "support/data_support/uthash.h"
|
||||
#include "cocoa/CCSet.h"
|
||||
#include "ccCArray.h"
|
||||
#include "uthash.h"
|
||||
#include "CCSet.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
//
|
||||
|
@ -65,55 +65,55 @@ ActionManager::~ActionManager(void)
|
|||
|
||||
// private
|
||||
|
||||
void ActionManager::deleteHashElement(tHashElement *pElement)
|
||||
void ActionManager::deleteHashElement(tHashElement *element)
|
||||
{
|
||||
ccArrayFree(pElement->actions);
|
||||
HASH_DEL(_targets, pElement);
|
||||
pElement->target->release();
|
||||
free(pElement);
|
||||
ccArrayFree(element->actions);
|
||||
HASH_DEL(_targets, element);
|
||||
element->target->release();
|
||||
free(element);
|
||||
}
|
||||
|
||||
void ActionManager::actionAllocWithHashElement(tHashElement *pElement)
|
||||
void ActionManager::actionAllocWithHashElement(tHashElement *element)
|
||||
{
|
||||
// 4 actions per Node by default
|
||||
if (pElement->actions == NULL)
|
||||
if (element->actions == NULL)
|
||||
{
|
||||
pElement->actions = ccArrayNew(4);
|
||||
element->actions = ccArrayNew(4);
|
||||
}else
|
||||
if (pElement->actions->num == pElement->actions->max)
|
||||
if (element->actions->num == element->actions->max)
|
||||
{
|
||||
ccArrayDoubleCapacity(pElement->actions);
|
||||
ccArrayDoubleCapacity(element->actions);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ActionManager::removeActionAtIndex(int index, tHashElement *pElement)
|
||||
void ActionManager::removeActionAtIndex(long index, tHashElement *element)
|
||||
{
|
||||
Action *pAction = (Action*)pElement->actions->arr[index];
|
||||
Action *action = (Action*)element->actions->arr[index];
|
||||
|
||||
if (pAction == pElement->currentAction && (! pElement->currentActionSalvaged))
|
||||
if (action == element->currentAction && (! element->currentActionSalvaged))
|
||||
{
|
||||
pElement->currentAction->retain();
|
||||
pElement->currentActionSalvaged = true;
|
||||
element->currentAction->retain();
|
||||
element->currentActionSalvaged = true;
|
||||
}
|
||||
|
||||
ccArrayRemoveObjectAtIndex(pElement->actions, index, true);
|
||||
ccArrayRemoveObjectAtIndex(element->actions, index, true);
|
||||
|
||||
// update actionIndex in case we are in tick. looping over the actions
|
||||
if (pElement->actionIndex >= index)
|
||||
if (element->actionIndex >= index)
|
||||
{
|
||||
pElement->actionIndex--;
|
||||
element->actionIndex--;
|
||||
}
|
||||
|
||||
if (pElement->actions->num == 0)
|
||||
if (element->actions->num == 0)
|
||||
{
|
||||
if (_currentTarget == pElement)
|
||||
if (_currentTarget == element)
|
||||
{
|
||||
_currentTargetSalvaged = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
deleteHashElement(pElement);
|
||||
deleteHashElement(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -122,21 +122,21 @@ void ActionManager::removeActionAtIndex(int index, tHashElement *pElement)
|
|||
|
||||
void ActionManager::pauseTarget(Object *target)
|
||||
{
|
||||
tHashElement *pElement = NULL;
|
||||
HASH_FIND_INT(_targets, &target, pElement);
|
||||
if (pElement)
|
||||
tHashElement *element = NULL;
|
||||
HASH_FIND_PTR(_targets, &target, element);
|
||||
if (element)
|
||||
{
|
||||
pElement->paused = true;
|
||||
element->paused = true;
|
||||
}
|
||||
}
|
||||
|
||||
void ActionManager::resumeTarget(Object *target)
|
||||
{
|
||||
tHashElement *pElement = NULL;
|
||||
HASH_FIND_INT(_targets, &target, pElement);
|
||||
if (pElement)
|
||||
tHashElement *element = NULL;
|
||||
HASH_FIND_PTR(_targets, &target, element);
|
||||
if (element)
|
||||
{
|
||||
pElement->paused = false;
|
||||
element->paused = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -168,40 +168,40 @@ void ActionManager::resumeTargets(cocos2d::Set *targetsToResume)
|
|||
|
||||
// run
|
||||
|
||||
void ActionManager::addAction(Action *pAction, Node *target, bool paused)
|
||||
void ActionManager::addAction(Action *action, Node *target, bool paused)
|
||||
{
|
||||
CCASSERT(pAction != NULL, "");
|
||||
CCASSERT(action != NULL, "");
|
||||
CCASSERT(target != NULL, "");
|
||||
|
||||
tHashElement *pElement = NULL;
|
||||
tHashElement *element = NULL;
|
||||
// we should convert it to Object*, because we save it as Object*
|
||||
Object *tmp = target;
|
||||
HASH_FIND_INT(_targets, &tmp, pElement);
|
||||
if (! pElement)
|
||||
HASH_FIND_PTR(_targets, &tmp, element);
|
||||
if (! element)
|
||||
{
|
||||
pElement = (tHashElement*)calloc(sizeof(*pElement), 1);
|
||||
pElement->paused = paused;
|
||||
element = (tHashElement*)calloc(sizeof(*element), 1);
|
||||
element->paused = paused;
|
||||
target->retain();
|
||||
pElement->target = target;
|
||||
HASH_ADD_INT(_targets, target, pElement);
|
||||
element->target = target;
|
||||
HASH_ADD_PTR(_targets, target, element);
|
||||
}
|
||||
|
||||
actionAllocWithHashElement(pElement);
|
||||
actionAllocWithHashElement(element);
|
||||
|
||||
CCASSERT(! ccArrayContainsObject(pElement->actions, pAction), "");
|
||||
ccArrayAppendObject(pElement->actions, pAction);
|
||||
CCASSERT(! ccArrayContainsObject(element->actions, action), "");
|
||||
ccArrayAppendObject(element->actions, action);
|
||||
|
||||
pAction->startWithTarget(target);
|
||||
action->startWithTarget(target);
|
||||
}
|
||||
|
||||
// remove
|
||||
|
||||
void ActionManager::removeAllActions(void)
|
||||
{
|
||||
for (tHashElement *pElement = _targets; pElement != NULL; )
|
||||
for (tHashElement *element = _targets; element != NULL; )
|
||||
{
|
||||
Object *target = pElement->target;
|
||||
pElement = (tHashElement*)pElement->hh.next;
|
||||
Object *target = element->target;
|
||||
element = (tHashElement*)element->hh.next;
|
||||
removeAllActionsFromTarget(target);
|
||||
}
|
||||
}
|
||||
|
@ -214,24 +214,24 @@ void ActionManager::removeAllActionsFromTarget(Object *target)
|
|||
return;
|
||||
}
|
||||
|
||||
tHashElement *pElement = NULL;
|
||||
HASH_FIND_INT(_targets, &target, pElement);
|
||||
if (pElement)
|
||||
tHashElement *element = NULL;
|
||||
HASH_FIND_PTR(_targets, &target, element);
|
||||
if (element)
|
||||
{
|
||||
if (ccArrayContainsObject(pElement->actions, pElement->currentAction) && (! pElement->currentActionSalvaged))
|
||||
if (ccArrayContainsObject(element->actions, element->currentAction) && (! element->currentActionSalvaged))
|
||||
{
|
||||
pElement->currentAction->retain();
|
||||
pElement->currentActionSalvaged = true;
|
||||
element->currentAction->retain();
|
||||
element->currentActionSalvaged = true;
|
||||
}
|
||||
|
||||
ccArrayRemoveAllObjects(pElement->actions);
|
||||
if (_currentTarget == pElement)
|
||||
ccArrayRemoveAllObjects(element->actions);
|
||||
if (_currentTarget == element)
|
||||
{
|
||||
_currentTargetSalvaged = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
deleteHashElement(pElement);
|
||||
deleteHashElement(element);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -240,23 +240,23 @@ void ActionManager::removeAllActionsFromTarget(Object *target)
|
|||
}
|
||||
}
|
||||
|
||||
void ActionManager::removeAction(Action *pAction)
|
||||
void ActionManager::removeAction(Action *action)
|
||||
{
|
||||
// explicit null handling
|
||||
if (pAction == NULL)
|
||||
if (action == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
tHashElement *pElement = NULL;
|
||||
Object *target = pAction->getOriginalTarget();
|
||||
HASH_FIND_INT(_targets, &target, pElement);
|
||||
if (pElement)
|
||||
tHashElement *element = NULL;
|
||||
Object *target = action->getOriginalTarget();
|
||||
HASH_FIND_PTR(_targets, &target, element);
|
||||
if (element)
|
||||
{
|
||||
unsigned int i = ccArrayGetIndexOfObject(pElement->actions, pAction);
|
||||
if (UINT_MAX != i)
|
||||
long i = ccArrayGetIndexOfObject(element->actions, action);
|
||||
if (i != CC_INVALID_INDEX)
|
||||
{
|
||||
removeActionAtIndex(i, pElement);
|
||||
removeActionAtIndex(i, element);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -270,19 +270,19 @@ void ActionManager::removeActionByTag(int tag, Object *target)
|
|||
CCASSERT(tag != Action::INVALID_TAG, "");
|
||||
CCASSERT(target != NULL, "");
|
||||
|
||||
tHashElement *pElement = NULL;
|
||||
HASH_FIND_INT(_targets, &target, pElement);
|
||||
tHashElement *element = NULL;
|
||||
HASH_FIND_PTR(_targets, &target, element);
|
||||
|
||||
if (pElement)
|
||||
if (element)
|
||||
{
|
||||
unsigned int limit = pElement->actions->num;
|
||||
for (unsigned int i = 0; i < limit; ++i)
|
||||
long limit = element->actions->num;
|
||||
for (long i = 0; i < limit; ++i)
|
||||
{
|
||||
Action *pAction = (Action*)pElement->actions->arr[i];
|
||||
Action *action = (Action*)element->actions->arr[i];
|
||||
|
||||
if (pAction->getTag() == (int)tag && pAction->getOriginalTarget() == target)
|
||||
if (action->getTag() == (int)tag && action->getOriginalTarget() == target)
|
||||
{
|
||||
removeActionAtIndex(i, pElement);
|
||||
removeActionAtIndex(i, element);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -297,21 +297,21 @@ Action* ActionManager::getActionByTag(int tag, const Object *target) const
|
|||
{
|
||||
CCASSERT(tag != Action::INVALID_TAG, "");
|
||||
|
||||
tHashElement *pElement = NULL;
|
||||
HASH_FIND_INT(_targets, &target, pElement);
|
||||
tHashElement *element = NULL;
|
||||
HASH_FIND_PTR(_targets, &target, element);
|
||||
|
||||
if (pElement)
|
||||
if (element)
|
||||
{
|
||||
if (pElement->actions != NULL)
|
||||
if (element->actions != NULL)
|
||||
{
|
||||
unsigned int limit = pElement->actions->num;
|
||||
for (unsigned int i = 0; i < limit; ++i)
|
||||
long limit = element->actions->num;
|
||||
for (long i = 0; i < limit; ++i)
|
||||
{
|
||||
Action *pAction = (Action*)pElement->actions->arr[i];
|
||||
Action *action = (Action*)element->actions->arr[i];
|
||||
|
||||
if (pAction->getTag() == (int)tag)
|
||||
if (action->getTag() == (int)tag)
|
||||
{
|
||||
return pAction;
|
||||
return action;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -327,13 +327,13 @@ Action* ActionManager::getActionByTag(int tag, const Object *target) const
|
|||
|
||||
// XXX: Passing "const O *" instead of "const O&" because HASH_FIND_IT requries the address of a pointer
|
||||
// and, it is not possible to get the address of a reference
|
||||
unsigned int ActionManager::getNumberOfRunningActionsInTarget(const Object *target) const
|
||||
long ActionManager::getNumberOfRunningActionsInTarget(const Object *target) const
|
||||
{
|
||||
tHashElement *pElement = NULL;
|
||||
HASH_FIND_INT(_targets, &target, pElement);
|
||||
if (pElement)
|
||||
tHashElement *element = NULL;
|
||||
HASH_FIND_PTR(_targets, &target, element);
|
||||
if (element)
|
||||
{
|
||||
return pElement->actions ? pElement->actions->num : 0;
|
||||
return element->actions ? element->actions->num : 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -374,10 +374,10 @@ void ActionManager::update(float dt)
|
|||
{
|
||||
_currentTarget->currentAction->stop();
|
||||
|
||||
Action *pAction = _currentTarget->currentAction;
|
||||
Action *action = _currentTarget->currentAction;
|
||||
// Make currentAction nil to prevent removeAction from salvaging it.
|
||||
_currentTarget->currentAction = NULL;
|
||||
removeAction(pAction);
|
||||
removeAction(action);
|
||||
}
|
||||
|
||||
_currentTarget->currentAction = NULL;
|
|
@ -29,8 +29,8 @@ THE SOFTWARE.
|
|||
#define __ACTION_CCACTION_MANAGER_H__
|
||||
|
||||
#include "CCAction.h"
|
||||
#include "cocoa/CCArray.h"
|
||||
#include "cocoa/CCObject.h"
|
||||
#include "CCArray.h"
|
||||
#include "CCObject.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -102,7 +102,7 @@ public:
|
|||
* - If you are running 1 Sequence of 7 actions, it will return 1.
|
||||
* - If you are running 7 Sequences of 2 actions, it will return 7.
|
||||
*/
|
||||
unsigned int getNumberOfRunningActionsInTarget(const Object *target) const;
|
||||
long getNumberOfRunningActionsInTarget(const Object *target) const;
|
||||
|
||||
/** @deprecated use getNumberOfRunningActionsInTarget() instead */
|
||||
CC_DEPRECATED_ATTRIBUTE inline unsigned int numberOfRunningActionsInTarget(Object *target) const { return getNumberOfRunningActionsInTarget(target); }
|
||||
|
@ -126,7 +126,7 @@ public:
|
|||
protected:
|
||||
// declared in ActionManager.m
|
||||
|
||||
void removeActionAtIndex(int index, struct _hashElement *pElement);
|
||||
void removeActionAtIndex(long index, struct _hashElement *pElement);
|
||||
void deleteHashElement(struct _hashElement *pElement);
|
||||
void actionAllocWithHashElement(struct _hashElement *pElement);
|
||||
void update(float dt);
|
|
@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#include "CCActionProgressTimer.h"
|
||||
#include "misc_nodes/CCProgressTimer.h"
|
||||
#include "CCProgressTimer.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
|||
#include "CCActionTiledGrid.h"
|
||||
#include "CCDirector.h"
|
||||
#include "ccMacros.h"
|
||||
#include "effects/CCGrid.h"
|
||||
#include "CCGrid.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
NS_CC_BEGIN
|
|
@ -24,10 +24,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#include "CCAnimation.h"
|
||||
#include "textures/CCTextureCache.h"
|
||||
#include "textures/CCTexture2D.h"
|
||||
#include "CCTextureCache.h"
|
||||
#include "CCTexture2D.h"
|
||||
#include "ccMacros.h"
|
||||
#include "sprite_nodes/CCSpriteFrame.h"
|
||||
#include "CCSpriteFrame.h"
|
||||
#include "CCDirector.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -176,7 +177,7 @@ void Animation::addSpriteFrame(SpriteFrame *pFrame)
|
|||
|
||||
void Animation::addSpriteFrameWithFile(const char *filename)
|
||||
{
|
||||
Texture2D *texture = TextureCache::getInstance()->addImage(filename);
|
||||
Texture2D *texture = Director::getInstance()->getTextureCache()->addImage(filename);
|
||||
Rect rect = Rect::ZERO;
|
||||
rect.size = texture->getContentSize();
|
||||
SpriteFrame *pFrame = SpriteFrame::createWithTexture(texture, rect);
|
|
@ -26,11 +26,11 @@ THE SOFTWARE.
|
|||
#ifndef __CC_ANIMATION_H__
|
||||
#define __CC_ANIMATION_H__
|
||||
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
#include "cocoa/CCObject.h"
|
||||
#include "cocoa/CCArray.h"
|
||||
#include "cocoa/CCDictionary.h"
|
||||
#include "cocoa/CCGeometry.h"
|
||||
#include "CCPlatformConfig.h"
|
||||
#include "CCObject.h"
|
||||
#include "CCArray.h"
|
||||
#include "CCDictionary.h"
|
||||
#include "CCGeometry.h"
|
||||
#include "CCSpriteFrame.h"
|
||||
#include <string>
|
||||
|
|
@ -28,7 +28,7 @@ THE SOFTWARE.
|
|||
#include "CCAnimation.h"
|
||||
#include "CCSpriteFrame.h"
|
||||
#include "CCSpriteFrameCache.h"
|
||||
#include "cocoa/CCString.h"
|
||||
#include "CCString.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
|
||||
using namespace std;
|
||||
|
@ -71,22 +71,20 @@ AnimationCache::~AnimationCache()
|
|||
CC_SAFE_RELEASE(_animations);
|
||||
}
|
||||
|
||||
void AnimationCache::addAnimation(Animation *animation, const char * name)
|
||||
void AnimationCache::addAnimation(Animation *animation, const std::string& name)
|
||||
{
|
||||
_animations->setObject(animation, name);
|
||||
}
|
||||
|
||||
void AnimationCache::removeAnimation(const char* name)
|
||||
void AnimationCache::removeAnimation(const std::string& name)
|
||||
{
|
||||
if (! name)
|
||||
{
|
||||
if (name.size()==0)
|
||||
return;
|
||||
}
|
||||
|
||||
_animations->removeObjectForKey(name);
|
||||
}
|
||||
|
||||
Animation* AnimationCache::getAnimation(const char* name)
|
||||
Animation* AnimationCache::getAnimation(const std::string& name)
|
||||
{
|
||||
return (Animation*)_animations->objectForKey(name);
|
||||
}
|
||||
|
@ -95,17 +93,17 @@ void AnimationCache::parseVersion1(Dictionary* animations)
|
|||
{
|
||||
SpriteFrameCache *frameCache = SpriteFrameCache::getInstance();
|
||||
|
||||
DictElement* pElement = NULL;
|
||||
CCDICT_FOREACH(animations, pElement)
|
||||
DictElement* element = NULL;
|
||||
CCDICT_FOREACH(animations, element)
|
||||
{
|
||||
Dictionary* animationDict = static_cast<Dictionary*>(pElement->getObject());
|
||||
Dictionary* animationDict = static_cast<Dictionary*>(element->getObject());
|
||||
Array* frameNames = static_cast<Array*>(animationDict->objectForKey("frames"));
|
||||
float delay = animationDict->valueForKey("delay")->floatValue();
|
||||
Animation* animation = NULL;
|
||||
|
||||
if ( frameNames == NULL )
|
||||
{
|
||||
CCLOG("cocos2d: AnimationCache: Animation '%s' found in dictionary without any frames - cannot add to animation cache.", pElement->getStrKey());
|
||||
CCLOG("cocos2d: AnimationCache: Animation '%s' found in dictionary without any frames - cannot add to animation cache.", element->getStrKey());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -115,11 +113,11 @@ void AnimationCache::parseVersion1(Dictionary* animations)
|
|||
Object* pObj = NULL;
|
||||
CCARRAY_FOREACH(frameNames, pObj)
|
||||
{
|
||||
const char* frameName = static_cast<String*>(pObj)->getCString();
|
||||
const std::string& frameName = static_cast<String*>(pObj)->getCString();
|
||||
SpriteFrame* spriteFrame = frameCache->getSpriteFrameByName(frameName);
|
||||
|
||||
if ( ! spriteFrame ) {
|
||||
CCLOG("cocos2d: AnimationCache: Animation '%s' refers to frame '%s' which is not currently in the SpriteFrameCache. This frame will not be added to the animation.", pElement->getStrKey(), frameName);
|
||||
CCLOG("cocos2d: AnimationCache: Animation '%s' refers to frame '%s' which is not currently in the SpriteFrameCache. This frame will not be added to the animation.", element->getStrKey(), frameName.c_str());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
@ -131,15 +129,15 @@ void AnimationCache::parseVersion1(Dictionary* animations)
|
|||
}
|
||||
|
||||
if ( frames->count() == 0 ) {
|
||||
CCLOG("cocos2d: AnimationCache: None of the frames for animation '%s' were found in the SpriteFrameCache. Animation is not being added to the Animation Cache.", pElement->getStrKey());
|
||||
CCLOG("cocos2d: AnimationCache: None of the frames for animation '%s' were found in the SpriteFrameCache. Animation is not being added to the Animation Cache.", element->getStrKey());
|
||||
continue;
|
||||
} else if ( frames->count() != frameNames->count() ) {
|
||||
CCLOG("cocos2d: AnimationCache: An animation in your dictionary refers to a frame which is not in the SpriteFrameCache. Some or all of the frames for the animation '%s' may be missing.", pElement->getStrKey());
|
||||
CCLOG("cocos2d: AnimationCache: An animation in your dictionary refers to a frame which is not in the SpriteFrameCache. Some or all of the frames for the animation '%s' may be missing.", element->getStrKey());
|
||||
}
|
||||
|
||||
animation = Animation::create(frames, delay, 1);
|
||||
|
||||
AnimationCache::getInstance()->addAnimation(animation, pElement->getStrKey());
|
||||
AnimationCache::getInstance()->addAnimation(animation, element->getStrKey());
|
||||
frames->release();
|
||||
}
|
||||
}
|
||||
|
@ -148,11 +146,11 @@ void AnimationCache::parseVersion2(Dictionary* animations)
|
|||
{
|
||||
SpriteFrameCache *frameCache = SpriteFrameCache::getInstance();
|
||||
|
||||
DictElement* pElement = NULL;
|
||||
CCDICT_FOREACH(animations, pElement)
|
||||
DictElement* element = NULL;
|
||||
CCDICT_FOREACH(animations, element)
|
||||
{
|
||||
const char* name = pElement->getStrKey();
|
||||
Dictionary* animationDict = static_cast<Dictionary*>(pElement->getObject());
|
||||
const char* name = element->getStrKey();
|
||||
Dictionary* animationDict = static_cast<Dictionary*>(element->getObject());
|
||||
|
||||
const String* loops = animationDict->valueForKey("loops");
|
||||
bool restoreOriginalFrame = animationDict->valueForKey("restoreOriginalFrame")->boolValue();
|
||||
|
@ -241,9 +239,9 @@ void AnimationCache::addAnimationsWithDictionary(Dictionary* dictionary)
|
|||
}
|
||||
|
||||
/** Read an NSDictionary from a plist file and parse it automatically for animations */
|
||||
void AnimationCache::addAnimationsWithFile(const char* plist)
|
||||
void AnimationCache::addAnimationsWithFile(const std::string& plist)
|
||||
{
|
||||
CCASSERT( plist, "Invalid texture file name");
|
||||
CCASSERT( plist.size()>0, "Invalid texture file name");
|
||||
|
||||
std::string path = FileUtils::getInstance()->fullPathForFilename(plist);
|
||||
Dictionary* dict = Dictionary::createWithContentsOfFile(path.c_str());
|
|
@ -26,8 +26,8 @@ THE SOFTWARE.
|
|||
#ifndef __CC_ANIMATION_CACHE_H__
|
||||
#define __CC_ANIMATION_CACHE_H__
|
||||
|
||||
#include "cocoa/CCObject.h"
|
||||
#include "cocoa/CCDictionary.h"
|
||||
#include "CCObject.h"
|
||||
#include "CCDictionary.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -76,29 +76,29 @@ public:
|
|||
|
||||
/** Adds a Animation with a name.
|
||||
*/
|
||||
void addAnimation(Animation *animation, const char * name);
|
||||
void addAnimation(Animation *animation, const std::string& name);
|
||||
|
||||
/** Deletes a Animation from the cache.
|
||||
|
||||
*/
|
||||
void removeAnimation(const char* name);
|
||||
void removeAnimation(const std::string& name);
|
||||
/** @deprecated. Use removeAnimation() instead
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE void removeAnimationByName(const char* name){ removeAnimation(name);}
|
||||
CC_DEPRECATED_ATTRIBUTE void removeAnimationByName(const std::string& name){ removeAnimation(name);}
|
||||
|
||||
/** Returns a Animation that was previously added.
|
||||
If the name is not found it will return nil.
|
||||
You should retain the returned copy if you are going to use it.
|
||||
*/
|
||||
Animation* getAnimation(const char* name);
|
||||
Animation* getAnimation(const std::string& name);
|
||||
/**
|
||||
@deprecated. Use getAnimation() instead
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE Animation* animationByName(const char* name){ return getAnimation(name); }
|
||||
CC_DEPRECATED_ATTRIBUTE Animation* animationByName(const std::string& name){ return getAnimation(name); }
|
||||
|
||||
/** Adds an animation from an NSDictionary
|
||||
Make sure that the frames were previously loaded in the SpriteFrameCache.
|
||||
|
@ -112,7 +112,7 @@ public:
|
|||
* @js addAnimations
|
||||
* @lua addAnimations
|
||||
*/
|
||||
void addAnimationsWithFile(const char* plist);
|
||||
void addAnimationsWithFile(const std::string& plist);
|
||||
|
||||
private:
|
||||
void parseVersion1(Dictionary* animations);
|
|
@ -25,14 +25,14 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
|
||||
#include "CCAtlasNode.h"
|
||||
#include "textures/CCTextureAtlas.h"
|
||||
#include "textures/CCTextureCache.h"
|
||||
#include "CCTextureAtlas.h"
|
||||
#include "CCTextureCache.h"
|
||||
#include "CCDirector.h"
|
||||
#include "shaders/CCGLProgram.h"
|
||||
#include "shaders/CCShaderCache.h"
|
||||
#include "shaders/ccGLStateCache.h"
|
||||
#include "CCGLProgram.h"
|
||||
#include "CCShaderCache.h"
|
||||
#include "ccGLStateCache.h"
|
||||
#include "CCDirector.h"
|
||||
#include "support/TransformUtils.h"
|
||||
#include "TransformUtils.h"
|
||||
|
||||
// external
|
||||
#include "kazmath/GL/matrix.h"
|
||||
|
@ -61,8 +61,7 @@ AtlasNode::~AtlasNode()
|
|||
CC_SAFE_RELEASE(_textureAtlas);
|
||||
}
|
||||
|
||||
AtlasNode * AtlasNode::create(const char *tile, unsigned int tileWidth, unsigned int tileHeight,
|
||||
unsigned int itemsToRender)
|
||||
AtlasNode * AtlasNode::create(const std::string& tile, long tileWidth, long tileHeight, long itemsToRender)
|
||||
{
|
||||
AtlasNode * pRet = new AtlasNode();
|
||||
if (pRet->initWithTileFile(tile, tileWidth, tileHeight, itemsToRender))
|
||||
|
@ -74,15 +73,14 @@ AtlasNode * AtlasNode::create(const char *tile, unsigned int tileWidth, unsigned
|
|||
return NULL;
|
||||
}
|
||||
|
||||
bool AtlasNode::initWithTileFile(const char *tile, unsigned int tileWidth, unsigned int tileHeight, unsigned int itemsToRender)
|
||||
bool AtlasNode::initWithTileFile(const std::string& tile, long tileWidth, long tileHeight, long itemsToRender)
|
||||
{
|
||||
CCASSERT(tile != NULL, "title should not be null");
|
||||
Texture2D *texture = TextureCache::getInstance()->addImage(tile);
|
||||
CCASSERT(tile.size() > 0, "file size should not be empty");
|
||||
Texture2D *texture = Director::getInstance()->getTextureCache()->addImage(tile);
|
||||
return initWithTexture(texture, tileWidth, tileHeight, itemsToRender);
|
||||
}
|
||||
|
||||
bool AtlasNode::initWithTexture(Texture2D* texture, unsigned int tileWidth, unsigned int tileHeight,
|
||||
unsigned int itemsToRender)
|
||||
bool AtlasNode::initWithTexture(Texture2D* texture, long tileWidth, long tileHeight, long itemsToRender)
|
||||
{
|
||||
_itemWidth = tileWidth;
|
||||
_itemHeight = tileHeight;
|
||||
|
@ -247,12 +245,12 @@ TextureAtlas * AtlasNode::getTextureAtlas() const
|
|||
return _textureAtlas;
|
||||
}
|
||||
|
||||
unsigned int AtlasNode::getQuadsToDraw() const
|
||||
long AtlasNode::getQuadsToDraw() const
|
||||
{
|
||||
return _quadsToDraw;
|
||||
}
|
||||
|
||||
void AtlasNode::setQuadsToDraw(unsigned int uQuadsToDraw)
|
||||
void AtlasNode::setQuadsToDraw(long uQuadsToDraw)
|
||||
{
|
||||
_quadsToDraw = uQuadsToDraw;
|
||||
}
|
|
@ -52,8 +52,7 @@ class CC_DLL AtlasNode : public NodeRGBA, public TextureProtocol
|
|||
{
|
||||
public:
|
||||
/** creates a AtlasNode with an Atlas file the width and height of each item and the quantity of items to render*/
|
||||
static AtlasNode * create(const char* tile,unsigned int tileWidth, unsigned int tileHeight,
|
||||
unsigned int itemsToRender);
|
||||
static AtlasNode * create(const std::string& filename, long tileWidth, long tileHeight, long itemsToRender);
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -65,10 +64,10 @@ public:
|
|||
virtual ~AtlasNode();
|
||||
|
||||
/** initializes an AtlasNode with an Atlas file the width and height of each item and the quantity of items to render*/
|
||||
bool initWithTileFile(const char* tile, unsigned int tileWidth, unsigned int tileHeight, unsigned int itemsToRender);
|
||||
bool initWithTileFile(const std::string& tile, long tileWidth, long tileHeight, long itemsToRender);
|
||||
|
||||
/** initializes an AtlasNode with a texture the width and height of each item measured in points and the quantity of items to render*/
|
||||
bool initWithTexture(Texture2D* texture, unsigned int tileWidth, unsigned int tileHeight, unsigned int itemsToRender);
|
||||
bool initWithTexture(Texture2D* texture, long tileWidth, long tileHeight, long itemsToRender);
|
||||
|
||||
/** updates the Atlas (indexed vertex array).
|
||||
* Shall be overridden in subclasses
|
||||
|
@ -78,8 +77,8 @@ public:
|
|||
void setTextureAtlas(TextureAtlas* textureAtlas);
|
||||
TextureAtlas* getTextureAtlas() const;
|
||||
|
||||
void setQuadsToDraw(unsigned int quadsToDraw);
|
||||
unsigned int getQuadsToDraw() const;
|
||||
void setQuadsToDraw(long quadsToDraw);
|
||||
long getQuadsToDraw() const;
|
||||
|
||||
|
||||
// Overrides
|
||||
|
@ -115,14 +114,14 @@ private :
|
|||
|
||||
protected:
|
||||
//! chars per row
|
||||
unsigned int _itemsPerRow;
|
||||
long _itemsPerRow;
|
||||
//! chars per column
|
||||
unsigned int _itemsPerColumn;
|
||||
long _itemsPerColumn;
|
||||
|
||||
//! width of each char
|
||||
unsigned int _itemWidth;
|
||||
long _itemWidth;
|
||||
//! height of each char
|
||||
unsigned int _itemHeight;
|
||||
long _itemHeight;
|
||||
|
||||
Color3B _colorUnmodified;
|
||||
|
||||
|
@ -132,7 +131,7 @@ protected:
|
|||
BlendFunc _blendFunc;
|
||||
|
||||
// quads to draw
|
||||
unsigned int _quadsToDraw;
|
||||
long _quadsToDraw;
|
||||
// color uniform
|
||||
GLint _uniformColor;
|
||||
// This varible is only used for LabelAtlas FPS display. So plz don't modify its value.
|
|
@ -24,10 +24,10 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
|
||||
#include "CCCamera.h"
|
||||
#include "cocoa/CCString.h"
|
||||
#include "CCString.h"
|
||||
#include "CCGL.h"
|
||||
|
||||
#include "draw_nodes/CCDrawingPrimitives.h"
|
||||
#include "CCDrawingPrimitives.h"
|
||||
#include "CCDirector.h"
|
||||
#include "kazmath/GL/matrix.h"
|
||||
|
|
@ -29,7 +29,7 @@ THE SOFTWARE.
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "cocoa/CCObject.h"
|
||||
#include "CCObject.h"
|
||||
#include "ccMacros.h"
|
||||
#include "kazmath/mat4.h"
|
||||
|
|
@ -27,10 +27,10 @@
|
|||
|
||||
#include "CCClippingNode.h"
|
||||
#include "kazmath/GL/matrix.h"
|
||||
#include "shaders/CCGLProgram.h"
|
||||
#include "shaders/CCShaderCache.h"
|
||||
#include "CCGLProgram.h"
|
||||
#include "CCShaderCache.h"
|
||||
#include "CCDirector.h"
|
||||
#include "draw_nodes/CCDrawingPrimitives.h"
|
||||
#include "CCDrawingPrimitives.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -311,6 +311,7 @@ void ClippingNode::visit()
|
|||
GLProgram *program = ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST);
|
||||
GLint alphaValueLocation = glGetUniformLocation(program->getProgram(), GLProgram::UNIFORM_NAME_ALPHA_TEST_VALUE);
|
||||
// set our alphaThreshold
|
||||
program->use();
|
||||
program->setUniformLocationWith1f(alphaValueLocation, _alphaThreshold);
|
||||
// we need to recursively apply this shader to all the nodes in the stencil node
|
||||
// XXX: we should have a way to apply shader to all nodes without having to do this
|
|
@ -28,7 +28,7 @@
|
|||
#ifndef __MISCNODE_CCCLIPPING_NODE_H__
|
||||
#define __MISCNODE_CCCLIPPING_NODE_H__
|
||||
|
||||
#include "base_nodes/CCNode.h"
|
||||
#include "CCNode.h"
|
||||
#include "CCGL.h"
|
||||
|
||||
NS_CC_BEGIN
|
|
@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "support/component/CCComponent.h"
|
||||
#include "CCComponent.h"
|
||||
|
||||
|
||||
NS_CC_BEGIN
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
|||
#ifndef __CC_FRAMEWORK_COMPONENT_H__
|
||||
#define __CC_FRAMEWORK_COMPONENT_H__
|
||||
|
||||
#include "cocoa/CCObject.h"
|
||||
#include "CCObject.h"
|
||||
#include <string>
|
||||
|
||||
NS_CC_BEGIN
|
|
@ -23,8 +23,8 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
|
||||
|
||||
#include "support/component/CCComponentContainer.h"
|
||||
#include "support/component/CCComponent.h"
|
||||
#include "CCComponentContainer.h"
|
||||
#include "CCComponent.h"
|
||||
#include "CCDirector.h"
|
||||
|
||||
NS_CC_BEGIN
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
|||
#ifndef __CC_FRAMEWORK_COMCONTAINER_H__
|
||||
#define __CC_FRAMEWORK_COMCONTAINER_H__
|
||||
|
||||
#include "cocoa/CCDictionary.h"
|
||||
#include "CCDictionary.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
|
@ -0,0 +1,390 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2010 Ricardo Quesada
|
||||
|
||||
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.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCConfiguration.h"
|
||||
#include <string.h>
|
||||
#include "ccMacros.h"
|
||||
#include "ccConfig.h"
|
||||
#include "CCDictionary.h"
|
||||
#include "CCInteger.h"
|
||||
#include "CCBool.h"
|
||||
#include "cocos2d.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
||||
Configuration* Configuration::s_sharedConfiguration = nullptr;
|
||||
|
||||
Configuration::Configuration()
|
||||
: _maxTextureSize(0)
|
||||
, _maxModelviewStackDepth(0)
|
||||
, _supportsPVRTC(false)
|
||||
, _supportsETC1(false)
|
||||
, _supportsS3TC(false)
|
||||
, _supportsATITC(false)
|
||||
, _supportsNPOT(false)
|
||||
, _supportsBGRA8888(false)
|
||||
, _supportsDiscardFramebuffer(false)
|
||||
, _supportsShareableVAO(false)
|
||||
, _maxSamplesAllowed(0)
|
||||
, _maxTextureUnits(0)
|
||||
, _glExtensions(nullptr)
|
||||
, _valueDict(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
bool Configuration::init()
|
||||
{
|
||||
_valueDict = Dictionary::create();
|
||||
_valueDict->retain();
|
||||
|
||||
_valueDict->setObject(String::create( cocos2dVersion() ), "cocos2d.x.version");
|
||||
|
||||
|
||||
#if CC_ENABLE_PROFILERS
|
||||
_valueDict->setObject(Bool::create(true), "cocos2d.x.compiled_with_profiler");
|
||||
#else
|
||||
_valueDict->setObject(Bool::create(false), "cocos2d.x.compiled_with_profiler");
|
||||
#endif
|
||||
|
||||
#if CC_ENABLE_GL_STATE_CACHE == 0
|
||||
_valueDict->setObject(Bool::create(false), "cocos2d.x.compiled_with_gl_state_cache");
|
||||
#else
|
||||
_valueDict->setObject(Bool::create(true), "cocos2d.x.compiled_with_gl_state_cache");
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Configuration::~Configuration()
|
||||
{
|
||||
_valueDict->release();
|
||||
}
|
||||
|
||||
void Configuration::dumpInfo() const
|
||||
{
|
||||
// Dump
|
||||
PrettyPrinter visitor(0);
|
||||
_valueDict->acceptVisitor(visitor);
|
||||
|
||||
CCLOG("%s", visitor.getResult().c_str());
|
||||
|
||||
|
||||
// And Dump some warnings as well
|
||||
#if CC_ENABLE_PROFILERS
|
||||
CCLOG("cocos2d: **** WARNING **** CC_ENABLE_PROFILERS is defined. Disable it when you finish profiling (from ccConfig.h)");
|
||||
printf("\n");
|
||||
#endif
|
||||
|
||||
#if CC_ENABLE_GL_STATE_CACHE == 0
|
||||
CCLOG("");
|
||||
CCLOG("cocos2d: **** WARNING **** CC_ENABLE_GL_STATE_CACHE is disabled. To improve performance, enable it (from ccConfig.h)");
|
||||
printf("\n");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void Configuration::gatherGPUInfo()
|
||||
{
|
||||
_valueDict->setObject(String::create((const char*)glGetString(GL_VENDOR)), "gl.vendor");
|
||||
_valueDict->setObject(String::create((const char*)glGetString(GL_RENDERER)), "gl.renderer");
|
||||
_valueDict->setObject(String::create((const char*)glGetString(GL_VERSION)), "gl.version");
|
||||
|
||||
_glExtensions = (char *)glGetString(GL_EXTENSIONS);
|
||||
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &_maxTextureSize);
|
||||
_valueDict->setObject(Integer::create((int)_maxTextureSize), "gl.max_texture_size");
|
||||
|
||||
glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &_maxTextureUnits);
|
||||
_valueDict->setObject(Integer::create((int)_maxTextureUnits), "gl.max_texture_units");
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
||||
glGetIntegerv(GL_MAX_SAMPLES_APPLE, &_maxSamplesAllowed);
|
||||
_valueDict->setObject(Integer::create((int)_maxSamplesAllowed), "gl.max_samples_allowed");
|
||||
#endif
|
||||
|
||||
_supportsETC1 = checkForGLExtension("GL_OES_compressed_ETC1_RGB8_texture");
|
||||
_valueDict->setObject(Bool::create(_supportsETC1), "gl.supports_ETC1");
|
||||
|
||||
_supportsS3TC = checkForGLExtension("GL_EXT_texture_compression_s3tc");
|
||||
_valueDict->setObject(Bool::create(_supportsS3TC), "gl.supports_S3TC");
|
||||
|
||||
_supportsATITC = checkForGLExtension("GL_AMD_compressed_ATC_texture");
|
||||
_valueDict->setObject(Bool::create(_supportsATITC), "gl.supports_ATITC");
|
||||
|
||||
_supportsPVRTC = checkForGLExtension("GL_IMG_texture_compression_pvrtc");
|
||||
_valueDict->setObject(Bool::create(_supportsPVRTC), "gl.supports_PVRTC");
|
||||
|
||||
_supportsNPOT = true;
|
||||
_valueDict->setObject(Bool::create(_supportsNPOT), "gl.supports_NPOT");
|
||||
|
||||
_supportsBGRA8888 = checkForGLExtension("GL_IMG_texture_format_BGRA888");
|
||||
_valueDict->setObject(Bool::create(_supportsBGRA8888), "gl.supports_BGRA8888");
|
||||
|
||||
_supportsDiscardFramebuffer = checkForGLExtension("GL_EXT_discard_framebuffer");
|
||||
_valueDict->setObject(Bool::create(_supportsDiscardFramebuffer), "gl.supports_discard_framebuffer");
|
||||
|
||||
_supportsShareableVAO = checkForGLExtension("vertex_array_object");
|
||||
_valueDict->setObject(Bool::create(_supportsShareableVAO), "gl.supports_vertex_array_object");
|
||||
|
||||
CHECK_GL_ERROR_DEBUG();
|
||||
}
|
||||
|
||||
Configuration* Configuration::getInstance()
|
||||
{
|
||||
if (! s_sharedConfiguration)
|
||||
{
|
||||
s_sharedConfiguration = new Configuration();
|
||||
s_sharedConfiguration->init();
|
||||
}
|
||||
|
||||
return s_sharedConfiguration;
|
||||
}
|
||||
|
||||
void Configuration::destroyInstance()
|
||||
{
|
||||
CC_SAFE_RELEASE_NULL(s_sharedConfiguration);
|
||||
}
|
||||
|
||||
// XXX: deprecated
|
||||
Configuration* Configuration::sharedConfiguration()
|
||||
{
|
||||
return Configuration::getInstance();
|
||||
}
|
||||
|
||||
// XXX: deprecated
|
||||
void Configuration::purgeConfiguration()
|
||||
{
|
||||
Configuration::destroyInstance();
|
||||
}
|
||||
|
||||
|
||||
bool Configuration::checkForGLExtension(const string &searchName) const
|
||||
{
|
||||
bool ret = false;
|
||||
const char *kSearchName = searchName.c_str();
|
||||
|
||||
if (_glExtensions &&
|
||||
strstr(_glExtensions, kSearchName))
|
||||
{
|
||||
ret = true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
//
|
||||
// getters for specific variables.
|
||||
// Mantained for backward compatiblity reasons only.
|
||||
//
|
||||
int Configuration::getMaxTextureSize() const
|
||||
{
|
||||
return _maxTextureSize;
|
||||
}
|
||||
|
||||
int Configuration::getMaxModelviewStackDepth() const
|
||||
{
|
||||
return _maxModelviewStackDepth;
|
||||
}
|
||||
|
||||
int Configuration::getMaxTextureUnits() const
|
||||
{
|
||||
return _maxTextureUnits;
|
||||
}
|
||||
|
||||
bool Configuration::supportsNPOT() const
|
||||
{
|
||||
return _supportsNPOT;
|
||||
}
|
||||
|
||||
bool Configuration::supportsPVRTC() const
|
||||
{
|
||||
return _supportsPVRTC;
|
||||
}
|
||||
|
||||
bool Configuration::supportsETC() const
|
||||
{
|
||||
//GL_ETC1_RGB8_OES is not defined in old opengl version
|
||||
#ifdef GL_ETC1_RGB8_OES
|
||||
return _supportsETC1;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Configuration::supportsS3TC() const
|
||||
{
|
||||
return _supportsS3TC;
|
||||
}
|
||||
|
||||
bool Configuration::supportsATITC() const
|
||||
{
|
||||
return _supportsATITC;
|
||||
}
|
||||
|
||||
bool Configuration::supportsBGRA8888() const
|
||||
{
|
||||
return _supportsBGRA8888;
|
||||
}
|
||||
|
||||
bool Configuration::supportsDiscardFramebuffer() const
|
||||
{
|
||||
return _supportsDiscardFramebuffer;
|
||||
}
|
||||
|
||||
bool Configuration::supportsShareableVAO() const
|
||||
{
|
||||
#if CC_TEXTURE_ATLAS_USE_VAO
|
||||
return _supportsShareableVAO;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// generic getters for properties
|
||||
//
|
||||
const char *Configuration::getCString(const char *key, const char *defaultValue) const
|
||||
{
|
||||
Object *ret = _valueDict->objectForKey(key);
|
||||
if (ret)
|
||||
{
|
||||
if (String *str=dynamic_cast<String*>(ret))
|
||||
return str->getCString();
|
||||
|
||||
CCASSERT(false, "Key found, but from different type");
|
||||
}
|
||||
|
||||
// XXX: Should it throw an exception ?
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/** returns the value of a given key as a boolean */
|
||||
bool Configuration::getBool(const char *key, bool defaultValue) const
|
||||
{
|
||||
Object *ret = _valueDict->objectForKey(key);
|
||||
if (ret)
|
||||
{
|
||||
if (Bool *boolobj=dynamic_cast<Bool*>(ret))
|
||||
return boolobj->getValue();
|
||||
if (String *strobj=dynamic_cast<String*>(ret))
|
||||
return strobj->boolValue();
|
||||
CCASSERT(false, "Key found, but from different type");
|
||||
}
|
||||
|
||||
// XXX: Should it throw an exception ?
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/** returns the value of a given key as a double */
|
||||
double Configuration::getNumber( const char *key, double defaultValue ) const
|
||||
{
|
||||
Object *ret = _valueDict->objectForKey(key);
|
||||
if( ret )
|
||||
{
|
||||
if (Double *obj=dynamic_cast<Double*>(ret))
|
||||
return obj->getValue();
|
||||
|
||||
if (Integer *obj=dynamic_cast<Integer*>(ret))
|
||||
return obj->getValue();
|
||||
|
||||
if (String *strobj=dynamic_cast<String*>(ret))
|
||||
return strobj->doubleValue();
|
||||
|
||||
CCASSERT(false, "Key found, but from different type");
|
||||
}
|
||||
|
||||
// XXX: Should it throw an exception ?
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
Object * Configuration::getObject(const char *key) const
|
||||
{
|
||||
return _valueDict->objectForKey(key);
|
||||
}
|
||||
|
||||
void Configuration::setObject(const char *key, Object *value)
|
||||
{
|
||||
_valueDict->setObject(value, key);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// load file
|
||||
//
|
||||
void Configuration::loadConfigFile(const char *filename)
|
||||
{
|
||||
Dictionary *dict = Dictionary::createWithContentsOfFile(filename);
|
||||
CCASSERT(dict, "cannot create dictionary");
|
||||
|
||||
// search for metadata
|
||||
bool validMetadata = false;
|
||||
Object *metadata = dict->objectForKey("metadata");
|
||||
if (metadata && dynamic_cast<Dictionary*>(metadata))
|
||||
{
|
||||
Object *format_o = static_cast<Dictionary*>(metadata)->objectForKey("format");
|
||||
|
||||
// XXX: cocos2d-x returns Strings when importing from .plist. This bug will be addressed in cocos2d-x v3.x
|
||||
if (format_o && dynamic_cast<String*>(format_o))
|
||||
{
|
||||
int format = static_cast<String*>(format_o)->intValue();
|
||||
|
||||
// Support format: 1
|
||||
if (format == 1)
|
||||
{
|
||||
validMetadata = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! validMetadata)
|
||||
{
|
||||
CCLOG("Invalid config format for file: %s", filename);
|
||||
return;
|
||||
}
|
||||
|
||||
Object *data = dict->objectForKey("data");
|
||||
if (!data || !dynamic_cast<Dictionary*>(data))
|
||||
{
|
||||
CCLOG("Expected 'data' dict, but not found. Config file: %s", filename);
|
||||
return;
|
||||
}
|
||||
|
||||
// Add all keys in the existing dictionary
|
||||
Dictionary *data_dict = static_cast<Dictionary*>(data);
|
||||
DictElement* element;
|
||||
CCDICT_FOREACH(data_dict, element)
|
||||
{
|
||||
if(! _valueDict->objectForKey( element->getStrKey() ))
|
||||
_valueDict->setObject(element->getObject(), element->getStrKey());
|
||||
else
|
||||
CCLOG("Key already present. Ignoring '%s'", element->getStrKey());
|
||||
}
|
||||
}
|
||||
|
||||
NS_CC_END
|
|
@ -26,9 +26,9 @@ THE SOFTWARE.
|
|||
#ifndef __CCCONFIGURATION_H__
|
||||
#define __CCCONFIGURATION_H__
|
||||
|
||||
#include "cocoa/CCObject.h"
|
||||
#include "CCObject.h"
|
||||
#include "CCGL.h"
|
||||
#include "cocoa/CCString.h"
|
||||
#include "CCString.h"
|
||||
#include <string>
|
||||
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
#define __COCOS2D_CCDEPRECATED_H__
|
||||
|
||||
#include <math.h>
|
||||
#include "cocoa/CCGeometry.h"
|
||||
#include "CCGeometry.h"
|
||||
#include "ccTypes.h"
|
||||
|
||||
NS_CC_BEGIN
|
|
@ -31,35 +31,36 @@ THE SOFTWARE.
|
|||
#include <string>
|
||||
|
||||
#include "ccFPSImages.h"
|
||||
#include "draw_nodes/CCDrawingPrimitives.h"
|
||||
#include "cocoa/CCNS.h"
|
||||
#include "layers_scenes_transitions_nodes/CCScene.h"
|
||||
#include "cocoa/CCArray.h"
|
||||
#include "CCDrawingPrimitives.h"
|
||||
#include "CCNS.h"
|
||||
#include "CCScene.h"
|
||||
#include "CCArray.h"
|
||||
#include "CCScheduler.h"
|
||||
#include "ccMacros.h"
|
||||
#include "support/CCNotificationCenter.h"
|
||||
#include "layers_scenes_transitions_nodes/CCTransition.h"
|
||||
#include "textures/CCTextureCache.h"
|
||||
#include "sprite_nodes/CCSpriteFrameCache.h"
|
||||
#include "cocoa/CCAutoreleasePool.h"
|
||||
#include "CCNotificationCenter.h"
|
||||
#include "CCTransition.h"
|
||||
#include "CCTextureCache.h"
|
||||
#include "CCSpriteFrameCache.h"
|
||||
#include "CCAutoreleasePool.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
#include "CCApplication.h"
|
||||
#include "label_nodes/CCLabelBMFont.h"
|
||||
#include "label_nodes/CCLabelAtlas.h"
|
||||
#include "actions/CCActionManager.h"
|
||||
#include "sprite_nodes/CCAnimationCache.h"
|
||||
#include "event_dispatcher/CCTouch.h"
|
||||
#include "event_dispatcher/CCEventDispatcher.h"
|
||||
#include "support/user_default/CCUserDefault.h"
|
||||
#include "shaders/ccGLStateCache.h"
|
||||
#include "shaders/CCShaderCache.h"
|
||||
#include "CCLabelBMFont.h"
|
||||
#include "CCLabelAtlas.h"
|
||||
#include "CCActionManager.h"
|
||||
#include "CCAnimationCache.h"
|
||||
#include "CCTouch.h"
|
||||
#include "CCEventDispatcher.h"
|
||||
#include "CCUserDefault.h"
|
||||
#include "ccGLStateCache.h"
|
||||
#include "CCShaderCache.h"
|
||||
#include "kazmath/kazmath.h"
|
||||
#include "kazmath/GL/matrix.h"
|
||||
#include "support/CCProfiling.h"
|
||||
#include "CCProfiling.h"
|
||||
#include "platform/CCImage.h"
|
||||
#include "CCEGLView.h"
|
||||
#include "CCConfiguration.h"
|
||||
|
||||
#include "CCEventDispatcher.h"
|
||||
#include "CCFontFreeType.h"
|
||||
|
||||
/**
|
||||
Position of the FPS
|
||||
|
@ -143,6 +144,10 @@ bool Director::init(void)
|
|||
_actionManager = new ActionManager();
|
||||
_scheduler->scheduleUpdateForTarget(_actionManager, Scheduler::PRIORITY_SYSTEM, false);
|
||||
|
||||
_eventDispatcher = new EventDispatcher();
|
||||
//init TextureCache
|
||||
initTextureCache();
|
||||
|
||||
// create autorelease pool
|
||||
PoolManager::sharedPoolManager()->push();
|
||||
|
||||
|
@ -162,7 +167,8 @@ Director::~Director(void)
|
|||
CC_SAFE_RELEASE(_scenesStack);
|
||||
CC_SAFE_RELEASE(_scheduler);
|
||||
CC_SAFE_RELEASE(_actionManager);
|
||||
|
||||
CC_SAFE_RELEASE(_eventDispatcher);
|
||||
|
||||
// pop the autorelease pool
|
||||
PoolManager::sharedPoolManager()->pop();
|
||||
PoolManager::purgePoolManager();
|
||||
|
@ -229,8 +235,6 @@ void Director::setGLDefaultValues()
|
|||
// Draw the Scene
|
||||
void Director::drawScene()
|
||||
{
|
||||
Node::resetEventPriorityIndex();
|
||||
|
||||
// calculate "global" dt
|
||||
calculateDeltaTime();
|
||||
|
||||
|
@ -357,6 +361,29 @@ void Director::setOpenGLView(EGLView *pobOpenGLView)
|
|||
}
|
||||
}
|
||||
|
||||
TextureCache* Director::getTextureCache() const
|
||||
{
|
||||
return _textureCache;
|
||||
}
|
||||
|
||||
void Director::initTextureCache()
|
||||
{
|
||||
#ifdef EMSCRIPTEN
|
||||
_textureCache = new TextureCacheEmscripten();
|
||||
#else
|
||||
_textureCache = new TextureCache();
|
||||
#endif // EMSCRIPTEN
|
||||
}
|
||||
|
||||
void Director::destroyTextureCache()
|
||||
{
|
||||
if (_textureCache)
|
||||
{
|
||||
_textureCache->waitForQuit();
|
||||
CC_SAFE_RELEASE_NULL(_textureCache);
|
||||
}
|
||||
}
|
||||
|
||||
void Director::setViewport()
|
||||
{
|
||||
if (_openGLView)
|
||||
|
@ -435,7 +462,7 @@ void Director::purgeCachedData(void)
|
|||
if (s_SharedDirector->getOpenGLView())
|
||||
{
|
||||
SpriteFrameCache::getInstance()->removeUnusedSpriteFrames();
|
||||
TextureCache::getInstance()->removeUnusedTextures();
|
||||
_textureCache->removeUnusedTextures();
|
||||
}
|
||||
FileUtils::getInstance()->purgeCachedEntries();
|
||||
}
|
||||
|
@ -685,11 +712,12 @@ void Director::purgeDirector()
|
|||
// purge bitmap cache
|
||||
LabelBMFont::purgeCachedData();
|
||||
|
||||
FontFreeType::shutdownFreeType();
|
||||
|
||||
// purge all managed caches
|
||||
DrawPrimitives::free();
|
||||
AnimationCache::destroyInstance();
|
||||
SpriteFrameCache::destroyInstance();
|
||||
TextureCache::destroyInstance();
|
||||
ShaderCache::destroyInstance();
|
||||
FileUtils::destroyInstance();
|
||||
Configuration::destroyInstance();
|
||||
|
@ -697,10 +725,11 @@ void Director::purgeDirector()
|
|||
// cocos2d-x specific data structures
|
||||
UserDefault::destroyInstance();
|
||||
NotificationCenter::destroyInstance();
|
||||
EventDispatcher::destroyInstance();
|
||||
|
||||
GL::invalidateStateCache();
|
||||
|
||||
destroyTextureCache();
|
||||
|
||||
CHECK_GL_ERROR_DEBUG();
|
||||
|
||||
// OpenGL view
|
||||
|
@ -828,7 +857,7 @@ void Director::calculateMPF()
|
|||
}
|
||||
|
||||
// returns the FPS image data pointer and len
|
||||
void Director::getFPSImageData(unsigned char** datapointer, unsigned int* length)
|
||||
void Director::getFPSImageData(unsigned char** datapointer, long* length)
|
||||
{
|
||||
// XXX fixed me if it should be used
|
||||
*datapointer = cc_fps_images_png;
|
||||
|
@ -838,21 +867,20 @@ void Director::getFPSImageData(unsigned char** datapointer, unsigned int* length
|
|||
void Director::createStatsLabel()
|
||||
{
|
||||
Texture2D *texture = nullptr;
|
||||
TextureCache *textureCache = TextureCache::getInstance();
|
||||
|
||||
if (_FPSLabel && _SPFLabel)
|
||||
{
|
||||
CC_SAFE_RELEASE_NULL(_FPSLabel);
|
||||
CC_SAFE_RELEASE_NULL(_SPFLabel);
|
||||
CC_SAFE_RELEASE_NULL(_drawsLabel);
|
||||
textureCache->removeTextureForKey("/cc_fps_images");
|
||||
_textureCache->removeTextureForKey("/cc_fps_images");
|
||||
FileUtils::getInstance()->purgeCachedEntries();
|
||||
}
|
||||
|
||||
Texture2D::PixelFormat currentFormat = Texture2D::getDefaultAlphaPixelFormat();
|
||||
Texture2D::setDefaultAlphaPixelFormat(Texture2D::PixelFormat::RGBA4444);
|
||||
unsigned char *data = nullptr;
|
||||
unsigned int dataLength = 0;
|
||||
long dataLength = 0;
|
||||
getFPSImageData(&data, &dataLength);
|
||||
|
||||
Image* image = new Image();
|
||||
|
@ -862,7 +890,7 @@ void Director::createStatsLabel()
|
|||
return;
|
||||
}
|
||||
|
||||
texture = textureCache->addImage(image, "/cc_fps_images");
|
||||
texture = _textureCache->addImage(image, "/cc_fps_images");
|
||||
CC_SAFE_RELEASE(image);
|
||||
|
||||
/*
|
||||
|
@ -968,6 +996,21 @@ ActionManager* Director::getActionManager() const
|
|||
return _actionManager;
|
||||
}
|
||||
|
||||
EventDispatcher* Director::getEventDispatcher() const
|
||||
{
|
||||
return _eventDispatcher;
|
||||
}
|
||||
|
||||
void Director::setEventDispatcher(EventDispatcher* dispatcher)
|
||||
{
|
||||
if (_eventDispatcher != dispatcher)
|
||||
{
|
||||
CC_SAFE_RETAIN(dispatcher);
|
||||
CC_SAFE_RELEASE(_eventDispatcher);
|
||||
_eventDispatcher = dispatcher;
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************
|
||||
* implementation of DisplayLinkDirector
|
||||
**************************************************/
|
|
@ -27,15 +27,15 @@ THE SOFTWARE.
|
|||
#ifndef __CCDIRECTOR_H__
|
||||
#define __CCDIRECTOR_H__
|
||||
|
||||
#include "platform/CCPlatformMacros.h"
|
||||
#include "CCPlatformMacros.h"
|
||||
|
||||
#include "cocoa/CCObject.h"
|
||||
#include "CCObject.h"
|
||||
#include "ccTypes.h"
|
||||
#include "cocoa/CCGeometry.h"
|
||||
#include "cocoa/CCArray.h"
|
||||
#include "CCGeometry.h"
|
||||
#include "CCArray.h"
|
||||
#include "CCGL.h"
|
||||
#include "kazmath/mat4.h"
|
||||
#include "label_nodes/CCLabelAtlas.h"
|
||||
#include "CCLabelAtlas.h"
|
||||
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
@ -53,10 +53,8 @@ class DirectorDelegate;
|
|||
class Node;
|
||||
class Scheduler;
|
||||
class ActionManager;
|
||||
class TouchDispatcher;
|
||||
class KeyboardDispatcher;
|
||||
class KeypadDispatcher;
|
||||
class Accelerometer;
|
||||
class EventDispatcher;
|
||||
class TextureCache;
|
||||
|
||||
/**
|
||||
@brief Class that creates and handles the main Window and manages how
|
||||
|
@ -140,6 +138,8 @@ public:
|
|||
inline EGLView* getOpenGLView() { return _openGLView; }
|
||||
void setOpenGLView(EGLView *pobOpenGLView);
|
||||
|
||||
TextureCache* getTextureCache() const;
|
||||
|
||||
inline bool isNextDeltaTimeZero() { return _nextDeltaTimeZero; }
|
||||
void setNextDeltaTimeZero(bool nextDeltaTimeZero);
|
||||
|
||||
|
@ -351,8 +351,24 @@ public:
|
|||
@since v2.0
|
||||
*/
|
||||
void setActionManager(ActionManager* actionManager);
|
||||
|
||||
/** Gets the EventDispatcher associated with this director
|
||||
@since v3.0
|
||||
*/
|
||||
EventDispatcher* getEventDispatcher() const;
|
||||
|
||||
/** Sets the EventDispatcher associated with this director
|
||||
@since v3.0
|
||||
*/
|
||||
void setEventDispatcher(EventDispatcher* dispatcher);
|
||||
|
||||
/* Gets delta time since last tick to main loop */
|
||||
float getDeltaTime() const;
|
||||
|
||||
/**
|
||||
* get Frame Rate
|
||||
*/
|
||||
float getFrameRate() const { return _frameRate; }
|
||||
|
||||
protected:
|
||||
void purgeDirector();
|
||||
|
@ -363,11 +379,15 @@ protected:
|
|||
void showStats();
|
||||
void createStatsLabel();
|
||||
void calculateMPF();
|
||||
void getFPSImageData(unsigned char** datapointer, unsigned int* length);
|
||||
void getFPSImageData(unsigned char** datapointer, long* length);
|
||||
|
||||
/** calculates delta time since last time it was called */
|
||||
void calculateDeltaTime();
|
||||
|
||||
//textureCache creation or release
|
||||
void initTextureCache();
|
||||
void destroyTextureCache();
|
||||
|
||||
protected:
|
||||
/** Scheduler associated with this director
|
||||
@since v2.0
|
||||
|
@ -378,6 +398,11 @@ protected:
|
|||
@since v2.0
|
||||
*/
|
||||
ActionManager* _actionManager;
|
||||
|
||||
/** EventDispatcher associated with this director
|
||||
@since v3.0
|
||||
*/
|
||||
EventDispatcher* _eventDispatcher;
|
||||
|
||||
/* delta time since last tick to main loop */
|
||||
float _deltaTime;
|
||||
|
@ -385,6 +410,9 @@ protected:
|
|||
/* The EGLView, where everything is rendered */
|
||||
EGLView *_openGLView;
|
||||
|
||||
//texture cache belongs to this director
|
||||
TextureCache *_textureCache;
|
||||
|
||||
double _animationInterval;
|
||||
double _oldAnimationInterval;
|
||||
|
|
@ -0,0 +1,467 @@
|
|||
/* Copyright (c) 2012 Scott Lembcke and Howling Moon Software
|
||||
* Copyright (c) 2012 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.
|
||||
*/
|
||||
|
||||
#include "CCDrawNode.h"
|
||||
#include "CCShaderCache.h"
|
||||
#include "CCGL.h"
|
||||
#include "CCNotificationCenter.h"
|
||||
#include "CCEventType.h"
|
||||
#include "CCConfiguration.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
// Vertex2F == CGPoint in 32-bits, but not in 64-bits (OS X)
|
||||
// that's why the "v2f" functions are needed
|
||||
static Vertex2F v2fzero(0.0f,0.0f);
|
||||
|
||||
static inline Vertex2F v2f(float x, float y)
|
||||
{
|
||||
Vertex2F ret(x, y);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline Vertex2F v2fadd(const Vertex2F &v0, const Vertex2F &v1)
|
||||
{
|
||||
return v2f(v0.x+v1.x, v0.y+v1.y);
|
||||
}
|
||||
|
||||
static inline Vertex2F v2fsub(const Vertex2F &v0, const Vertex2F &v1)
|
||||
{
|
||||
return v2f(v0.x-v1.x, v0.y-v1.y);
|
||||
}
|
||||
|
||||
static inline Vertex2F v2fmult(const Vertex2F &v, float s)
|
||||
{
|
||||
return v2f(v.x * s, v.y * s);
|
||||
}
|
||||
|
||||
static inline Vertex2F v2fperp(const Vertex2F &p0)
|
||||
{
|
||||
return v2f(-p0.y, p0.x);
|
||||
}
|
||||
|
||||
static inline Vertex2F v2fneg(const Vertex2F &p0)
|
||||
{
|
||||
return v2f(-p0.x, - p0.y);
|
||||
}
|
||||
|
||||
static inline float v2fdot(const Vertex2F &p0, const Vertex2F &p1)
|
||||
{
|
||||
return p0.x * p1.x + p0.y * p1.y;
|
||||
}
|
||||
|
||||
static inline Vertex2F v2fforangle(float _a_)
|
||||
{
|
||||
return v2f(cosf(_a_), sinf(_a_));
|
||||
}
|
||||
|
||||
static inline Vertex2F v2fnormalize(const Vertex2F &p)
|
||||
{
|
||||
Point r = Point(p.x, p.y).normalize();
|
||||
return v2f(r.x, r.y);
|
||||
}
|
||||
|
||||
static inline Vertex2F __v2f(const Point &v)
|
||||
{
|
||||
//#ifdef __LP64__
|
||||
return v2f(v.x, v.y);
|
||||
// #else
|
||||
// return * ((Vertex2F*) &v);
|
||||
// #endif
|
||||
}
|
||||
|
||||
static inline Tex2F __t(const Vertex2F &v)
|
||||
{
|
||||
return *(Tex2F*)&v;
|
||||
}
|
||||
|
||||
// implementation of DrawNode
|
||||
|
||||
DrawNode::DrawNode()
|
||||
: _vao(0)
|
||||
, _vbo(0)
|
||||
, _bufferCapacity(0)
|
||||
, _bufferCount(0)
|
||||
, _buffer(NULL)
|
||||
, _dirty(false)
|
||||
{
|
||||
_blendFunc = BlendFunc::ALPHA_PREMULTIPLIED;
|
||||
}
|
||||
|
||||
DrawNode::~DrawNode()
|
||||
{
|
||||
free(_buffer);
|
||||
_buffer = NULL;
|
||||
|
||||
glDeleteBuffers(1, &_vbo);
|
||||
_vbo = 0;
|
||||
|
||||
if (Configuration::getInstance()->supportsShareableVAO()) {
|
||||
glDeleteVertexArrays(1, &_vao);
|
||||
GL::bindVAO(0);
|
||||
_vao = 0;
|
||||
}
|
||||
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
NotificationCenter::getInstance()->removeObserver(this, EVNET_COME_TO_FOREGROUND);
|
||||
#endif
|
||||
}
|
||||
|
||||
DrawNode* DrawNode::create()
|
||||
{
|
||||
DrawNode* pRet = new DrawNode();
|
||||
if (pRet && pRet->init())
|
||||
{
|
||||
pRet->autorelease();
|
||||
}
|
||||
else
|
||||
{
|
||||
CC_SAFE_DELETE(pRet);
|
||||
}
|
||||
|
||||
return pRet;
|
||||
}
|
||||
|
||||
void DrawNode::ensureCapacity(long count)
|
||||
{
|
||||
CCASSERT(count>=0, "capacity must be >= 0");
|
||||
|
||||
if(_bufferCount + count > _bufferCapacity)
|
||||
{
|
||||
_bufferCapacity += MAX(_bufferCapacity, count);
|
||||
_buffer = (V2F_C4B_T2F*)realloc(_buffer, _bufferCapacity*sizeof(V2F_C4B_T2F));
|
||||
}
|
||||
}
|
||||
|
||||
bool DrawNode::init()
|
||||
{
|
||||
_blendFunc = BlendFunc::ALPHA_PREMULTIPLIED;
|
||||
|
||||
setShaderProgram(ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_LENGTH_TEXTURE_COLOR));
|
||||
|
||||
ensureCapacity(512);
|
||||
|
||||
if (Configuration::getInstance()->supportsShareableVAO()) {
|
||||
glGenVertexArrays(1, &_vao);
|
||||
GL::bindVAO(_vao);
|
||||
}
|
||||
|
||||
glGenBuffers(1, &_vbo);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, _vbo);
|
||||
glBufferData(GL_ARRAY_BUFFER, sizeof(V2F_C4B_T2F)* _bufferCapacity, _buffer, GL_STREAM_DRAW);
|
||||
|
||||
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION);
|
||||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, vertices));
|
||||
|
||||
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
|
||||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, colors));
|
||||
|
||||
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORDS);
|
||||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORDS, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords));
|
||||
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
|
||||
if (Configuration::getInstance()->supportsShareableVAO()) {
|
||||
GL::bindVAO(0);
|
||||
}
|
||||
|
||||
CHECK_GL_ERROR_DEBUG();
|
||||
|
||||
_dirty = true;
|
||||
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
// Need to listen the event only when not use batchnode, because it will use VBO
|
||||
NotificationCenter::getInstance()->addObserver(this,
|
||||
callfuncO_selector(DrawNode::listenBackToForeground),
|
||||
EVNET_COME_TO_FOREGROUND,
|
||||
NULL);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void DrawNode::render()
|
||||
{
|
||||
if (_dirty)
|
||||
{
|
||||
glBindBuffer(GL_ARRAY_BUFFER, _vbo);
|
||||
glBufferData(GL_ARRAY_BUFFER, sizeof(V2F_C4B_T2F)*_bufferCapacity, _buffer, GL_STREAM_DRAW);
|
||||
_dirty = false;
|
||||
}
|
||||
if (Configuration::getInstance()->supportsShareableVAO()) {
|
||||
GL::bindVAO(_vao);
|
||||
}
|
||||
else {
|
||||
GL::enableVertexAttribs(GL::VERTEX_ATTRIB_FLAG_POS_COLOR_TEX);
|
||||
|
||||
glBindBuffer(GL_ARRAY_BUFFER, _vbo);
|
||||
// vertex
|
||||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, vertices));
|
||||
|
||||
// color
|
||||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, colors));
|
||||
|
||||
// texcood
|
||||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORDS, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords));
|
||||
}
|
||||
|
||||
glDrawArrays(GL_TRIANGLES, 0, _bufferCount);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
|
||||
CC_INCREMENT_GL_DRAWS(1);
|
||||
CHECK_GL_ERROR_DEBUG();
|
||||
}
|
||||
|
||||
void DrawNode::draw()
|
||||
{
|
||||
CC_NODE_DRAW_SETUP();
|
||||
GL::blendFunc(_blendFunc.src, _blendFunc.dst);
|
||||
|
||||
render();
|
||||
}
|
||||
|
||||
void DrawNode::drawDot(const Point &pos, float radius, const Color4F &color)
|
||||
{
|
||||
unsigned int vertex_count = 2*3;
|
||||
ensureCapacity(vertex_count);
|
||||
|
||||
V2F_C4B_T2F a = {Vertex2F(pos.x - radius, pos.y - radius), Color4B(color), Tex2F(-1.0, -1.0) };
|
||||
V2F_C4B_T2F b = {Vertex2F(pos.x - radius, pos.y + radius), Color4B(color), Tex2F(-1.0, 1.0) };
|
||||
V2F_C4B_T2F c = {Vertex2F(pos.x + radius, pos.y + radius), Color4B(color), Tex2F( 1.0, 1.0) };
|
||||
V2F_C4B_T2F d = {Vertex2F(pos.x + radius, pos.y - radius), Color4B(color), Tex2F( 1.0, -1.0) };
|
||||
|
||||
V2F_C4B_T2F_Triangle *triangles = (V2F_C4B_T2F_Triangle *)(_buffer + _bufferCount);
|
||||
V2F_C4B_T2F_Triangle triangle0 = {a, b, c};
|
||||
V2F_C4B_T2F_Triangle triangle1 = {a, c, d};
|
||||
triangles[0] = triangle0;
|
||||
triangles[1] = triangle1;
|
||||
|
||||
_bufferCount += vertex_count;
|
||||
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
void DrawNode::drawSegment(const Point &from, const Point &to, float radius, const Color4F &color)
|
||||
{
|
||||
unsigned int vertex_count = 6*3;
|
||||
ensureCapacity(vertex_count);
|
||||
|
||||
Vertex2F a = __v2f(from);
|
||||
Vertex2F b = __v2f(to);
|
||||
|
||||
|
||||
Vertex2F n = v2fnormalize(v2fperp(v2fsub(b, a)));
|
||||
Vertex2F t = v2fperp(n);
|
||||
|
||||
Vertex2F nw = v2fmult(n, radius);
|
||||
Vertex2F tw = v2fmult(t, radius);
|
||||
Vertex2F v0 = v2fsub(b, v2fadd(nw, tw));
|
||||
Vertex2F v1 = v2fadd(b, v2fsub(nw, tw));
|
||||
Vertex2F v2 = v2fsub(b, nw);
|
||||
Vertex2F v3 = v2fadd(b, nw);
|
||||
Vertex2F v4 = v2fsub(a, nw);
|
||||
Vertex2F v5 = v2fadd(a, nw);
|
||||
Vertex2F v6 = v2fsub(a, v2fsub(nw, tw));
|
||||
Vertex2F v7 = v2fadd(a, v2fadd(nw, tw));
|
||||
|
||||
|
||||
V2F_C4B_T2F_Triangle *triangles = (V2F_C4B_T2F_Triangle *)(_buffer + _bufferCount);
|
||||
|
||||
V2F_C4B_T2F_Triangle triangles0 = {
|
||||
{v0, Color4B(color), __t(v2fneg(v2fadd(n, t)))},
|
||||
{v1, Color4B(color), __t(v2fsub(n, t))},
|
||||
{v2, Color4B(color), __t(v2fneg(n))},
|
||||
};
|
||||
triangles[0] = triangles0;
|
||||
|
||||
V2F_C4B_T2F_Triangle triangles1 = {
|
||||
{v3, Color4B(color), __t(n)},
|
||||
{v1, Color4B(color), __t(v2fsub(n, t))},
|
||||
{v2, Color4B(color), __t(v2fneg(n))},
|
||||
};
|
||||
triangles[1] = triangles1;
|
||||
|
||||
V2F_C4B_T2F_Triangle triangles2 = {
|
||||
{v3, Color4B(color), __t(n)},
|
||||
{v4, Color4B(color), __t(v2fneg(n))},
|
||||
{v2, Color4B(color), __t(v2fneg(n))},
|
||||
};
|
||||
triangles[2] = triangles2;
|
||||
|
||||
V2F_C4B_T2F_Triangle triangles3 = {
|
||||
{v3, Color4B(color), __t(n)},
|
||||
{v4, Color4B(color), __t(v2fneg(n))},
|
||||
{v5, Color4B(color), __t(n) },
|
||||
};
|
||||
triangles[3] = triangles3;
|
||||
|
||||
V2F_C4B_T2F_Triangle triangles4 = {
|
||||
{v6, Color4B(color), __t(v2fsub(t, n))},
|
||||
{v4, Color4B(color), __t(v2fneg(n)) },
|
||||
{v5, Color4B(color), __t(n)},
|
||||
};
|
||||
triangles[4] = triangles4;
|
||||
|
||||
V2F_C4B_T2F_Triangle triangles5 = {
|
||||
{v6, Color4B(color), __t(v2fsub(t, n))},
|
||||
{v7, Color4B(color), __t(v2fadd(n, t))},
|
||||
{v5, Color4B(color), __t(n)},
|
||||
};
|
||||
triangles[5] = triangles5;
|
||||
|
||||
_bufferCount += vertex_count;
|
||||
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
void DrawNode::drawPolygon(Point *verts, long count, const Color4F &fillColor, float borderWidth, const Color4F &borderColor)
|
||||
{
|
||||
CCASSERT(count >= 0, "invalid count value");
|
||||
|
||||
struct ExtrudeVerts {Vertex2F offset, n;};
|
||||
struct ExtrudeVerts* extrude = (struct ExtrudeVerts*)malloc(sizeof(struct ExtrudeVerts)*count);
|
||||
memset(extrude, 0, sizeof(struct ExtrudeVerts)*count);
|
||||
|
||||
for(unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
Vertex2F v0 = __v2f(verts[(i-1+count)%count]);
|
||||
Vertex2F v1 = __v2f(verts[i]);
|
||||
Vertex2F v2 = __v2f(verts[(i+1)%count]);
|
||||
|
||||
Vertex2F n1 = v2fnormalize(v2fperp(v2fsub(v1, v0)));
|
||||
Vertex2F n2 = v2fnormalize(v2fperp(v2fsub(v2, v1)));
|
||||
|
||||
Vertex2F offset = v2fmult(v2fadd(n1, n2), 1.0/(v2fdot(n1, n2) + 1.0));
|
||||
struct ExtrudeVerts tmp = {offset, n2};
|
||||
extrude[i] = tmp;
|
||||
}
|
||||
|
||||
bool outline = (borderColor.a > 0.0 && borderWidth > 0.0);
|
||||
|
||||
unsigned int triangle_count = 3*count - 2;
|
||||
unsigned int vertex_count = 3*triangle_count;
|
||||
ensureCapacity(vertex_count);
|
||||
|
||||
V2F_C4B_T2F_Triangle *triangles = (V2F_C4B_T2F_Triangle *)(_buffer + _bufferCount);
|
||||
V2F_C4B_T2F_Triangle *cursor = triangles;
|
||||
|
||||
float inset = (outline == false ? 0.5 : 0.0);
|
||||
for(unsigned int i = 0; i < count-2; i++)
|
||||
{
|
||||
Vertex2F v0 = v2fsub(__v2f(verts[0 ]), v2fmult(extrude[0 ].offset, inset));
|
||||
Vertex2F v1 = v2fsub(__v2f(verts[i+1]), v2fmult(extrude[i+1].offset, inset));
|
||||
Vertex2F v2 = v2fsub(__v2f(verts[i+2]), v2fmult(extrude[i+2].offset, inset));
|
||||
|
||||
V2F_C4B_T2F_Triangle tmp = {
|
||||
{v0, Color4B(fillColor), __t(v2fzero)},
|
||||
{v1, Color4B(fillColor), __t(v2fzero)},
|
||||
{v2, Color4B(fillColor), __t(v2fzero)},
|
||||
};
|
||||
|
||||
*cursor++ = tmp;
|
||||
}
|
||||
|
||||
for(long i = 0; i < count; i++)
|
||||
{
|
||||
long j = (i+1)%count;
|
||||
Vertex2F v0 = __v2f(verts[i]);
|
||||
Vertex2F v1 = __v2f(verts[j]);
|
||||
|
||||
Vertex2F n0 = extrude[i].n;
|
||||
|
||||
Vertex2F offset0 = extrude[i].offset;
|
||||
Vertex2F offset1 = extrude[j].offset;
|
||||
|
||||
if(outline)
|
||||
{
|
||||
Vertex2F inner0 = v2fsub(v0, v2fmult(offset0, borderWidth));
|
||||
Vertex2F inner1 = v2fsub(v1, v2fmult(offset1, borderWidth));
|
||||
Vertex2F outer0 = v2fadd(v0, v2fmult(offset0, borderWidth));
|
||||
Vertex2F outer1 = v2fadd(v1, v2fmult(offset1, borderWidth));
|
||||
|
||||
V2F_C4B_T2F_Triangle tmp1 = {
|
||||
{inner0, Color4B(borderColor), __t(v2fneg(n0))},
|
||||
{inner1, Color4B(borderColor), __t(v2fneg(n0))},
|
||||
{outer1, Color4B(borderColor), __t(n0)}
|
||||
};
|
||||
*cursor++ = tmp1;
|
||||
|
||||
V2F_C4B_T2F_Triangle tmp2 = {
|
||||
{inner0, Color4B(borderColor), __t(v2fneg(n0))},
|
||||
{outer0, Color4B(borderColor), __t(n0)},
|
||||
{outer1, Color4B(borderColor), __t(n0)}
|
||||
};
|
||||
*cursor++ = tmp2;
|
||||
}
|
||||
else {
|
||||
Vertex2F inner0 = v2fsub(v0, v2fmult(offset0, 0.5));
|
||||
Vertex2F inner1 = v2fsub(v1, v2fmult(offset1, 0.5));
|
||||
Vertex2F outer0 = v2fadd(v0, v2fmult(offset0, 0.5));
|
||||
Vertex2F outer1 = v2fadd(v1, v2fmult(offset1, 0.5));
|
||||
|
||||
V2F_C4B_T2F_Triangle tmp1 = {
|
||||
{inner0, Color4B(fillColor), __t(v2fzero)},
|
||||
{inner1, Color4B(fillColor), __t(v2fzero)},
|
||||
{outer1, Color4B(fillColor), __t(n0)}
|
||||
};
|
||||
*cursor++ = tmp1;
|
||||
|
||||
V2F_C4B_T2F_Triangle tmp2 = {
|
||||
{inner0, Color4B(fillColor), __t(v2fzero)},
|
||||
{outer0, Color4B(fillColor), __t(n0)},
|
||||
{outer1, Color4B(fillColor), __t(n0)}
|
||||
};
|
||||
*cursor++ = tmp2;
|
||||
}
|
||||
}
|
||||
|
||||
_bufferCount += vertex_count;
|
||||
|
||||
_dirty = true;
|
||||
|
||||
free(extrude);
|
||||
}
|
||||
|
||||
void DrawNode::clear()
|
||||
{
|
||||
_bufferCount = 0;
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
const BlendFunc& DrawNode::getBlendFunc() const
|
||||
{
|
||||
return _blendFunc;
|
||||
}
|
||||
|
||||
void DrawNode::setBlendFunc(const BlendFunc &blendFunc)
|
||||
{
|
||||
_blendFunc = blendFunc;
|
||||
}
|
||||
|
||||
/** listen the event that coming to foreground on Android
|
||||
*/
|
||||
void DrawNode::listenBackToForeground(Object *obj)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
NS_CC_END
|
|
@ -30,7 +30,7 @@
|
|||
#ifndef __CCDRAWNODES_CCDRAW_NODE_H__
|
||||
#define __CCDRAWNODES_CCDRAW_NODE_H__
|
||||
|
||||
#include "base_nodes/CCNode.h"
|
||||
#include "CCNode.h"
|
||||
#include "ccTypes.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
@ -71,7 +71,7 @@ public:
|
|||
* In lua:local drawPolygon(local pointTable,local tableCount,local fillColor,local width,local borderColor)
|
||||
* @endcode
|
||||
*/
|
||||
void drawPolygon(Point *verts, unsigned int count, const Color4F &fillColor, float borderWidth, const Color4F &borderColor);
|
||||
void drawPolygon(Point *verts, long count, const Color4F &fillColor, float borderWidth, const Color4F &borderColor);
|
||||
|
||||
/** Clear the geometry in the node's buffer. */
|
||||
void clear();
|
||||
|
@ -99,13 +99,13 @@ public:
|
|||
virtual void draw() override;
|
||||
|
||||
protected:
|
||||
void ensureCapacity(int count);
|
||||
void ensureCapacity(long count);
|
||||
void render();
|
||||
|
||||
GLuint _vao;
|
||||
GLuint _vbo;
|
||||
|
||||
int _bufferCapacity;
|
||||
long _bufferCapacity;
|
||||
GLsizei _bufferCount;
|
||||
V2F_C4B_T2F *_buffer;
|
||||
|
|
@ -40,10 +40,10 @@ THE SOFTWARE.
|
|||
#include "ccMacros.h"
|
||||
#include "CCGL.h"
|
||||
#include "CCDirector.h"
|
||||
#include "shaders/ccGLStateCache.h"
|
||||
#include "shaders/CCShaderCache.h"
|
||||
#include "shaders/CCGLProgram.h"
|
||||
#include "actions/CCActionCatmullRom.h"
|
||||
#include "ccGLStateCache.h"
|
||||
#include "CCShaderCache.h"
|
||||
#include "CCGLProgram.h"
|
||||
#include "CCActionCatmullRom.h"
|
||||
#include <string.h>
|
||||
#include <cmath>
|
||||
|
|
@ -42,7 +42,7 @@ THE SOFTWARE.
|
|||
|
||||
#include "ccTypes.h"
|
||||
#include "ccMacros.h"
|
||||
#include "cocoa/CCGeometry.h" // for Point
|
||||
#include "CCGeometry.h" // for Point
|
||||
|
||||
/**
|
||||
@file
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
Event::Event(const std::string& type)
|
||||
Event::Event(Type type)
|
||||
: _type(type)
|
||||
, _isStopped(false)
|
||||
, _currentTarget(nullptr)
|
|
@ -29,7 +29,7 @@
|
|||
#include <string>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "platform/CCPlatformMacros.h"
|
||||
#include "CCPlatformMacros.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -40,15 +40,25 @@ class Node;
|
|||
*/
|
||||
class Event
|
||||
{
|
||||
public:
|
||||
enum class Type
|
||||
{
|
||||
TOUCH,
|
||||
KEYBOARD,
|
||||
ACCELERATION,
|
||||
MOUSE,
|
||||
CUSTOM
|
||||
};
|
||||
|
||||
protected:
|
||||
/** Constructor */
|
||||
Event(const std::string& type);
|
||||
Event(Type type);
|
||||
public:
|
||||
/** Destructor */
|
||||
virtual ~Event();
|
||||
|
||||
/** Gets the event type */
|
||||
inline const std::string& getType() const { return _type; };
|
||||
inline Type getType() const { return _type; };
|
||||
|
||||
/** Stops propagation for current event */
|
||||
inline void stopPropagation() { _isStopped = true; };
|
||||
|
@ -67,7 +77,8 @@ protected:
|
|||
/** Sets current target */
|
||||
inline void setCurrentTarget(Node* target) { _currentTarget = target; };
|
||||
|
||||
std::string _type; ///< Event type
|
||||
Type _type; ///< Event type
|
||||
|
||||
bool _isStopped; ///< whether the event has been stopped.
|
||||
Node* _currentTarget; ///< Current target
|
||||
|
|
@ -26,10 +26,8 @@
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
const char* EventAcceleration::EVENT_TYPE = "AccelerometerEvent";
|
||||
|
||||
EventAcceleration::EventAcceleration(Acceleration acc)
|
||||
: Event(EVENT_TYPE)
|
||||
: Event(Type::ACCELERATION)
|
||||
, _acc(acc)
|
||||
{
|
||||
}
|
|
@ -33,8 +33,7 @@ NS_CC_BEGIN
|
|||
class EventAcceleration : public Event
|
||||
{
|
||||
public:
|
||||
static const char* EVENT_TYPE;
|
||||
|
||||
|
||||
EventAcceleration(Acceleration acc);
|
||||
|
||||
private:
|
|
@ -23,12 +23,15 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "CCEventCustom.h"
|
||||
#include "ccMacros.h"
|
||||
#include <functional>
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
EventCustom::EventCustom(const std::string& eventName)
|
||||
: Event(eventName)
|
||||
: Event(Type::CUSTOM)
|
||||
, _userData(nullptr)
|
||||
, _eventName(eventName)
|
||||
{
|
||||
}
|
||||
|
|
@ -35,14 +35,17 @@ public:
|
|||
/** Constructor */
|
||||
EventCustom(const std::string& eventName);
|
||||
|
||||
/** Set user data */
|
||||
/** Sets user data */
|
||||
inline void setUserData(void* data) { _userData = data; };
|
||||
|
||||
/** Get user data */
|
||||
/** Gets user data */
|
||||
inline void* getUserData() const { return _userData; };
|
||||
|
||||
/** Gets event name */
|
||||
inline const std::string& getEventName() const { return _eventName; };
|
||||
protected:
|
||||
void* _userData; ///< User data
|
||||
std::string _eventName;
|
||||
};
|
||||
|
||||
NS_CC_END
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,233 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
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_EVENT_DISPATCHER_H__
|
||||
#define __CC_EVENT_DISPATCHER_H__
|
||||
|
||||
#include "CCPlatformMacros.h"
|
||||
#include "CCEventListener.h"
|
||||
#include "CCEvent.h"
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Event;
|
||||
class EventTouch;
|
||||
class Node;
|
||||
|
||||
/**
|
||||
This class manages event listener subscriptions
|
||||
and event dispatching.
|
||||
|
||||
The EventListener list is managed in such a way that
|
||||
event listeners can be added and removed even
|
||||
from within an EventListener, while events are being
|
||||
dispatched.
|
||||
*/
|
||||
class EventDispatcher : public Object
|
||||
{
|
||||
public:
|
||||
/** Adds a event listener for a specified event with the priority of scene graph.
|
||||
* @param listener The listener of a specified event.
|
||||
* @param node The priority of the listener is based on the draw order of this node.
|
||||
* @note The priority of scene graph will be fixed value 0. So the order of listener item
|
||||
* in the vector will be ' <0, scene graph (0 priority), >0'.
|
||||
*/
|
||||
void addEventListenerWithSceneGraphPriority(EventListener* listener, Node* node);
|
||||
|
||||
/** Adds a event listener for a specified event with the fixed priority.
|
||||
* @param listener The listener of a specified event.
|
||||
* @param fixedPriority The fixed priority of the listener.
|
||||
* @note A lower priority will be called before the ones that have a higher value.
|
||||
* 0 priority is forbidden for fixed priority since it's used for scene graph based priority.
|
||||
*/
|
||||
void addEventListenerWithFixedPriority(EventListener* listener, int fixedPriority);
|
||||
|
||||
/** Remove a listener
|
||||
* @param listener The specified event listener which needs to be removed.
|
||||
*/
|
||||
void removeEventListener(EventListener* listener);
|
||||
|
||||
/** Removes all listeners with the same event listener type */
|
||||
void removeEventListeners(EventListener::Type listenerType);
|
||||
|
||||
/** Removes all custom listeners with the same event name */
|
||||
void removeCustomEventListeners(const std::string& customEventName);
|
||||
|
||||
/** Removes all listeners */
|
||||
void removeAllEventListeners();
|
||||
|
||||
/** Sets listener's priority with fixed value. */
|
||||
void setPriority(EventListener* listener, int fixedPriority);
|
||||
|
||||
/** Whether to enable dispatching events */
|
||||
void setEnabled(bool isEnabled);
|
||||
|
||||
/** Checks whether dispatching events is enabled */
|
||||
bool isEnabled() const;
|
||||
|
||||
/** Dispatches the event
|
||||
* Also removes all EventListeners marked for deletion from the
|
||||
* event dispatcher list.
|
||||
*/
|
||||
void dispatchEvent(Event* event);
|
||||
|
||||
/** Constructor of EventDispatcher */
|
||||
EventDispatcher();
|
||||
/** Destructor of EventDispatcher */
|
||||
~EventDispatcher();
|
||||
|
||||
private:
|
||||
friend class Node;
|
||||
|
||||
/** Sets the dirty flag for a node. */
|
||||
void setDirtyForNode(Node* node);
|
||||
|
||||
/** Notifys event dispatcher that the node has been paused. */
|
||||
void pauseTarget(Node* node);
|
||||
|
||||
/** Notifys event dispatcher that the node has been resumed. */
|
||||
void resumeTarget(Node* node);
|
||||
|
||||
/** Notifys event dispatcher that the node has been deleted. */
|
||||
void cleanTarget(Node* node);
|
||||
|
||||
/**
|
||||
* The vector to store event listeners with scene graph based priority and fixed priority.
|
||||
*/
|
||||
class EventListenerVector
|
||||
{
|
||||
public:
|
||||
EventListenerVector();
|
||||
~EventListenerVector();
|
||||
size_t size() const;
|
||||
bool empty() const;
|
||||
|
||||
void push_back(EventListener* item);
|
||||
void clearSceneGraphListeners();
|
||||
void clearFixedListeners();
|
||||
void clear();
|
||||
|
||||
inline std::vector<EventListener*>* getFixedPriorityListeners() const { return _fixedListeners; };
|
||||
inline std::vector<EventListener*>* getSceneGraphPriorityListeners() const { return _sceneGraphListeners; };
|
||||
inline int getGt0Index() const { return _gt0Index; };
|
||||
inline void setGt0Index(int index) { _gt0Index = index; };
|
||||
private:
|
||||
std::vector<EventListener*>* _fixedListeners;
|
||||
std::vector<EventListener*>* _sceneGraphListeners;
|
||||
int _gt0Index;
|
||||
};
|
||||
|
||||
/** Adds event listener with item */
|
||||
void addEventListener(EventListener* listener);
|
||||
|
||||
/** Gets event the listener list for the event listener type. */
|
||||
EventListenerVector* getListeners(EventListener::ListenerID listenerID);
|
||||
|
||||
/** Update dirty flag */
|
||||
void updateDirtyFlagForSceneGraph();
|
||||
|
||||
/** Removes all listeners with the same event listener ID */
|
||||
void removeEventListenersForListenerID(EventListener::ListenerID listenerID);
|
||||
|
||||
/** Sort event listener */
|
||||
void sortEventListeners(EventListener::ListenerID listenerID);
|
||||
|
||||
/** Sorts the listeners of specified type by scene graph priority */
|
||||
void sortEventListenersOfSceneGraphPriority(EventListener::ListenerID listenerID);
|
||||
|
||||
/** Sorts the listeners of specified type by fixed priority */
|
||||
void sortEventListenersOfFixedPriority(EventListener::ListenerID listenerID);
|
||||
|
||||
/** Updates all listeners
|
||||
* 1) Removes all listener items that have been marked as 'removed' when dispatching event.
|
||||
* 2) Adds all listener items that have been marked as 'added' when dispatching event.
|
||||
*/
|
||||
void updateListeners(Event* event);
|
||||
|
||||
/** Touch event needs to be processed different with other events since it needs support ALL_AT_ONCE and ONE_BY_NONE mode. */
|
||||
void dispatchTouchEvent(EventTouch* event);
|
||||
|
||||
/** Associates node with event listener */
|
||||
void associateNodeAndEventListener(Node* node, EventListener* listener);
|
||||
|
||||
/** Dissociates node with event listener */
|
||||
void dissociateNodeAndEventListener(Node* node, EventListener* listener);
|
||||
|
||||
/** Dispatches event to listeners with a specified listener type */
|
||||
void dispatchEventToListeners(EventListenerVector* listeners, std::function<bool(EventListener*)> onEvent);
|
||||
|
||||
/// Priority dirty flag
|
||||
enum class DirtyFlag
|
||||
{
|
||||
NONE = 0,
|
||||
FIXED_PRITORY = 1 << 0,
|
||||
SCENE_GRAPH_PRIORITY = 1 << 1,
|
||||
ALL = FIXED_PRITORY | SCENE_GRAPH_PRIORITY
|
||||
};
|
||||
|
||||
/** Sets the dirty flag for a specified listener ID */
|
||||
void setDirty(EventListener::ListenerID listenerID, DirtyFlag flag);
|
||||
|
||||
/** Walks though scene graph to get the draw order for each node, it's called before sorting event listener with scene graph priority */
|
||||
void visitTarget(Node* node);
|
||||
|
||||
private:
|
||||
/** Listeners map */
|
||||
std::unordered_map<EventListener::ListenerID, EventListenerVector*> _listeners;
|
||||
|
||||
/** The map of dirty flag */
|
||||
std::unordered_map<EventListener::ListenerID, DirtyFlag> _priorityDirtyFlagMap;
|
||||
|
||||
/** The map of node and event listeners */
|
||||
std::unordered_map<Node*, std::vector<EventListener*>*> _nodeListenersMap;
|
||||
|
||||
/** The map of node and its event priority */
|
||||
std::unordered_map<Node*, int> _nodePriorityMap;
|
||||
|
||||
/** The listeners to be added after dispatching event */
|
||||
std::vector<EventListener*> _toAddedListeners;
|
||||
|
||||
/** The nodes were associated with scene graph based priority listeners */
|
||||
std::set<Node*> _dirtyNodes;
|
||||
|
||||
/** Whether the dispatcher is dispatching event */
|
||||
int _inDispatch;
|
||||
|
||||
/** Whether to enable dispatching event */
|
||||
bool _isEnabled;
|
||||
|
||||
int _nodePriorityIndex;
|
||||
};
|
||||
|
||||
|
||||
NS_CC_END
|
||||
|
||||
|
||||
#endif // __CC_EVENT_DISPATCHER_H__
|
|
@ -27,6 +27,10 @@
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
const char* EventKeyboard::EVENT_TYPE = "KeyboardEvent";
|
||||
EventKeyboard::EventKeyboard(KeyCode keyCode, bool isPressed)
|
||||
: Event(Type::KEYBOARD)
|
||||
, _keyCode(keyCode)
|
||||
, _isPressed(isPressed)
|
||||
{}
|
||||
|
||||
NS_CC_END
|
|
@ -196,13 +196,7 @@ public:
|
|||
KEY_SEARCH = 0xFFAA
|
||||
};
|
||||
|
||||
static const char* EVENT_TYPE;
|
||||
|
||||
EventKeyboard(KeyCode keyCode, bool isPressed)
|
||||
: Event(EVENT_TYPE)
|
||||
, _keyCode(keyCode)
|
||||
, _isPressed(isPressed)
|
||||
{};
|
||||
EventKeyboard(KeyCode keyCode, bool isPressed);
|
||||
|
||||
private:
|
||||
KeyCode _keyCode;
|
|
@ -35,16 +35,18 @@ EventListener::~EventListener()
|
|||
CCLOGINFO("In the destructor of EventListener. %p", this);
|
||||
}
|
||||
|
||||
bool EventListener::init(const std::string& t, std::function<void(Event*)> callback)
|
||||
bool EventListener::init(Type t, ListenerID listenerID, std::function<void(Event*)> callback)
|
||||
{
|
||||
_onEvent = callback;
|
||||
_type = t;
|
||||
_listenerID = listenerID;
|
||||
_isRegistered = false;
|
||||
_paused = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EventListener::checkAvaiable()
|
||||
bool EventListener::checkAvailable()
|
||||
{
|
||||
return (_onEvent != nullptr);
|
||||
}
|
|
@ -25,46 +25,84 @@
|
|||
#ifndef cocos2d_libs_EventListener_h
|
||||
#define cocos2d_libs_EventListener_h
|
||||
|
||||
#include "platform/CCPlatformMacros.h"
|
||||
#include "cocoa/CCObject.h"
|
||||
#include "CCPlatformMacros.h"
|
||||
#include "CCObject.h"
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Event;
|
||||
class Node;
|
||||
|
||||
/**
|
||||
* The base class of event listener.
|
||||
* If you need custom listener which with different callback, you need to inherit this class.
|
||||
* For instance, you could refer to AccelerationEventListener, KeyboardEventListener or TouchEventListener, CustomEventListener.
|
||||
* For instance, you could refer to EventListenerAcceleration, EventListenerKeyboard, EventListenerTouchOneByOne, EventListenerCustom.
|
||||
*/
|
||||
class EventListener : public Object
|
||||
{
|
||||
{
|
||||
public:
|
||||
enum class Type
|
||||
{
|
||||
UNKNOWN,
|
||||
TOUCH_ONE_BY_ONE,
|
||||
TOUCH_ALL_AT_ONCE,
|
||||
KEYBOARD,
|
||||
MOUSE,
|
||||
ACCELERATION,
|
||||
CUSTOM
|
||||
};
|
||||
|
||||
typedef int ListenerID;
|
||||
|
||||
protected:
|
||||
/** Constructor */
|
||||
EventListener();
|
||||
|
||||
/** Initializes event with type and callback function */
|
||||
bool init(const std::string& t, std::function<void(Event*)>callback);
|
||||
bool init(Type t, ListenerID listenerID, std::function<void(Event*)>callback);
|
||||
public:
|
||||
/** Destructor */
|
||||
virtual ~EventListener();
|
||||
|
||||
/** Checks whether the listener is available. */
|
||||
virtual bool checkAvaiable() = 0;
|
||||
virtual bool checkAvailable() = 0;
|
||||
|
||||
/** Clones the listener, its subclasses have to override this method. */
|
||||
virtual EventListener* clone() = 0;
|
||||
|
||||
protected:
|
||||
inline void setPaused(bool paused) { _paused = paused; };
|
||||
inline bool isPaused() const { return _paused; };
|
||||
|
||||
inline void setRegistered(bool registered) { _isRegistered = registered; };
|
||||
inline bool isRegistered() const { return _isRegistered; };
|
||||
|
||||
inline Type getType() const { return _type; };
|
||||
inline ListenerID getListenerID() const { return _listenerID; };
|
||||
|
||||
inline void setFixedPriority(int fixedPriority) { _fixedPriority = fixedPriority; };
|
||||
inline int getFixedPriority() const { return _fixedPriority; };
|
||||
|
||||
inline void setSceneGraphPriority(Node* node) { _node = node; };
|
||||
inline Node* getSceneGraphPriority() const { return _node; };
|
||||
|
||||
std::function<void(Event*)> _onEvent; /// Event callback function
|
||||
std::string _type; /// Event type
|
||||
bool _isRegistered; /// Whether the listener has been added to dispatcher.
|
||||
|
||||
Type _type; /// Event listener type
|
||||
ListenerID _listenerID; /// Event listener ID
|
||||
bool _isRegistered; /// Whether the listener has been added to dispatcher.
|
||||
|
||||
// The priority of event listener
|
||||
int _fixedPriority; // The higher the number, the higher the priority, 0 is for scene graph base priority.
|
||||
Node* _node; // scene graph based priority
|
||||
bool _paused; // Whether the listener is paused
|
||||
|
||||
friend class EventDispatcher;
|
||||
friend class Node;
|
||||
};
|
||||
|
||||
NS_CC_END
|
|
@ -37,7 +37,7 @@ EventListenerAcceleration::~EventListenerAcceleration()
|
|||
CCLOGINFO("In the destructor of AccelerationEventListener. %p", this);
|
||||
}
|
||||
|
||||
EventListenerAcceleration* EventListenerAcceleration::create(std::function<void(Acceleration*, Event* event)> callback)
|
||||
EventListenerAcceleration* EventListenerAcceleration::create(std::function<void(Acceleration*, Event*)> callback)
|
||||
{
|
||||
EventListenerAcceleration* ret = new EventListenerAcceleration();
|
||||
if (ret && ret->init(callback))
|
||||
|
@ -59,7 +59,7 @@ bool EventListenerAcceleration::init(std::function<void(Acceleration*, Event* ev
|
|||
this->onAccelerationEvent(&accEvent->_acc, event);
|
||||
};
|
||||
|
||||
if (EventListener::init(EventAcceleration::EVENT_TYPE, listener))
|
||||
if (EventListener::init(Type::ACCELERATION, static_cast<ListenerID>(Type::ACCELERATION), listener))
|
||||
{
|
||||
onAccelerationEvent = callback;
|
||||
return true;
|
||||
|
@ -84,7 +84,7 @@ EventListenerAcceleration* EventListenerAcceleration::clone()
|
|||
return ret;
|
||||
}
|
||||
|
||||
bool EventListenerAcceleration::checkAvaiable()
|
||||
bool EventListenerAcceleration::checkAvailable()
|
||||
{
|
||||
CCASSERT(onAccelerationEvent, "");
|
||||
|
|
@ -33,12 +33,12 @@ NS_CC_BEGIN
|
|||
class EventListenerAcceleration : public EventListener
|
||||
{
|
||||
public:
|
||||
static EventListenerAcceleration* create(std::function<void(Acceleration*, Event* event)> callback);
|
||||
static EventListenerAcceleration* create(std::function<void(Acceleration*, Event*)> callback);
|
||||
virtual ~EventListenerAcceleration();
|
||||
|
||||
/// Overrides
|
||||
virtual EventListenerAcceleration* clone() override;
|
||||
virtual bool checkAvaiable() override;
|
||||
virtual bool checkAvailable() override;
|
||||
private:
|
||||
EventListenerAcceleration();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue