mirror of https://github.com/axmolengine/axmol.git
Merge branch 'develop' into fix-extensions-slider
This commit is contained in:
commit
bebd8c63ab
|
@ -21,11 +21,13 @@ Thumbs.db
|
||||||
*.ilk
|
*.ilk
|
||||||
*.log
|
*.log
|
||||||
[Bb]in
|
[Bb]in
|
||||||
[Dd]ebug*/
|
[Dd]ebug/
|
||||||
|
[Dd]ebug.win32/
|
||||||
*.sbr
|
*.sbr
|
||||||
*.sdf
|
*.sdf
|
||||||
obj/
|
obj/
|
||||||
[Rr]elease*/
|
[Rr]elease/
|
||||||
|
[Rr]elease.win32/
|
||||||
_ReSharper*/
|
_ReSharper*/
|
||||||
[Tt]est[Rr]esult*
|
[Tt]est[Rr]esult*
|
||||||
ipch/
|
ipch/
|
||||||
|
@ -63,12 +65,14 @@ build_*_vc10/
|
||||||
*.xcuserstate
|
*.xcuserstate
|
||||||
*.xccheckout
|
*.xccheckout
|
||||||
xcschememanagement.plist
|
xcschememanagement.plist
|
||||||
build/
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
._.*
|
._.*
|
||||||
xcuserdata/
|
xcuserdata/
|
||||||
DerivedData/
|
DerivedData/
|
||||||
|
|
||||||
|
# Ignore files built by AppCode
|
||||||
|
.idea/
|
||||||
|
|
||||||
# Ignore files built by bada
|
# Ignore files built by bada
|
||||||
.Simulator-Debug/
|
.Simulator-Debug/
|
||||||
.Target-Debug/
|
.Target-Debug/
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
[submodule "tools/bindings-generator"]
|
[submodule "tools/bindings-generator"]
|
||||||
path = tools/bindings-generator
|
path = tools/bindings-generator
|
||||||
url = git://github.com/cocos2d/bindings-generator.git
|
url = git://github.com/cocos2d/bindings-generator.git
|
||||||
[submodule "scripting/javascript/bindings/generated"]
|
[submodule "cocos/scripting/auto-generated"]
|
||||||
path = scripting/auto-generated
|
path = cocos/scripting/auto-generated
|
||||||
url = git://github.com/folecr/cocos2dx-autogen-bindings.git
|
url = git://github.com/cocos2d-x/bindings-auto-generated.git
|
||||||
[submodule "samples/Javascript/Shared"]
|
[submodule "samples/Javascript/Shared"]
|
||||||
path = samples/Javascript/Shared
|
path = samples/Javascript/Shared
|
||||||
url = git://github.com/cocos2d/cocos2d-js-tests.git
|
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"]
|
[submodule "tools/cocos2d-console"]
|
||||||
path = tools/cocos2d-console
|
path = tools/cocos2d-console
|
||||||
url = git://github.com/cocos2d/cocos2d-console.git
|
url = git://github.com/cocos2d/cocos2d-console.git
|
||||||
|
|
|
@ -26,3 +26,9 @@ script:
|
||||||
- tools/travis-scripts/run-script.sh
|
- tools/travis-scripts/run-script.sh
|
||||||
before_install:
|
before_install:
|
||||||
- tools/travis-scripts/before-install.sh
|
- tools/travis-scripts/before-install.sh
|
||||||
|
|
||||||
|
# whitelist
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
|
63
AUTHORS
63
AUTHORS
|
@ -587,23 +587,13 @@ Developers:
|
||||||
signmotion (Andrey Syrokomsky)
|
signmotion (Andrey Syrokomsky)
|
||||||
Fixed some compiling-warnings (MSVC2012).
|
Fixed some compiling-warnings (MSVC2012).
|
||||||
|
|
||||||
Retired Core Developers:
|
|
||||||
WenSheng Yang
|
|
||||||
Author of windows port, CCTextField,
|
|
||||||
Designer of CCApplication/CCEGLView/platform structure.
|
|
||||||
He's working together with 2dx core team but leading FishingJoy game
|
|
||||||
|
|
||||||
Bin Zhang
|
|
||||||
core-team member but put himself in FishingJoy game since 2012.
|
|
||||||
|
|
||||||
RongHong Huang (flyingpaper)
|
|
||||||
Author of cocos2d-xna and spent all his time on wp7.
|
|
||||||
|
|
||||||
michaelcontento
|
michaelcontento
|
||||||
[Android] use onWindowFocusChanged(bool) instead of onResume()/onPause()
|
[Android] use onWindowFocusChanged(bool) instead of onResume()/onPause()
|
||||||
Prevent nullptr access in AssetsManager
|
Prevent nullptr access in AssetsManager
|
||||||
[Android] re-introduce Cocos2dxHelper.runOnGLThread(Runnable)
|
[Android] re-introduce Cocos2dxHelper.runOnGLThread(Runnable)
|
||||||
[Android] added EGL_RENDERABLE_TYPE to OpenGL attributes
|
[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
|
bmanGH
|
||||||
Use gl caching functions in TexturePVR::createGLTexture()
|
Use gl caching functions in TexturePVR::createGLTexture()
|
||||||
|
@ -616,6 +606,55 @@ Retired Core Developers:
|
||||||
Documentation fixes
|
Documentation fixes
|
||||||
A better way to locate project creator
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Retired Core Developers:
|
||||||
|
WenSheng Yang
|
||||||
|
Author of windows port, CCTextField,
|
||||||
|
Designer of CCApplication/CCEGLView/platform structure.
|
||||||
|
He's working together with 2dx core team but leading FishingJoy game
|
||||||
|
|
||||||
|
Bin Zhang
|
||||||
|
core-team member but put himself in FishingJoy game since 2012.
|
||||||
|
|
||||||
|
RongHong Huang (flyingpaper)
|
||||||
|
Author of cocos2d-xna and spent all his time on wp7.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Cocos2d-x can not grow so fast without the active community.
|
Cocos2d-x can not grow so fast without the active community.
|
||||||
Thanks to all developers who report & trace bugs, discuss the engine usage in forum & QQ groups!
|
Thanks to all developers who report & trace bugs, discuss the engine usage in forum & QQ groups!
|
||||||
|
|
27
CHANGELOG
27
CHANGELOG
|
@ -2,11 +2,38 @@ cocos2d-x-3.0alpha1 @??? 2013
|
||||||
[all platforms]
|
[all platforms]
|
||||||
[DOC] Added RELEASE_NOTES and CODING_STYLE.md files
|
[DOC] Added RELEASE_NOTES and CODING_STYLE.md files
|
||||||
[FIX] Texture: use CCLOG to log when a texture is being decoded in software
|
[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.
|
||||||
|
[NEW] Added Mouse Support For Desktop Platforms.
|
||||||
|
[FIX] EventListeners can't be removed sometimes.
|
||||||
|
[FIX] When parsing XML using TinyXML, the data size has to be specified.
|
||||||
[Android]
|
[Android]
|
||||||
[FIX] Added EGL_RENDERABLE_TYPE to OpenGL attributes
|
[FIX] Added EGL_RENDERABLE_TYPE to OpenGL attributes
|
||||||
[NEW] Added Cocos2dxHelper.runOnGLThread(Runnable) again
|
[NEW] Added Cocos2dxHelper.runOnGLThread(Runnable) again
|
||||||
|
[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
|
||||||
[Mac]
|
[Mac]
|
||||||
[FIX] Removed unused CCLOG() from GL initialization
|
[FIX] Removed unused CCLOG() from GL initialization
|
||||||
|
[iOS]
|
||||||
|
[FIX] Can't click the area that outside of keyboard to close keyboard when using EditBox.
|
||||||
|
[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.
|
||||||
|
[Lua Binding]
|
||||||
|
[NEW] Added Armature lua binding and added test samples.
|
||||||
|
|
||||||
cocos2d-x-3.0alpha0 @Sep.19 2013
|
cocos2d-x-3.0alpha0 @Sep.19 2013
|
||||||
[all platforms]
|
[all platforms]
|
||||||
|
|
|
@ -0,0 +1,105 @@
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
project (Cocos2dxSamples)
|
||||||
|
|
||||||
|
# The version number
|
||||||
|
set(Cocos2dxSamples_VERSION_MAJOR 3)
|
||||||
|
set(Cocos2dxSamples_VERSION_MINOR 0)
|
||||||
|
|
||||||
|
include(build/BuildHelpers.CMakeLists.txt)
|
||||||
|
|
||||||
|
set(CMAKE_BUILE_TYPE DEBUG)
|
||||||
|
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")
|
||||||
|
|
||||||
|
add_definitions(-DLINUX -DCC_ENABLE_CHIPMUNK_INTEGRATION=1)
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
|
||||||
|
add_subdirectory(external/json)
|
||||||
|
|
||||||
|
# audio
|
||||||
|
add_subdirectory(cocos/audio)
|
||||||
|
|
||||||
|
# cocos base library
|
||||||
|
add_subdirectory(cocos/base)
|
||||||
|
|
||||||
|
# cocos 2d library
|
||||||
|
add_subdirectory(cocos/2d)
|
||||||
|
|
||||||
|
add_subdirectory(cocos/gui)
|
||||||
|
|
||||||
|
add_subdirectory(cocos/network)
|
||||||
|
|
||||||
|
add_subdirectory(extensions)
|
||||||
|
|
||||||
|
add_subdirectory(cocos/editor-support/spine)
|
||||||
|
add_subdirectory(cocos/editor-support/cocosbuilder)
|
||||||
|
add_subdirectory(cocos/editor-support/cocostudio)
|
||||||
|
|
||||||
|
|
||||||
|
add_subdirectory(external/lua/lua)
|
||||||
|
add_subdirectory(external/lua/tolua)
|
||||||
|
|
||||||
|
add_subdirectory(cocos/scripting)
|
||||||
|
|
||||||
|
# build samples
|
||||||
|
add_subdirectory(samples)
|
||||||
|
|
|
@ -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,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
|
|
22
README.md
22
README.md
|
@ -23,14 +23,15 @@ How to start a new game
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
1. Download the code from [cocos2d download site][4]
|
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:
|
Example:
|
||||||
|
|
||||||
$ cd cocos2d-x
|
$ cd cocos2d-x/tools/project-creator
|
||||||
$ ./create-multi-platform-projects.py -p mygame -k com.your_company.mygame -l cpp
|
$ ./create-multi-platform-projects.py -p mygame -k com.your_company.mygame -l cpp
|
||||||
$ cd projects/mygame
|
$ cd ../../projects/mygame
|
||||||
|
|
||||||
|
|
||||||
Main features
|
Main features
|
||||||
|
@ -79,9 +80,6 @@ Runtime Requirements
|
||||||
* Android 2.3+ for Android games
|
* Android 2.3+ for Android games
|
||||||
* OS X v10.6+ for Mac games
|
* OS X v10.6+ for Mac games
|
||||||
* Windows 7+ for Win games
|
* Windows 7+ for Win games
|
||||||
* Tizen 2.2+
|
|
||||||
* Emscripten
|
|
||||||
* Google Native Client
|
|
||||||
|
|
||||||
|
|
||||||
Running Tests
|
Running Tests
|
||||||
|
@ -92,28 +90,26 @@ Select the test you want from Xcode Scheme chooser.
|
||||||
* For OS X / iOS
|
* For OS X / iOS
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd cocos2d-x/samples
|
$ cd cocos2d-x/build
|
||||||
$ open samples.xcodeproj
|
$ open samples.xcodeproj
|
||||||
```
|
```
|
||||||
|
|
||||||
* For Linux
|
* For Linux
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd cocos2d-x
|
$ cd cocos2d-x/build
|
||||||
$ ./make-all-linux-projects.sh
|
$ ./make-all-linux-projects.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
or open the `cocos2d-x/cocos2dx-qt5.pro` file using QT Creator 5.
|
|
||||||
|
|
||||||
* For Windows
|
* For Windows
|
||||||
|
|
||||||
Open the `cocos2d-x/cocos2d-win32.vc2012.sln`
|
Open the `cocos2d-x/build/cocos2d-win32.vc2012.sln`
|
||||||
|
|
||||||
* For Android
|
* For Android
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd cocos2d-x/samples/Cpp/HelloCpp/proj.android
|
$ cd cocos2d-x/build
|
||||||
$ ./build_native.sh
|
$ 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`.
|
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,53 @@
|
||||||
|
# This file was copied from GamePlay
|
||||||
|
# Copies files for the given game into the target res directory
|
||||||
|
# GAME_NAME name of the game
|
||||||
|
# REL_DIR to which directory these files are relative
|
||||||
|
# SRC_FILES which files from the REL_DIR to copy (GLOB)
|
||||||
|
macro(COPY_RES_FILES GAME_NAME GAME_RES_TARGET REL_DIR SRC_FILES)
|
||||||
|
file( GLOB_RECURSE RES_FILES RELATIVE ${REL_DIR} ${SRC_FILES} )
|
||||||
|
|
||||||
|
set(ALL_FILES)
|
||||||
|
foreach(SRC_FILE ${RES_FILES})
|
||||||
|
IF(NOT (SRC_FILE MATCHES "(^\\.\\.)"))
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT "${APP_BIN_DIR}/${SRC_FILE}"
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"${REL_DIR}/${SRC_FILE}"
|
||||||
|
"${APP_BIN_DIR}/Resources/${SRC_FILE}"
|
||||||
|
COMMENT "Copy ${SRC_FILE}"
|
||||||
|
)
|
||||||
|
list(APPEND ALL_FILES "${APP_BIN_DIR}/${SRC_FILE}" )
|
||||||
|
ENDIF(NOT (SRC_FILE MATCHES "(^\\.\\.)"))
|
||||||
|
endforeach()
|
||||||
|
# create target for copying these files
|
||||||
|
add_custom_target( ${GAME_RES_TARGET} DEPENDS ${ALL_FILES} )
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# convenience to call above with current directory and everything in "res"
|
||||||
|
macro(COPY_RES GAME_NAME)
|
||||||
|
# a target for all addition asserts (will be done in default compile, but if you target the executable
|
||||||
|
# it won't be done -- good for testing)
|
||||||
|
add_custom_target( ${GAME_NAME}_ASSETS ALL )
|
||||||
|
|
||||||
|
# copy entire "res" directory and "game.config" if there is one
|
||||||
|
set(CRG_PATTERN "*")
|
||||||
|
COPY_RES_FILES( ${GAME_NAME} ${GAME_NAME}_CORE_RES
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Resources
|
||||||
|
"${CRG_PATTERN}"
|
||||||
|
)
|
||||||
|
add_dependencies( ${GAME_NAME}_ASSETS ${GAME_NAME}_CORE_RES )
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# Copies resources from an additional directory
|
||||||
|
# GAME_NAME name of the game
|
||||||
|
# REL_DIR from which directory
|
||||||
|
# ARGN which patterns to copy (should include res/ in name if to be placed in the res/ output)
|
||||||
|
macro(COPY_RES_EXTRA GAME_NAME EXTRA_RES REL_DIR)
|
||||||
|
# convert src's to full paths (based on rel_dir)
|
||||||
|
set(SRC_FILES)
|
||||||
|
foreach(SRC_FILE ${ARGN} )
|
||||||
|
list(APPEND SRC_FILES "${REL_DIR}/${SRC_FILE}")
|
||||||
|
endforeach()
|
||||||
|
COPY_RES_FILES( ${GAME_NAME} ${GAME_NAME}_${EXTRA_RES} ${REL_DIR} "${SRC_FILES}" )
|
||||||
|
add_dependencies( ${GAME_NAME}_ASSETS ${GAME_NAME}_${EXTRA_RES} )
|
||||||
|
endmacro()
|
|
@ -0,0 +1,91 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
cocos2dx: chipmunk
|
||||||
|
$(MAKE) -C ../cocos/2d
|
||||||
|
cocos2dx-clean:
|
||||||
|
$(MAKE) -C ../cocos/2d clean
|
||||||
|
|
||||||
|
audio: cocos2dx
|
||||||
|
$(MAKE) -C ../cocos/audio/proj.$(PLATFORM)
|
||||||
|
audio-clean:
|
||||||
|
$(MAKE) -C ../cocos/audio/proj.$(PLATFORM) clean
|
||||||
|
|
||||||
|
gui:
|
||||||
|
$(MAKE) -C ../cocos/gui
|
||||||
|
gui-clean:
|
||||||
|
$(MAKE) -C ../cocos/gui clean
|
||||||
|
|
||||||
|
network: cocos2dx
|
||||||
|
$(MAKE) -C ../cocos/network
|
||||||
|
network-clean:
|
||||||
|
$(MAKE) -C ../cocos/network clean
|
||||||
|
|
||||||
|
cocosbuilder:
|
||||||
|
$(MAKE) -C ../cocos/editor-support/cocosbuilder
|
||||||
|
cocosbuilder-clean:
|
||||||
|
$(MAKE) -C ../cocos/editor-support/cocosbuilder clean
|
||||||
|
|
||||||
|
spine:
|
||||||
|
$(MAKE) -C ../cocos/editor-support/spine
|
||||||
|
spine-clean:
|
||||||
|
$(MAKE) -C ../cocos/editor-support/spine clean
|
||||||
|
|
||||||
|
cocostudio:
|
||||||
|
$(MAKE) -C ../cocos/editor-support/cocostudio
|
||||||
|
cocostudio-clean:
|
||||||
|
$(MAKE) -C ../cocos/editor-support/cocostudio clean
|
||||||
|
|
||||||
|
extensions: chipmunk audio box2d
|
||||||
|
$(MAKE) -C ../extensions/proj.$(PLATFORM)
|
||||||
|
extensions-clean:
|
||||||
|
$(MAKE) -C ../extensions/proj.$(PLATFORM) clean
|
||||||
|
|
||||||
|
lua: extensions cocosbuilder cocostudio
|
||||||
|
$(MAKE) -C ../cocos/scripting/lua/bindings
|
||||||
|
lua-clean:
|
||||||
|
$(MAKE) -C ../cocos/scripting/lua/bindings clean
|
||||||
|
|
||||||
|
hellocpp: cocos2dx
|
||||||
|
$(MAKE) -C ../samples/Cpp/HelloCpp/proj.$(PLATFORM)
|
||||||
|
hellocpp-clean:
|
||||||
|
$(MAKE) -C ../samples/Cpp/HelloCpp/proj.$(PLATFORM) clean
|
||||||
|
|
||||||
|
testcpp: cocos2dx audio extensions cocostudio gui cocosbuilder spine network
|
||||||
|
$(MAKE) -C ../samples/Cpp/TestCpp/proj.$(PLATFORM)
|
||||||
|
testcpp-clean:
|
||||||
|
$(MAKE) -C ../samples/Cpp/TestCpp/proj.$(PLATFORM) clean
|
||||||
|
|
||||||
|
simplegame: cocos2dx audio
|
||||||
|
$(MAKE) -C ../samples/Cpp/SimpleGame/proj.$(PLATFORM)
|
||||||
|
simplegame-clean:
|
||||||
|
$(MAKE) -C ../samples/Cpp/SimpleGame/proj.$(PLATFORM) clean
|
||||||
|
|
||||||
|
all: chipmunk audio extensions cocos2dx lua hellocpp testcpp simplegame
|
||||||
|
clean: cocos2dx-clean box2d-clean chipmunk-clean audio-clean extensions-clean lua-clean hellocpp-clean testcpp-clean simplegame-clean
|
||||||
|
|
||||||
|
hellolua: cocos2dx lua
|
||||||
|
$(MAKE) -C ../samples/Lua/HelloLua/proj.$(PLATFORM)
|
||||||
|
hellolua-clean:
|
||||||
|
$(MAKE) -C ../samples/Lua/HelloLua/proj.$(PLATFORM) clean
|
||||||
|
|
||||||
|
testlua: cocos2dx 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
|
||||||
|
|
||||||
|
.PHONY: all clean
|
|
@ -0,0 +1,208 @@
|
||||||
|
#!/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 "%prog [-n ndk-build-parameter] target\n\
|
||||||
|
valid target are [hellocpp|testcpp|simplegame|assetsmanager|hellolua|testlua|cocosdragon\
|
||||||
|
|crystalcraze|moonwarriors|testjavascript|watermelonwithme], of course you can use 'cpp'\
|
||||||
|
to build all cpp samples, 'lua' to build all lua samples, 'jsb' to build all javascript samples,\
|
||||||
|
and 'all' for all samples"
|
||||||
|
|
||||||
|
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)
|
||||||
|
os.system(command)
|
||||||
|
|
||||||
|
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 == "moonwarriors":
|
||||||
|
resources_dir = os.path.join(app_android_root, "../../Shared/games/MoonWarriors/res")
|
||||||
|
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")
|
||||||
|
copy_files(resources_dir, 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:
|
||||||
|
build_samples(args, opts.ndk_build_param)
|
|
@ -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 @@
|
||||||
|
5a0361664f33af4303065c98da4b8d8e4efe48b4
|
|
@ -0,0 +1 @@
|
||||||
|
b473303312be3b69891020b5fb470dd382f31284
|
|
@ -32,5 +32,5 @@ if [ -n "$MISSING" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install glfw
|
# install glfw
|
||||||
tools/travis-scripts/install_glfw.sh
|
../tools/travis-scripts/install_glfw.sh
|
||||||
|
|
|
@ -17,10 +17,8 @@ if $COCOS2DX_USEAPT; then
|
||||||
./install-deps-linux.sh
|
./install-deps-linux.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export MAKEFLAGS=-j10
|
mkdir -p linux-build
|
||||||
|
cd linux-build
|
||||||
|
cmake ../..
|
||||||
|
make -j10
|
||||||
|
|
||||||
make PLATFORM=linux DEBUG=1 clean
|
|
||||||
make PLATFORM=linux DEBUG=0 clean
|
|
||||||
|
|
||||||
make PLATFORM=linux DEBUG=1 all
|
|
||||||
make PLATFORM=linux DEBUG=0 all
|
|
|
@ -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 "CCAction.h"
|
||||||
#include "CCActionInterval.h"
|
#include "CCActionInterval.h"
|
||||||
#include "base_nodes/CCNode.h"
|
#include "CCNode.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
|
@ -27,9 +27,9 @@ THE SOFTWARE.
|
||||||
#ifndef __ACTIONS_CCACTION_H__
|
#ifndef __ACTIONS_CCACTION_H__
|
||||||
#define __ACTIONS_CCACTION_H__
|
#define __ACTIONS_CCACTION_H__
|
||||||
|
|
||||||
#include "cocoa/CCObject.h"
|
#include "CCObject.h"
|
||||||
#include "cocoa/CCGeometry.h"
|
#include "CCGeometry.h"
|
||||||
#include "platform/CCPlatformMacros.h"
|
#include "CCPlatformMacros.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "CCActionCamera.h"
|
#include "CCActionCamera.h"
|
||||||
#include "base_nodes/CCNode.h"
|
#include "CCNode.h"
|
||||||
#include "CCCamera.h"
|
#include "CCCamera.h"
|
||||||
#include "CCStdC.h"
|
#include "CCStdC.h"
|
||||||
|
|
|
@ -40,8 +40,8 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "CCActionInterval.h"
|
#include "CCActionInterval.h"
|
||||||
#include "base_nodes/CCNode.h"
|
#include "CCNode.h"
|
||||||
#include "cocoa/CCGeometry.h"
|
#include "CCGeometry.h"
|
||||||
|
|
||||||
NS_CC_BEGIN;
|
NS_CC_BEGIN;
|
||||||
|
|
|
@ -24,7 +24,7 @@ THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include "CCActionGrid.h"
|
#include "CCActionGrid.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "effects/CCGrid.h"
|
#include "CCGrid.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
// implementation of GridAction
|
// implementation of GridAction
|
|
@ -25,9 +25,9 @@
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "CCActionInstant.h"
|
#include "CCActionInstant.h"
|
||||||
#include "base_nodes/CCNode.h"
|
#include "CCNode.h"
|
||||||
#include "sprite_nodes/CCSprite.h"
|
#include "CCSprite.h"
|
||||||
#include "script_support/CCScriptSupport.h"
|
#include "CCScriptSupport.h"
|
||||||
|
|
||||||
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
@ -25,8 +25,8 @@ THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "CCActionInterval.h"
|
#include "CCActionInterval.h"
|
||||||
#include "sprite_nodes/CCSprite.h"
|
#include "CCSprite.h"
|
||||||
#include "base_nodes/CCNode.h"
|
#include "CCNode.h"
|
||||||
#include "CCStdC.h"
|
#include "CCStdC.h"
|
||||||
#include "CCActionInstant.h"
|
#include "CCActionInstant.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
|
@ -27,11 +27,11 @@ THE SOFTWARE.
|
||||||
#ifndef __ACTION_CCINTERVAL_ACTION_H__
|
#ifndef __ACTION_CCINTERVAL_ACTION_H__
|
||||||
#define __ACTION_CCINTERVAL_ACTION_H__
|
#define __ACTION_CCINTERVAL_ACTION_H__
|
||||||
|
|
||||||
#include "base_nodes/CCNode.h"
|
#include "CCNode.h"
|
||||||
#include "CCAction.h"
|
#include "CCAction.h"
|
||||||
#include "CCProtocols.h"
|
#include "CCProtocols.h"
|
||||||
#include "sprite_nodes/CCSpriteFrame.h"
|
#include "CCSpriteFrame.h"
|
||||||
#include "sprite_nodes/CCAnimation.h"
|
#include "CCAnimation.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
|
@ -26,12 +26,12 @@ THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "CCActionManager.h"
|
#include "CCActionManager.h"
|
||||||
#include "base_nodes/CCNode.h"
|
#include "CCNode.h"
|
||||||
#include "CCScheduler.h"
|
#include "CCScheduler.h"
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "support/data_support/ccCArray.h"
|
#include "ccCArray.h"
|
||||||
#include "support/data_support/uthash.h"
|
#include "uthash.h"
|
||||||
#include "cocoa/CCSet.h"
|
#include "CCSet.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
//
|
//
|
|
@ -29,8 +29,8 @@ THE SOFTWARE.
|
||||||
#define __ACTION_CCACTION_MANAGER_H__
|
#define __ACTION_CCACTION_MANAGER_H__
|
||||||
|
|
||||||
#include "CCAction.h"
|
#include "CCAction.h"
|
||||||
#include "cocoa/CCArray.h"
|
#include "CCArray.h"
|
||||||
#include "cocoa/CCObject.h"
|
#include "CCObject.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
|
@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include "CCActionProgressTimer.h"
|
#include "CCActionProgressTimer.h"
|
||||||
#include "misc_nodes/CCProgressTimer.h"
|
#include "CCProgressTimer.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||||
#include "CCActionTiledGrid.h"
|
#include "CCActionTiledGrid.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "effects/CCGrid.h"
|
#include "CCGrid.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
|
@ -24,10 +24,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include "CCAnimation.h"
|
#include "CCAnimation.h"
|
||||||
#include "textures/CCTextureCache.h"
|
#include "CCTextureCache.h"
|
||||||
#include "textures/CCTexture2D.h"
|
#include "CCTexture2D.h"
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "sprite_nodes/CCSpriteFrame.h"
|
#include "CCSpriteFrame.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
|
@ -26,11 +26,11 @@ THE SOFTWARE.
|
||||||
#ifndef __CC_ANIMATION_H__
|
#ifndef __CC_ANIMATION_H__
|
||||||
#define __CC_ANIMATION_H__
|
#define __CC_ANIMATION_H__
|
||||||
|
|
||||||
#include "platform/CCPlatformConfig.h"
|
#include "CCPlatformConfig.h"
|
||||||
#include "cocoa/CCObject.h"
|
#include "CCObject.h"
|
||||||
#include "cocoa/CCArray.h"
|
#include "CCArray.h"
|
||||||
#include "cocoa/CCDictionary.h"
|
#include "CCDictionary.h"
|
||||||
#include "cocoa/CCGeometry.h"
|
#include "CCGeometry.h"
|
||||||
#include "CCSpriteFrame.h"
|
#include "CCSpriteFrame.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -28,7 +28,7 @@ THE SOFTWARE.
|
||||||
#include "CCAnimation.h"
|
#include "CCAnimation.h"
|
||||||
#include "CCSpriteFrame.h"
|
#include "CCSpriteFrame.h"
|
||||||
#include "CCSpriteFrameCache.h"
|
#include "CCSpriteFrameCache.h"
|
||||||
#include "cocoa/CCString.h"
|
#include "CCString.h"
|
||||||
#include "platform/CCFileUtils.h"
|
#include "platform/CCFileUtils.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
|
@ -26,8 +26,8 @@ THE SOFTWARE.
|
||||||
#ifndef __CC_ANIMATION_CACHE_H__
|
#ifndef __CC_ANIMATION_CACHE_H__
|
||||||
#define __CC_ANIMATION_CACHE_H__
|
#define __CC_ANIMATION_CACHE_H__
|
||||||
|
|
||||||
#include "cocoa/CCObject.h"
|
#include "CCObject.h"
|
||||||
#include "cocoa/CCDictionary.h"
|
#include "CCDictionary.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -25,14 +25,14 @@ THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "CCAtlasNode.h"
|
#include "CCAtlasNode.h"
|
||||||
#include "textures/CCTextureAtlas.h"
|
#include "CCTextureAtlas.h"
|
||||||
#include "textures/CCTextureCache.h"
|
#include "CCTextureCache.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "shaders/CCGLProgram.h"
|
#include "CCGLProgram.h"
|
||||||
#include "shaders/CCShaderCache.h"
|
#include "CCShaderCache.h"
|
||||||
#include "shaders/ccGLStateCache.h"
|
#include "ccGLStateCache.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "support/TransformUtils.h"
|
#include "TransformUtils.h"
|
||||||
|
|
||||||
// external
|
// external
|
||||||
#include "kazmath/GL/matrix.h"
|
#include "kazmath/GL/matrix.h"
|
|
@ -24,10 +24,10 @@ THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "CCCamera.h"
|
#include "CCCamera.h"
|
||||||
#include "cocoa/CCString.h"
|
#include "CCString.h"
|
||||||
#include "CCGL.h"
|
#include "CCGL.h"
|
||||||
|
|
||||||
#include "draw_nodes/CCDrawingPrimitives.h"
|
#include "CCDrawingPrimitives.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "kazmath/GL/matrix.h"
|
#include "kazmath/GL/matrix.h"
|
||||||
|
|
|
@ -29,7 +29,7 @@ THE SOFTWARE.
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "cocoa/CCObject.h"
|
#include "CCObject.h"
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "kazmath/mat4.h"
|
#include "kazmath/mat4.h"
|
||||||
|
|
|
@ -27,10 +27,10 @@
|
||||||
|
|
||||||
#include "CCClippingNode.h"
|
#include "CCClippingNode.h"
|
||||||
#include "kazmath/GL/matrix.h"
|
#include "kazmath/GL/matrix.h"
|
||||||
#include "shaders/CCGLProgram.h"
|
#include "CCGLProgram.h"
|
||||||
#include "shaders/CCShaderCache.h"
|
#include "CCShaderCache.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "draw_nodes/CCDrawingPrimitives.h"
|
#include "CCDrawingPrimitives.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
@ -311,6 +311,7 @@ void ClippingNode::visit()
|
||||||
GLProgram *program = ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST);
|
GLProgram *program = ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST);
|
||||||
GLint alphaValueLocation = glGetUniformLocation(program->getProgram(), GLProgram::UNIFORM_NAME_ALPHA_TEST_VALUE);
|
GLint alphaValueLocation = glGetUniformLocation(program->getProgram(), GLProgram::UNIFORM_NAME_ALPHA_TEST_VALUE);
|
||||||
// set our alphaThreshold
|
// set our alphaThreshold
|
||||||
|
program->use();
|
||||||
program->setUniformLocationWith1f(alphaValueLocation, _alphaThreshold);
|
program->setUniformLocationWith1f(alphaValueLocation, _alphaThreshold);
|
||||||
// we need to recursively apply this shader to all the nodes in the stencil node
|
// 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
|
// 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__
|
#ifndef __MISCNODE_CCCLIPPING_NODE_H__
|
||||||
#define __MISCNODE_CCCLIPPING_NODE_H__
|
#define __MISCNODE_CCCLIPPING_NODE_H__
|
||||||
|
|
||||||
#include "base_nodes/CCNode.h"
|
#include "CCNode.h"
|
||||||
#include "CCGL.h"
|
#include "CCGL.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
|
@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "support/component/CCComponent.h"
|
#include "CCComponent.h"
|
||||||
|
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||||
#ifndef __CC_FRAMEWORK_COMPONENT_H__
|
#ifndef __CC_FRAMEWORK_COMPONENT_H__
|
||||||
#define __CC_FRAMEWORK_COMPONENT_H__
|
#define __CC_FRAMEWORK_COMPONENT_H__
|
||||||
|
|
||||||
#include "cocoa/CCObject.h"
|
#include "CCObject.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
|
@ -23,8 +23,8 @@ THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#include "support/component/CCComponentContainer.h"
|
#include "CCComponentContainer.h"
|
||||||
#include "support/component/CCComponent.h"
|
#include "CCComponent.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||||
#ifndef __CC_FRAMEWORK_COMCONTAINER_H__
|
#ifndef __CC_FRAMEWORK_COMCONTAINER_H__
|
||||||
#define __CC_FRAMEWORK_COMCONTAINER_H__
|
#define __CC_FRAMEWORK_COMCONTAINER_H__
|
||||||
|
|
||||||
#include "cocoa/CCDictionary.h"
|
#include "CCDictionary.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
|
@ -27,9 +27,9 @@ THE SOFTWARE.
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "ccConfig.h"
|
#include "ccConfig.h"
|
||||||
#include "cocoa/CCDictionary.h"
|
#include "CCDictionary.h"
|
||||||
#include "cocoa/CCInteger.h"
|
#include "CCInteger.h"
|
||||||
#include "cocoa/CCBool.h"
|
#include "CCBool.h"
|
||||||
#include "cocos2d.h"
|
#include "cocos2d.h"
|
||||||
#include "platform/CCFileUtils.h"
|
#include "platform/CCFileUtils.h"
|
||||||
|
|
|
@ -26,9 +26,9 @@ THE SOFTWARE.
|
||||||
#ifndef __CCCONFIGURATION_H__
|
#ifndef __CCCONFIGURATION_H__
|
||||||
#define __CCCONFIGURATION_H__
|
#define __CCCONFIGURATION_H__
|
||||||
|
|
||||||
#include "cocoa/CCObject.h"
|
#include "CCObject.h"
|
||||||
#include "CCGL.h"
|
#include "CCGL.h"
|
||||||
#include "cocoa/CCString.h"
|
#include "CCString.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#define __COCOS2D_CCDEPRECATED_H__
|
#define __COCOS2D_CCDEPRECATED_H__
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "cocoa/CCGeometry.h"
|
#include "CCGeometry.h"
|
||||||
#include "ccTypes.h"
|
#include "ccTypes.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
|
@ -31,35 +31,36 @@ THE SOFTWARE.
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "ccFPSImages.h"
|
#include "ccFPSImages.h"
|
||||||
#include "draw_nodes/CCDrawingPrimitives.h"
|
#include "CCDrawingPrimitives.h"
|
||||||
#include "cocoa/CCNS.h"
|
#include "CCNS.h"
|
||||||
#include "layers_scenes_transitions_nodes/CCScene.h"
|
#include "CCScene.h"
|
||||||
#include "cocoa/CCArray.h"
|
#include "CCArray.h"
|
||||||
#include "CCScheduler.h"
|
#include "CCScheduler.h"
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "support/CCNotificationCenter.h"
|
#include "CCNotificationCenter.h"
|
||||||
#include "layers_scenes_transitions_nodes/CCTransition.h"
|
#include "CCTransition.h"
|
||||||
#include "textures/CCTextureCache.h"
|
#include "CCTextureCache.h"
|
||||||
#include "sprite_nodes/CCSpriteFrameCache.h"
|
#include "CCSpriteFrameCache.h"
|
||||||
#include "cocoa/CCAutoreleasePool.h"
|
#include "CCAutoreleasePool.h"
|
||||||
#include "platform/CCFileUtils.h"
|
#include "platform/CCFileUtils.h"
|
||||||
#include "CCApplication.h"
|
#include "CCApplication.h"
|
||||||
#include "label_nodes/CCLabelBMFont.h"
|
#include "CCLabelBMFont.h"
|
||||||
#include "label_nodes/CCLabelAtlas.h"
|
#include "CCLabelAtlas.h"
|
||||||
#include "actions/CCActionManager.h"
|
#include "CCActionManager.h"
|
||||||
#include "sprite_nodes/CCAnimationCache.h"
|
#include "CCAnimationCache.h"
|
||||||
#include "event_dispatcher/CCTouch.h"
|
#include "CCTouch.h"
|
||||||
#include "event_dispatcher/CCEventDispatcher.h"
|
#include "CCEventDispatcher.h"
|
||||||
#include "support/user_default/CCUserDefault.h"
|
#include "CCUserDefault.h"
|
||||||
#include "shaders/ccGLStateCache.h"
|
#include "ccGLStateCache.h"
|
||||||
#include "shaders/CCShaderCache.h"
|
#include "CCShaderCache.h"
|
||||||
#include "kazmath/kazmath.h"
|
#include "kazmath/kazmath.h"
|
||||||
#include "kazmath/GL/matrix.h"
|
#include "kazmath/GL/matrix.h"
|
||||||
#include "support/CCProfiling.h"
|
#include "CCProfiling.h"
|
||||||
#include "platform/CCImage.h"
|
#include "platform/CCImage.h"
|
||||||
#include "CCEGLView.h"
|
#include "CCEGLView.h"
|
||||||
#include "CCConfiguration.h"
|
#include "CCConfiguration.h"
|
||||||
|
#include "CCEventDispatcher.h"
|
||||||
|
#include "CCFontFreeType.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Position of the FPS
|
Position of the FPS
|
||||||
|
@ -143,6 +144,8 @@ bool Director::init(void)
|
||||||
_actionManager = new ActionManager();
|
_actionManager = new ActionManager();
|
||||||
_scheduler->scheduleUpdateForTarget(_actionManager, Scheduler::PRIORITY_SYSTEM, false);
|
_scheduler->scheduleUpdateForTarget(_actionManager, Scheduler::PRIORITY_SYSTEM, false);
|
||||||
|
|
||||||
|
_eventDispatcher = new EventDispatcher();
|
||||||
|
|
||||||
// create autorelease pool
|
// create autorelease pool
|
||||||
PoolManager::sharedPoolManager()->push();
|
PoolManager::sharedPoolManager()->push();
|
||||||
|
|
||||||
|
@ -162,6 +165,7 @@ Director::~Director(void)
|
||||||
CC_SAFE_RELEASE(_scenesStack);
|
CC_SAFE_RELEASE(_scenesStack);
|
||||||
CC_SAFE_RELEASE(_scheduler);
|
CC_SAFE_RELEASE(_scheduler);
|
||||||
CC_SAFE_RELEASE(_actionManager);
|
CC_SAFE_RELEASE(_actionManager);
|
||||||
|
CC_SAFE_RELEASE(_eventDispatcher);
|
||||||
|
|
||||||
// pop the autorelease pool
|
// pop the autorelease pool
|
||||||
PoolManager::sharedPoolManager()->pop();
|
PoolManager::sharedPoolManager()->pop();
|
||||||
|
@ -229,8 +233,6 @@ void Director::setGLDefaultValues()
|
||||||
// Draw the Scene
|
// Draw the Scene
|
||||||
void Director::drawScene()
|
void Director::drawScene()
|
||||||
{
|
{
|
||||||
Node::resetEventPriorityIndex();
|
|
||||||
|
|
||||||
// calculate "global" dt
|
// calculate "global" dt
|
||||||
calculateDeltaTime();
|
calculateDeltaTime();
|
||||||
|
|
||||||
|
@ -685,6 +687,8 @@ void Director::purgeDirector()
|
||||||
// purge bitmap cache
|
// purge bitmap cache
|
||||||
LabelBMFont::purgeCachedData();
|
LabelBMFont::purgeCachedData();
|
||||||
|
|
||||||
|
FontFreeType::shutdownFreeType();
|
||||||
|
|
||||||
// purge all managed caches
|
// purge all managed caches
|
||||||
DrawPrimitives::free();
|
DrawPrimitives::free();
|
||||||
AnimationCache::destroyInstance();
|
AnimationCache::destroyInstance();
|
||||||
|
@ -697,7 +701,6 @@ void Director::purgeDirector()
|
||||||
// cocos2d-x specific data structures
|
// cocos2d-x specific data structures
|
||||||
UserDefault::destroyInstance();
|
UserDefault::destroyInstance();
|
||||||
NotificationCenter::destroyInstance();
|
NotificationCenter::destroyInstance();
|
||||||
EventDispatcher::destroyInstance();
|
|
||||||
|
|
||||||
GL::invalidateStateCache();
|
GL::invalidateStateCache();
|
||||||
|
|
||||||
|
@ -968,6 +971,21 @@ ActionManager* Director::getActionManager() const
|
||||||
return _actionManager;
|
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
|
* implementation of DisplayLinkDirector
|
||||||
**************************************************/
|
**************************************************/
|
|
@ -27,15 +27,15 @@ THE SOFTWARE.
|
||||||
#ifndef __CCDIRECTOR_H__
|
#ifndef __CCDIRECTOR_H__
|
||||||
#define __CCDIRECTOR_H__
|
#define __CCDIRECTOR_H__
|
||||||
|
|
||||||
#include "platform/CCPlatformMacros.h"
|
#include "CCPlatformMacros.h"
|
||||||
|
|
||||||
#include "cocoa/CCObject.h"
|
#include "CCObject.h"
|
||||||
#include "ccTypes.h"
|
#include "ccTypes.h"
|
||||||
#include "cocoa/CCGeometry.h"
|
#include "CCGeometry.h"
|
||||||
#include "cocoa/CCArray.h"
|
#include "CCArray.h"
|
||||||
#include "CCGL.h"
|
#include "CCGL.h"
|
||||||
#include "kazmath/mat4.h"
|
#include "kazmath/mat4.h"
|
||||||
#include "label_nodes/CCLabelAtlas.h"
|
#include "CCLabelAtlas.h"
|
||||||
|
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
@ -53,10 +53,7 @@ class DirectorDelegate;
|
||||||
class Node;
|
class Node;
|
||||||
class Scheduler;
|
class Scheduler;
|
||||||
class ActionManager;
|
class ActionManager;
|
||||||
class TouchDispatcher;
|
class EventDispatcher;
|
||||||
class KeyboardDispatcher;
|
|
||||||
class KeypadDispatcher;
|
|
||||||
class Accelerometer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Class that creates and handles the main Window and manages how
|
@brief Class that creates and handles the main Window and manages how
|
||||||
|
@ -351,9 +348,25 @@ public:
|
||||||
@since v2.0
|
@since v2.0
|
||||||
*/
|
*/
|
||||||
void setActionManager(ActionManager* actionManager);
|
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 */
|
/* Gets delta time since last tick to main loop */
|
||||||
float getDeltaTime() const;
|
float getDeltaTime() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get Frame Rate
|
||||||
|
*/
|
||||||
|
float getFrameRate() const { return _frameRate; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void purgeDirector();
|
void purgeDirector();
|
||||||
bool _purgeDirecotorInNextLoop; // this flag will be set to true in end()
|
bool _purgeDirecotorInNextLoop; // this flag will be set to true in end()
|
||||||
|
@ -379,6 +392,11 @@ protected:
|
||||||
*/
|
*/
|
||||||
ActionManager* _actionManager;
|
ActionManager* _actionManager;
|
||||||
|
|
||||||
|
/** EventDispatcher associated with this director
|
||||||
|
@since v3.0
|
||||||
|
*/
|
||||||
|
EventDispatcher* _eventDispatcher;
|
||||||
|
|
||||||
/* delta time since last tick to main loop */
|
/* delta time since last tick to main loop */
|
||||||
float _deltaTime;
|
float _deltaTime;
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "CCDrawNode.h"
|
#include "CCDrawNode.h"
|
||||||
#include "shaders/CCShaderCache.h"
|
#include "CCShaderCache.h"
|
||||||
#include "CCGL.h"
|
#include "CCGL.h"
|
||||||
#include "support/CCNotificationCenter.h"
|
#include "CCNotificationCenter.h"
|
||||||
#include "CCEventType.h"
|
#include "CCEventType.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
|
@ -30,7 +30,7 @@
|
||||||
#ifndef __CCDRAWNODES_CCDRAW_NODE_H__
|
#ifndef __CCDRAWNODES_CCDRAW_NODE_H__
|
||||||
#define __CCDRAWNODES_CCDRAW_NODE_H__
|
#define __CCDRAWNODES_CCDRAW_NODE_H__
|
||||||
|
|
||||||
#include "base_nodes/CCNode.h"
|
#include "CCNode.h"
|
||||||
#include "ccTypes.h"
|
#include "ccTypes.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
|
@ -40,10 +40,10 @@ THE SOFTWARE.
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "CCGL.h"
|
#include "CCGL.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "shaders/ccGLStateCache.h"
|
#include "ccGLStateCache.h"
|
||||||
#include "shaders/CCShaderCache.h"
|
#include "CCShaderCache.h"
|
||||||
#include "shaders/CCGLProgram.h"
|
#include "CCGLProgram.h"
|
||||||
#include "actions/CCActionCatmullRom.h"
|
#include "CCActionCatmullRom.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
|
@ -42,7 +42,7 @@ THE SOFTWARE.
|
||||||
|
|
||||||
#include "ccTypes.h"
|
#include "ccTypes.h"
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "cocoa/CCGeometry.h" // for Point
|
#include "CCGeometry.h" // for Point
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@file
|
@file
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
Event::Event(const std::string& type)
|
Event::Event(Type type)
|
||||||
: _type(type)
|
: _type(type)
|
||||||
, _isStopped(false)
|
, _isStopped(false)
|
||||||
, _currentTarget(nullptr)
|
, _currentTarget(nullptr)
|
|
@ -29,7 +29,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "platform/CCPlatformMacros.h"
|
#include "CCPlatformMacros.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
@ -40,15 +40,25 @@ class Node;
|
||||||
*/
|
*/
|
||||||
class Event
|
class Event
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
enum class Type
|
||||||
|
{
|
||||||
|
TOUCH,
|
||||||
|
KEYBOARD,
|
||||||
|
ACCELERATION,
|
||||||
|
MOUSE,
|
||||||
|
CUSTOM
|
||||||
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
Event(const std::string& type);
|
Event(Type type);
|
||||||
public:
|
public:
|
||||||
/** Destructor */
|
/** Destructor */
|
||||||
virtual ~Event();
|
virtual ~Event();
|
||||||
|
|
||||||
/** Gets the event type */
|
/** Gets the event type */
|
||||||
inline const std::string& getType() const { return _type; };
|
inline Type getType() const { return _type; };
|
||||||
|
|
||||||
/** Stops propagation for current event */
|
/** Stops propagation for current event */
|
||||||
inline void stopPropagation() { _isStopped = true; };
|
inline void stopPropagation() { _isStopped = true; };
|
||||||
|
@ -67,7 +77,8 @@ protected:
|
||||||
/** Sets current target */
|
/** Sets current target */
|
||||||
inline void setCurrentTarget(Node* target) { _currentTarget = 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.
|
bool _isStopped; ///< whether the event has been stopped.
|
||||||
Node* _currentTarget; ///< Current target
|
Node* _currentTarget; ///< Current target
|
||||||
|
|
|
@ -26,10 +26,8 @@
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
const char* EventAcceleration::EVENT_TYPE = "AccelerometerEvent";
|
|
||||||
|
|
||||||
EventAcceleration::EventAcceleration(Acceleration acc)
|
EventAcceleration::EventAcceleration(Acceleration acc)
|
||||||
: Event(EVENT_TYPE)
|
: Event(Type::ACCELERATION)
|
||||||
, _acc(acc)
|
, _acc(acc)
|
||||||
{
|
{
|
||||||
}
|
}
|
|
@ -33,7 +33,6 @@ NS_CC_BEGIN
|
||||||
class EventAcceleration : public Event
|
class EventAcceleration : public Event
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static const char* EVENT_TYPE;
|
|
||||||
|
|
||||||
EventAcceleration(Acceleration acc);
|
EventAcceleration(Acceleration acc);
|
||||||
|
|
|
@ -23,12 +23,15 @@
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "CCEventCustom.h"
|
#include "CCEventCustom.h"
|
||||||
|
#include "ccMacros.h"
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
EventCustom::EventCustom(const std::string& eventName)
|
EventCustom::EventCustom(const std::string& eventName)
|
||||||
: Event(eventName)
|
: Event(Type::CUSTOM)
|
||||||
, _userData(nullptr)
|
, _userData(nullptr)
|
||||||
|
, _eventName(eventName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,14 +35,17 @@ public:
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
EventCustom(const std::string& eventName);
|
EventCustom(const std::string& eventName);
|
||||||
|
|
||||||
/** Set user data */
|
/** Sets user data */
|
||||||
inline void setUserData(void* data) { _userData = data; };
|
inline void setUserData(void* data) { _userData = data; };
|
||||||
|
|
||||||
/** Get user data */
|
/** Gets user data */
|
||||||
inline void* getUserData() const { return _userData; };
|
inline void* getUserData() const { return _userData; };
|
||||||
|
|
||||||
|
/** Gets event name */
|
||||||
|
inline const std::string& getEventName() const { return _eventName; };
|
||||||
protected:
|
protected:
|
||||||
void* _userData; ///< User data
|
void* _userData; ///< User data
|
||||||
|
std::string _eventName;
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_CC_END
|
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
|
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
|
NS_CC_END
|
|
@ -196,13 +196,7 @@ public:
|
||||||
KEY_SEARCH = 0xFFAA
|
KEY_SEARCH = 0xFFAA
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char* EVENT_TYPE;
|
EventKeyboard(KeyCode keyCode, bool isPressed);
|
||||||
|
|
||||||
EventKeyboard(KeyCode keyCode, bool isPressed)
|
|
||||||
: Event(EVENT_TYPE)
|
|
||||||
, _keyCode(keyCode)
|
|
||||||
, _isPressed(isPressed)
|
|
||||||
{};
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
KeyCode _keyCode;
|
KeyCode _keyCode;
|
|
@ -35,16 +35,18 @@ EventListener::~EventListener()
|
||||||
CCLOGINFO("In the destructor of EventListener. %p", this);
|
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;
|
_onEvent = callback;
|
||||||
_type = t;
|
_type = t;
|
||||||
|
_listenerID = listenerID;
|
||||||
_isRegistered = false;
|
_isRegistered = false;
|
||||||
|
_paused = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EventListener::checkAvaiable()
|
bool EventListener::checkAvailable()
|
||||||
{
|
{
|
||||||
return (_onEvent != nullptr);
|
return (_onEvent != nullptr);
|
||||||
}
|
}
|
|
@ -25,46 +25,84 @@
|
||||||
#ifndef cocos2d_libs_EventListener_h
|
#ifndef cocos2d_libs_EventListener_h
|
||||||
#define cocos2d_libs_EventListener_h
|
#define cocos2d_libs_EventListener_h
|
||||||
|
|
||||||
#include "platform/CCPlatformMacros.h"
|
#include "CCPlatformMacros.h"
|
||||||
#include "cocoa/CCObject.h"
|
#include "CCObject.h"
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <set>
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
class Event;
|
class Event;
|
||||||
|
class Node;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base class of event listener.
|
* The base class of event listener.
|
||||||
* If you need custom listener which with different callback, you need to inherit this class.
|
* 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
|
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:
|
protected:
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
EventListener();
|
EventListener();
|
||||||
|
|
||||||
/** Initializes event with type and callback function */
|
/** 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:
|
public:
|
||||||
/** Destructor */
|
/** Destructor */
|
||||||
virtual ~EventListener();
|
virtual ~EventListener();
|
||||||
|
|
||||||
/** Checks whether the listener is available. */
|
/** Checks whether the listener is available. */
|
||||||
virtual bool checkAvaiable() = 0;
|
virtual bool checkAvailable() = 0;
|
||||||
|
|
||||||
/** Clones the listener, its subclasses have to override this method. */
|
/** Clones the listener, its subclasses have to override this method. */
|
||||||
virtual EventListener* clone() = 0;
|
virtual EventListener* clone() = 0;
|
||||||
|
|
||||||
protected:
|
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::function<void(Event*)> _onEvent; /// Event callback function
|
||||||
std::string _type; /// Event type
|
|
||||||
|
Type _type; /// Event listener type
|
||||||
|
ListenerID _listenerID; /// Event listener ID
|
||||||
bool _isRegistered; /// Whether the listener has been added to dispatcher.
|
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 EventDispatcher;
|
||||||
friend class Node;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
|
@ -37,7 +37,7 @@ EventListenerAcceleration::~EventListenerAcceleration()
|
||||||
CCLOGINFO("In the destructor of AccelerationEventListener. %p", this);
|
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();
|
EventListenerAcceleration* ret = new EventListenerAcceleration();
|
||||||
if (ret && ret->init(callback))
|
if (ret && ret->init(callback))
|
||||||
|
@ -59,7 +59,7 @@ bool EventListenerAcceleration::init(std::function<void(Acceleration*, Event* ev
|
||||||
this->onAccelerationEvent(&accEvent->_acc, event);
|
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;
|
onAccelerationEvent = callback;
|
||||||
return true;
|
return true;
|
||||||
|
@ -84,7 +84,7 @@ EventListenerAcceleration* EventListenerAcceleration::clone()
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EventListenerAcceleration::checkAvaiable()
|
bool EventListenerAcceleration::checkAvailable()
|
||||||
{
|
{
|
||||||
CCASSERT(onAccelerationEvent, "");
|
CCASSERT(onAccelerationEvent, "");
|
||||||
|
|
|
@ -33,12 +33,12 @@ NS_CC_BEGIN
|
||||||
class EventListenerAcceleration : public EventListener
|
class EventListenerAcceleration : public EventListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static EventListenerAcceleration* create(std::function<void(Acceleration*, Event* event)> callback);
|
static EventListenerAcceleration* create(std::function<void(Acceleration*, Event*)> callback);
|
||||||
virtual ~EventListenerAcceleration();
|
virtual ~EventListenerAcceleration();
|
||||||
|
|
||||||
/// Overrides
|
/// Overrides
|
||||||
virtual EventListenerAcceleration* clone() override;
|
virtual EventListenerAcceleration* clone() override;
|
||||||
virtual bool checkAvaiable() override;
|
virtual bool checkAvailable() override;
|
||||||
private:
|
private:
|
||||||
EventListenerAcceleration();
|
EventListenerAcceleration();
|
||||||
|
|
|
@ -35,7 +35,7 @@ EventListenerCustom::EventListenerCustom()
|
||||||
EventListenerCustom* EventListenerCustom::create(const std::string& eventName, std::function<void(EventCustom*)> callback)
|
EventListenerCustom* EventListenerCustom::create(const std::string& eventName, std::function<void(EventCustom*)> callback)
|
||||||
{
|
{
|
||||||
EventListenerCustom* ret = new EventListenerCustom();
|
EventListenerCustom* ret = new EventListenerCustom();
|
||||||
if (ret && ret->init(eventName, callback))
|
if (ret && ret->init(std::hash<std::string>()(eventName), callback))
|
||||||
{
|
{
|
||||||
ret->autorelease();
|
ret->autorelease();
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ EventListenerCustom* EventListenerCustom::create(const std::string& eventName, s
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EventListenerCustom::init(const std::string& eventName, std::function<void(EventCustom*)>callback)
|
bool EventListenerCustom::init(ListenerID listenerId, std::function<void(EventCustom*)>callback)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ bool EventListenerCustom::init(const std::string& eventName, std::function<void(
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (EventListener::init(eventName, listener))
|
if (EventListener::init(EventListener::Type::CUSTOM, listenerId, listener))
|
||||||
{
|
{
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ bool EventListenerCustom::init(const std::string& eventName, std::function<void(
|
||||||
EventListenerCustom* EventListenerCustom::clone()
|
EventListenerCustom* EventListenerCustom::clone()
|
||||||
{
|
{
|
||||||
EventListenerCustom* ret = new EventListenerCustom();
|
EventListenerCustom* ret = new EventListenerCustom();
|
||||||
if (ret && ret->init(_type, _onCustomEvent))
|
if (ret && ret->init(_listenerID, _onCustomEvent))
|
||||||
{
|
{
|
||||||
ret->autorelease();
|
ret->autorelease();
|
||||||
}
|
}
|
||||||
|
@ -80,10 +80,10 @@ EventListenerCustom* EventListenerCustom::clone()
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EventListenerCustom::checkAvaiable()
|
bool EventListenerCustom::checkAvailable()
|
||||||
{
|
{
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
if (EventListener::checkAvaiable() && _onCustomEvent != nullptr)
|
if (EventListener::checkAvailable() && _onCustomEvent != nullptr)
|
||||||
{
|
{
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
|
@ -33,21 +33,21 @@ class EventCustom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Usage:
|
* Usage:
|
||||||
* auto dispatcher = EventDispatcher::getInstance();
|
* auto dispatcher = Director::getInstance()->getEventDispatcher();
|
||||||
* Adds a listener:
|
* Adds a listener:
|
||||||
*
|
*
|
||||||
* auto callback = [](CustomEvent* event){ do_some_thing(); };
|
* auto callback = [](EventCustom* event){ do_some_thing(); };
|
||||||
* auto listener = CustomEventListener::create(callback);
|
* auto listener = EventListenerCustom::create(callback);
|
||||||
* dispatcher->addEventListenerWithSceneGraphPriority(listener, one_node);
|
* dispatcher->addEventListenerWithSceneGraphPriority(listener, one_node);
|
||||||
*
|
*
|
||||||
* Dispatchs a custom event:
|
* Dispatchs a custom event:
|
||||||
*
|
*
|
||||||
* Event event("your_event_type");
|
* EventCustom event("your_event_type");
|
||||||
* dispatcher->dispatchEvent(&event);
|
* dispatcher->dispatchEvent(&event);
|
||||||
*
|
*
|
||||||
* Removes a listener
|
* Removes a listener
|
||||||
*
|
*
|
||||||
* dispatcher->removeListener(listener);
|
* dispatcher->removeEventListener(listener);
|
||||||
*/
|
*/
|
||||||
class EventListenerCustom : public EventListener
|
class EventListenerCustom : public EventListener
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@ public:
|
||||||
static EventListenerCustom* create(const std::string& eventName, std::function<void(EventCustom*)> callback);
|
static EventListenerCustom* create(const std::string& eventName, std::function<void(EventCustom*)> callback);
|
||||||
|
|
||||||
/// Overrides
|
/// Overrides
|
||||||
virtual bool checkAvaiable() override;
|
virtual bool checkAvailable() override;
|
||||||
virtual EventListenerCustom* clone() override;
|
virtual EventListenerCustom* clone() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -67,7 +67,7 @@ protected:
|
||||||
EventListenerCustom();
|
EventListenerCustom();
|
||||||
|
|
||||||
/** Initializes event with type and callback function */
|
/** Initializes event with type and callback function */
|
||||||
bool init(const std::string& eventName, std::function<void(EventCustom*)> callback);
|
bool init(ListenerID listenerId, std::function<void(EventCustom*)> callback);
|
||||||
|
|
||||||
std::function<void(EventCustom*)> _onCustomEvent;
|
std::function<void(EventCustom*)> _onCustomEvent;
|
||||||
};
|
};
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
bool EventListenerKeyboard::checkAvaiable()
|
bool EventListenerKeyboard::checkAvailable()
|
||||||
{
|
{
|
||||||
CCASSERT(onKeyPressed && onKeyReleased, "");
|
CCASSERT(onKeyPressed && onKeyReleased, "");
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ bool EventListenerKeyboard::init()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (EventListener::init(EventKeyboard::EVENT_TYPE, listener))
|
if (EventListener::init(Type::KEYBOARD, static_cast<ListenerID>(Type::KEYBOARD), listener))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue