diff --git a/samples/EarthWarrior3D-CSDK/.cocos-project.json b/samples/EarthWarrior3D-CSDK/.cocos-project.json new file mode 100755 index 0000000..8f57f87 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/.cocos-project.json @@ -0,0 +1,3 @@ +{ + "project_type": "cpp" +} \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/CMakeLists.txt b/samples/EarthWarrior3D-CSDK/CMakeLists.txt new file mode 100755 index 0000000..36b268d --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/CMakeLists.txt @@ -0,0 +1,174 @@ +cmake_minimum_required(VERSION 2.6) + +set(APP_NAME MyGame) +project (${APP_NAME}) + +include(cocos2d/build/BuildHelpers.CMakeLists.txt) + +option(USE_CHIPMUNK "Use chipmunk for physics library" ON) +option(USE_BOX2D "Use box2d for physics library" OFF) +option(DEBUG_MODE "Debug or release?" ON) + +if(DEBUG_MODE) + set(CMAKE_BUILD_TYPE DEBUG) +else(DEBUG_MODE) + set(CMAKE_BUILD_TYPE RELEASE) +endif(DEBUG_MODE) + +set(CMAKE_C_FLAGS_DEBUG "-g -Wall -DCOCOS2D_DEBUG=1") +set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + +if(USE_CHIPMUNK) + message("Using chipmunk ...") + add_definitions(-DLINUX -DCC_ENABLE_CHIPMUNK_INTEGRATION=1) +elseif(USE_BOX2D) + message("Using box2d ...") + add_definitions(-DLINUX -DCC_ENABLE_BOX2D_INTEGRATION=1) +else(USE_CHIPMUNK) + message(FATAL_ERROR "Must choose a physics library.") +endif(USE_CHIPMUNK) + +# architecture +if ( CMAKE_SIZEOF_VOID_P EQUAL 8 ) +set(ARCH_DIR "64-bit") +else() +set(ARCH_DIR "32-bit") +endif() + + +set(GAME_SRC + proj.linux/main.cpp + Classes/AppDelegate.cpp + Classes/HelloWorldScene.cpp +) + +set(COCOS2D_ROOT ${CMAKE_SOURCE_DIR}/cocos2d) + +include_directories( + /usr/local/include/GLFW + ${COCOS2D_ROOT} + ${COCOS2D_ROOT}/cocos + ${COCOS2D_ROOT}/cocos/audio/include + ${COCOS2D_ROOT}/cocos/2d + ${COCOS2D_ROOT}/cocos/2d/renderer + ${COCOS2D_ROOT}/cocos/2d/platform + ${COCOS2D_ROOT}/cocos/2d/platform/desktop + ${COCOS2D_ROOT}/cocos/2d/platform/linux + ${COCOS2D_ROOT}/cocos/base + ${COCOS2D_ROOT}/cocos/deprecated + ${COCOS2D_ROOT}/cocos/physics + ${COCOS2D_ROOT}/cocos/editor-support + ${COCOS2D_ROOT}/cocos/math/kazmath + ${COCOS2D_ROOT}/extensions + ${COCOS2D_ROOT}/external + ${COCOS2D_ROOT}/external/edtaa3func + ${COCOS2D_ROOT}/external/jpeg/include/linux + ${COCOS2D_ROOT}/external/tiff/include/linux + ${COCOS2D_ROOT}/external/webp/include/linux + ${COCOS2D_ROOT}/external/tinyxml2 + ${COCOS2D_ROOT}/external/unzip + ${COCOS2D_ROOT}/external/chipmunk/include/chipmunk + ${COCOS2D_ROOT}/external/freetype2/include/linux + ${COCOS2D_ROOT}/external/websockets/include/linux + ${COCOS2D_ROOT}/external/spidermonkey/include/linux + ${COCOS2D_ROOT}/external/linux-specific/fmod/include/${ARCH_DIR} + ${COCOS2D_ROOT}/external/xxhash +) + +link_directories( + /usr/local/lib + ${COCOS2D_ROOT}/external/jpeg/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/tiff/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/webp/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/freetype2/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/websockets/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/spidermonkey/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/linux-specific/fmod/prebuilt/${ARCH_DIR} +) + +# kazmath +add_subdirectory(${COCOS2D_ROOT}/cocos/math/kazmath) + +# chipmunk library +add_subdirectory(${COCOS2D_ROOT}/external/chipmunk/src) + +# box2d library +add_subdirectory(${COCOS2D_ROOT}/external/Box2D) + +# unzip library +add_subdirectory(${COCOS2D_ROOT}/external/unzip) + +# tinyxml2 library +add_subdirectory(${COCOS2D_ROOT}/external/tinyxml2) + +# audio +add_subdirectory(${COCOS2D_ROOT}/cocos/audio) + +# xxhash library +add_subdirectory(${COCOS2D_ROOT}/external/xxhash) + +# cocos base library +add_subdirectory(${COCOS2D_ROOT}/cocos/base) + +# cocos 2d library +add_subdirectory(${COCOS2D_ROOT}/cocos/2d) + +# cocos storage +add_subdirectory(${COCOS2D_ROOT}/cocos/storage) + +# ui +add_subdirectory(${COCOS2D_ROOT}/cocos/ui) + +# network +add_subdirectory(${COCOS2D_ROOT}/cocos/network) + +# extensions +add_subdirectory(${COCOS2D_ROOT}/extensions) + +## Editor Support + +# spine +add_subdirectory(${COCOS2D_ROOT}/cocos/editor-support/spine) + +# cocosbuilder +add_subdirectory(${COCOS2D_ROOT}/cocos/editor-support/cocosbuilder) + +# cocostudio +add_subdirectory(${COCOS2D_ROOT}/cocos/editor-support/cocostudio) + +# add the executable +add_executable(${APP_NAME} + ${GAME_SRC} +) + +if ( CMAKE_SIZEOF_VOID_P EQUAL 8 ) +set(FMOD_LIB "fmodex64") +else() +set(FMOD_LIB "fmodex") +endif() + +target_link_libraries(${APP_NAME} + ui + network + storage + spine + cocostudio + cocosbuilder + extensions + audio + cocos2d + ) + +set(APP_BIN_DIR "${CMAKE_BINARY_DIR}/bin") + +set_target_properties(${APP_NAME} PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${APP_BIN_DIR}") + +pre_build(${APP_NAME} + COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resources ${APP_BIN_DIR}/Resources + ) + diff --git a/samples/EarthWarrior3D-CSDK/Classes/AirCraft.cpp b/samples/EarthWarrior3D-CSDK/Classes/AirCraft.cpp new file mode 100755 index 0000000..1c0817c --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/AirCraft.cpp @@ -0,0 +1,74 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "AirCraft.h" +#include "SimpleAudioEngine.h" +#include "Effects.h" +#include "HelloWorldScene.h" + +bool AirCraft::hurt(float damage) +{ + _HP -= damage; + if(_HP <= 0) + { + die(); + return true; + } + return false; +} +void AirCraft::die() +{ + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("explodeEffect.mp3"); + EffectManager::createBigExplosion(getPosition()); + auto helloworld = (HelloWorld*)Director::getInstance()->getRunningScene()->getChildByTag(100); + int score = helloworld->getScore(); + helloworld->setScore(score+=_score); + std::stringstream ss; + std::string str; + ss<>str; + const char *p = str.c_str(); + helloworld->getScoreLabel()->setString(p); + _alive = false; + auto scale = ScaleTo::create(0.1, 1.2); + auto scaleBack = ScaleTo::create(0.1, 1); + auto label =helloworld->getScoreLabel(); + label->runAction(Sequence::create(scale, scaleBack,NULL)); + //removeFromParent(); +} + +void AirCraft::move(float y, float dt) +{ + //setPosition(getPosition().x+getPosition().y+y); + forward(y); +} + +void AirCraft::reset() +{ + _alive = true; +} +bool AirCraft::alive() +{ + return _alive; +} \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/Classes/AirCraft.h b/samples/EarthWarrior3D-CSDK/Classes/AirCraft.h new file mode 100755 index 0000000..85142df --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/AirCraft.h @@ -0,0 +1,48 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__AirCraft__ +#define __Moon3d__AirCraft__ + +#include "cocos2d.h" +#include "GameEntity.h" +USING_NS_CC; + +class AirCraft : public GameEntity +{ +public: + virtual bool hurt(float damage); + virtual void die(); + void shoot(); + //CC_SYNTHESIZE(float, _HP, HP); + bool alive(); + virtual void move(float y, float dt); + virtual void reset(); +protected: + bool _alive; + float _HP; + int _score; +}; + +#endif /* defined(__Moon3d__AirCraft__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/AppDelegate.cpp b/samples/EarthWarrior3D-CSDK/Classes/AppDelegate.cpp new file mode 100755 index 0000000..64acb82 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/AppDelegate.cpp @@ -0,0 +1,93 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "AppDelegate.h" +#include "MainMenuScene.h" +#include "HelloWorldScene.h" +#include "LoadingScene.h" +#include "SimpleAudioEngine.h" +USING_NS_CC; + +AppDelegate::AppDelegate() { + +} + +AppDelegate::~AppDelegate() +{ +} + +bool AppDelegate::applicationDidFinishLaunching() { + // initialize director + auto director = Director::getInstance(); + auto glview = director->getOpenGLView(); + //glview->setDesignResolutionSize(480,800,ResolutionPolicy::FIXED_HEIGHT); + if(!glview) { + int height, width; + height = 800; + width = height*(640.0/960.0); + + glview = GLView::createWithRect("EarthWarrior3D", Rect(0, 0, width, height)); + + director->setOpenGLView(glview); + } + glview->setDesignResolutionSize(640, 960, ResolutionPolicy::SHOW_ALL); + + // turn on display FPS + director->setDisplayStats(false); + + // set FPS. the default value is 1.0/60 if you don't call this + director->setAnimationInterval(1.0 / 60); + + // create a scene. it's an autorelease object + //auto scene = LoadingScene::createScene(); + auto scene = MainMenuScene::createScene(); + //auto scene = HelloWorld::createScene(); + // run + director->runWithScene(scene); + glEnable(GL_CULL_FACE); + return true; +} + +// This function will be called when the app is inactive. When comes a phone call,it's be invoked too +void AppDelegate::applicationDidEnterBackground() { + SimpleAudioEngine::getInstance()->pauseAllEffects(); + SimpleAudioEngine::getInstance()->pauseBackgroundMusic(); + Director::getInstance()->stopAnimation(); + + + // if you use SimpleAudioEngine, it must be pause + // SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic(); +} + +// this function will be called when the app is active again +void AppDelegate::applicationWillEnterForeground() { + SimpleAudioEngine::getInstance()->resumeAllEffects(); + SimpleAudioEngine::getInstance()->resumeBackgroundMusic(); + + Director::getInstance()->startAnimation(); + + // if you use SimpleAudioEngine, it must resume here + // SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic(); +} + diff --git a/samples/EarthWarrior3D-CSDK/Classes/AppDelegate.h b/samples/EarthWarrior3D-CSDK/Classes/AppDelegate.h new file mode 100755 index 0000000..42eaa4f --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/AppDelegate.h @@ -0,0 +1,63 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 _APP_DELEGATE_H_ +#define _APP_DELEGATE_H_ + +#include "cocos2d.h" + +/** +@brief The cocos2d Application. + +The reason for implement as private inheritance is to hide some interface call by Director. +*/ +class AppDelegate : private cocos2d::Application +{ +public: + AppDelegate(); + virtual ~AppDelegate(); + + /** + @brief Implement Director and Scene init code here. + @return true Initialize success, app continue. + @return false Initialize failed, app terminate. + */ + virtual bool applicationDidFinishLaunching(); + + /** + @brief The function be called when the application enter background + @param the pointer of the application + */ + virtual void applicationDidEnterBackground(); + + /** + @brief The function be called when the application enter foreground + @param the pointer of the application + */ + virtual void applicationWillEnterForeground(); + +}; + +#endif // _APP_DELEGATE_H_ + diff --git a/samples/EarthWarrior3D-CSDK/Classes/Bullets.cpp b/samples/EarthWarrior3D-CSDK/Classes/Bullets.cpp new file mode 100755 index 0000000..8487e82 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/Bullets.cpp @@ -0,0 +1,191 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "Bullets.h" +#include "consts.h" +#include "GameLayer.h" +#include "GameEntity.h" +#include "GameControllers.h" +#include "Enemies.h" +#include "ParticleManager.h" +#include "Sprite3DEffect.h" + +bool Bullet::init() +{ + _Model = Sprite::create("bullets.png", Rect(5,8,24,32)); + //_Model = ParticleSystemQuad::create("missileFlare.plist"); + if(_Model) + { + addChild(_Model); + _radius=10; + _type = kEnemyBullet; + _owner = kEnemy; + _damage = 10; + + auto part_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonFlare.png"); + ValueMap vm=ParticleManager::getInstance()->GetPlistData("missileFlare"); + ParticleSystemQuad *p = ParticleSystemQuad::create(vm); + //p->setDisplayFrame(part_frame); + p->setTextureWithRect(part_frame->getTexture(), part_frame->getRect()); + //p->setEndColor(Color4F(1,0,0,1)); + //p->setStartColor(Color4F(1,0,0,1)); + p->setPositionType(tPositionType::GROUPED); + p->setScale(2.5); + p->setTotalParticles(2); + _Model->addChild(p,-1); + p->setPosition(Vec2(_Model->getContentSize()/2)); + setScale(1.5); + //static_cast(_Model)->setFlippedY(true); + return true; + } + return false; +} +bool PlayerBullet::init() +{ + _Model = Sprite::create("bullets.png", Rect(54, 57, 36, 67)); + if(_Model) + { + addChild(_Model); + _radius=10; + _type = kPlayerBullet; + _owner = kPlayer; + _damage = 2; + return true; + } + return false; +} + +void Bullet::setVector(Vec2 vec) +{ + _vector = vec; +} + +Vec2 Bullet::getVector() +{ + return _vector; +} +void Bullet::reset() +{ + setRotation(0); +} + +bool Missile::init() +{ + _Model = EffectSprite3D::createFromObjFileAndTexture("daodanv001.c3b", "daodan_32.png"); + if(_Model) + { + _accel = 15; + _turnRate = 180; + _yRotSpeed = 1400; + _yRotation = 0; + _left = false; + _velocity = 0; + + addChild(_Model); + _radius=10; + _type = kPlayerMissiles; + _owner = kPlayer; + _Model->setScale(3); + //_Model->setRotation3D(Vec3(0,0,180)); + _damage = 20; + _target = nullptr; + GameEntity::UseOutlineEffect(static_cast(_Model), 0.01, Color3B(0,0,0)); + _left = (CCRANDOM_MINUS1_1()>0); + if(_left) + _yRotSpeed *= -1; + + + // missile effects + + auto part2_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonSmoke.png"); + ValueMap vm2=ParticleManager::getInstance()->GetPlistData("emission"); + auto part2 = ParticleSystemQuad::create(vm2); + //part2->setDisplayFrame(part2_frame); + part2->setTextureWithRect(part2_frame->getTexture(), part2_frame->getRect()); + addChild(part2,1); + part2->setPosition(0,-34); + part2->setPositionType(tPositionType::GROUPED); + //part2->setScale(2.5); + + + auto part1_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonFlare.png"); + ValueMap vm1=ParticleManager::getInstance()->GetPlistData("missileFlare"); + auto part1 = ParticleSystemQuad::create(vm1); + //part1->setDisplayFrame(part1_frame); + part1->setTextureWithRect(part1_frame->getTexture(), part1_frame->getRect()); + addChild(part1,2); + part1->setPosition(0,-30); + part1->setPositionType(tPositionType::GROUPED); + part1->setScale(2.5); + return true; + } + return false; +} + +void Missile::update(float dt) +{ + if(!_target) + { + //setTarget(static_cast(getParent())->_testDummy);//very hacky + setTarget(static_cast(EnemyController::enemies.getRandomObject())); + } + if(_target){ + //turn towards the target + float angle = -CC_RADIANS_TO_DEGREES((getPosition() - _target->getPosition()).getAngle()); + if(fabsf(angle-90)>70) + { + //too much angle to track, get another target instead + _target = nullptr; + } + float curRot = getRotation(); + float angleDif = std::min(std::max((angle-90) - curRot, -_turnRate*dt), _turnRate*dt); + + float f = curRot + angleDif; + setRotation(f); + setPosition(getPosition()+Vec2(sinf(CC_DEGREES_TO_RADIANS(f))*_velocity,cosf(CC_DEGREES_TO_RADIANS(f))*_velocity) + _vector*dt); + _vector = _vector * (1-dt); + + } + else{ + float f = getRotation(); + setRotation(f); + setPosition(getPosition()+Vec2(sinf(CC_DEGREES_TO_RADIANS(f))*_velocity,cosf(CC_DEGREES_TO_RADIANS(f))*_velocity) + _vector*dt); + _vector = _vector * (1-dt*0.5); + } + // missiles need to rotate + _yRotation += _yRotSpeed*dt; + _Model->setRotation3D(Vec3(0,_yRotation, 0)); + + + + + _velocity += _accel*dt; +} + +void Missile::reset() +{ + setTarget(nullptr); + _velocity = 0; +} + diff --git a/samples/EarthWarrior3D-CSDK/Classes/Bullets.h b/samples/EarthWarrior3D-CSDK/Classes/Bullets.h new file mode 100755 index 0000000..449eb9e --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/Bullets.h @@ -0,0 +1,72 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__Bullet__ +#define __Moon3d__Bullet__ + +#include "cocos2d.h" +#include "GameEntity.h" + + + +class Bullet : public GameEntity +{ +public: + CREATE_FUNC(Bullet); + bool init(); + void setVector(Vec2 vec); + Vec2 getVector(); + virtual void reset(); + CC_SYNTHESIZE(float, _damage, Damage); + CC_SYNTHESIZE(int, _owner, Owner) +protected: + Vec2 _vector; +}; + +class PlayerBullet : public Bullet +{ +public: + CREATE_FUNC(PlayerBullet); + bool init(); +}; + +class Missile : public Bullet +{ +public: + CREATE_FUNC(Missile); + bool init(); + void update(float dt); + CC_SYNTHESIZE(GameEntity*, _target, Target) + virtual void reset(); +protected: + float _accel; + float _turnRate; + //float _maxSpeed = 100; + float _yRotSpeed ; + float _yRotation; + bool _left; + float _velocity; +}; + +#endif /* defined(__Moon3d__Bullet__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/CCFLayer.cpp b/samples/EarthWarrior3D-CSDK/Classes/CCFLayer.cpp new file mode 100755 index 0000000..329f662 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/CCFLayer.cpp @@ -0,0 +1,202 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "CCFLayer.h" + +CCFLayer* CCFLayer::create(const char* type_file_name) +{ + CCFLayer *pRet = new CCFLayer(); + pRet->type_file_name = type_file_name; + if (pRet && pRet->init()) + { + pRet->autorelease(); + } + else + { + delete pRet; + pRet = NULL; + } + return pRet; +} + + +bool CCFLayer::init() +{ + auto window = Sprite::create(type_file_name); + //window->setPosition(Vec2(visibleSize.width/2, visibleSize.height/2)); + addChild(window,1); + window->setScale(0.2f); + window->runAction(Sequence::create(ScaleTo::create(0.2f, 1.1f), + ScaleTo::create(0.1f, 0.9f), + ScaleTo::create(0.1f, 1.0f), + NULL)); + + this->setContentSize(window->getContentSize()); + + + auto listener = EventListenerTouchOneByOne::create(); + listener->setSwallowTouches(true); + + listener->onTouchBegan = CC_CALLBACK_2(CCFLayer::onTouchBegan, this); + listener->onTouchMoved = CC_CALLBACK_2(CCFLayer::onTouchMoved, this); + listener->onTouchEnded = CC_CALLBACK_2(CCFLayer::onTouchEnded, this); + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + + auto peerListener = EventListenerCustom::create("IntelCCFPeerUpdate", CC_CALLBACK_1(CCFLayer::listenToPeerUpdate, this)); + Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(peerListener, this); + + initListView(); + + schedulePeer(0); + + return true; +} + +void CCFLayer::dismiss(){ + this->removeFromParent(); +} + +bool CCFLayer::onTouchBegan(Touch *touch, Event *event) +{ + this->runAction(Sequence::create(ScaleTo::create(0.2f, 0.2f),CallFunc::create(CC_CALLBACK_0(CCFLayer::dismiss,this)), NULL)); + return true; +} +void CCFLayer::onTouchMoved(Touch *touch, Event *event) +{ + +} +void CCFLayer::onTouchEnded(Touch *touch, Event *event) +{ +} + +void CCFLayer::initListView() +{ + Size visibleSize = Director::getInstance()->getVisibleSize(); + + _listView = ListView::create(); + _listView->setDirection(ui::ScrollView::Direction::VERTICAL); + _listView->setTouchEnabled(true); + _listView->setBounceEnabled(true); + _listView->setBackGroundImage("listviewbg.png"); + _listView->setBackGroundImageScale9Enabled(true); + _listView->setSize(this->getContentSize());//Size(480, visibleSize.height)); +// _listView->setPosition(Point(visibleSize.width / 2.0f, visibleSize.height / 2.0f)); + _listView->setAnchorPoint(Vec2::ANCHOR_MIDDLE); + _listView->addEventListener((ui::ListView::ccListViewCallback)CC_CALLBACK_2(CCFLayer::selectedItemEvent, this)); + + addChild(_listView,1); +} + +void CCFLayer::selectedItemEvent(Ref *pSender, ListView::EventType type) +{ + switch (type) + { + case cocos2d::ui::ListView::EventType::ON_SELECTED_ITEM_START: + { + ListView* listView = static_cast(pSender); + CC_UNUSED_PARAM(listView); + CCLOG("select child start index = %ld", listView->getCurSelectedIndex()); + break; + } + case cocos2d::ui::ListView::EventType::ON_SELECTED_ITEM_END: + { + ListView* listView = static_cast(pSender); + CC_UNUSED_PARAM(listView); + CCLOG("select child end index = %ld", listView->getCurSelectedIndex()); + Widget *tempWiget = listView->getItem(listView->getCurSelectedIndex()); + PeerButton *tempButton = (PeerButton *)tempWiget->getChildByTag(10011); + if (tempButton) { + ConnectionInterface::InvitePeer(tempButton->getPeer()); + } + + break; + } + default: + break; + } +} + +void CCFLayer::listenToPeerUpdate(EventCustom *event) +{ + this->scheduleOnce(schedule_selector(CCFLayer::schedulePeer), 0); +} + +void CCFLayer::schedulePeer(float dt) +{ + std::list listPeer; + ConnectionInterface::getPeerList(listPeer); + + if (listPeer.size() == 0) return; + + while(listPeer.size()){ + tagPEER tempPeer = listPeer.front(); + + CCLOG("CCFLayer schedulePeer:%s", tempPeer._sessionName.c_str()); + + Widget *pItem = queryPeerMenuItem(tempPeer); + if (tempPeer.add && pItem == NULL) { + + PeerButton* custom_button = PeerButton::create("backtotoppressed.png", "backtotopnormal.png"); + custom_button->setTitleText(tempPeer._sessionName); + custom_button->setTitleFontSize(20); + custom_button->setScale9Enabled(true); + custom_button->setPeer(tempPeer); + custom_button->setTag(10011); + + + Layout *custom_item = Layout::create(); + custom_item->setContentSize(custom_button->getContentSize()); + custom_item->setTouchEnabled(true); + custom_item->setTag(10010); + custom_item->addChild(custom_button, 0); + custom_button->setPosition(Vec2(_listView->getContentSize().width/2, -100)); + + _listView->addChild(custom_item); + } + + if(!tempPeer.add && pItem != NULL){ + pItem->removeFromParent(); + } + + listPeer.pop_front(); + } +} + + +Widget* CCFLayer::queryPeerMenuItem(tagPEER peer) +{ + for (auto& child : _listView->getChildren()) + { + if(child && child->getTag() == 10010) + { + PeerButton *tempButton = (PeerButton *)child->getChildByTag(10011); + if (tempButton && tempButton->getPeer()._sessionId == peer._sessionId) { + return (Widget*)child; + } + } + } + + return NULL; +} \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/Classes/CCFLayer.h b/samples/EarthWarrior3D-CSDK/Classes/CCFLayer.h new file mode 100755 index 0000000..59a518e --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/CCFLayer.h @@ -0,0 +1,69 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__CCFLayer__ +#define __Moon3d__CCFLayer__ + +#include "cocos2d.h" +#include "PeerButton.h" +#include "editor-support/cocostudio/CocoStudio.h" +#include "cocos/ui/CocosGUI.h" + +USING_NS_CC; + +class CCFLayer : public Layer +{ +public: + + static CCFLayer* create(const char* type_file_name); + + virtual bool init(); + +private: + + MenuItemSprite* license; + + const char* type_file_name; + + void dismiss(); + + virtual bool onTouchBegan(Touch *touch, Event *event); + virtual void onTouchMoved(Touch *touch, Event *event); + virtual void onTouchEnded(Touch *touch, Event *event); + +protected: + + void listenToPeerUpdate(cocos2d::EventCustom *event); + void schedulePeer(float dt); + + void initListView(); + + void selectedItemEvent(Ref* pSender, ListView::EventType type); + + Widget* queryPeerMenuItem(tagPEER peer); + + ListView* _listView; +}; + +#endif /* defined(__Moon3d__CCFLayer__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/CCFPlayer.cpp b/samples/EarthWarrior3D-CSDK/Classes/CCFPlayer.cpp new file mode 100755 index 0000000..e85cf42 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/CCFPlayer.cpp @@ -0,0 +1,177 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "CCFPlayer.h" +#include "Bullets.h" +#include "GameControllers.h" +#include "consts.h" +#include "HelloWorldScene.h" +#include "PublicApi.h" +#include "GameLayer.h" +#include "ParticleManager.h" +#include "Sprite3DEffect.h" +#include "ConnectionInterface.h" +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +#include "platform/android/jni/JniHelper.h" +#endif + +#define visible_size_macro Director::getInstance()->getVisibleSize() +#define origin_point Director::getInstance()->getVisibleOrigin(); + +const float CCFPlayer::rollSpeed = 1.5;// recommended 1.5 +const float CCFPlayer::returnSpeed = 10;// recommended 4 +const float CCFPlayer::maxRoll = 75; +const float CCFPlayer::rollReturnThreshold = 1.02; + +bool CCFPlayer::init() +{ + _Model = EffectSprite3D::createFromObjFileAndTexture("playerv002.c3b", "playerv002_256.png"); + if(_Model) + { + targetAngle = 0; + targetPos = Vec2(0,0); + _trailOffset = Vec2(0,-40); + + _Model->setScale(8); + addChild(_Model); + // _Model->setRotation3D(Vec3(90,0,0)); + _radius = 40; + _HP = 100; + _alive = true; + + GameEntity::UseOutlineEffect(static_cast(_Model), 0.02, Color3B(0,0,0)); + + if(ConnectionInterface::IsPlayGame()) + { + schedule(schedule_selector(CCFPlayer::shootMissile), 1.5, -1, 0); + schedule(schedule_selector(CCFPlayer::shoot), 0.075, -1, 0); + + // engine trail + auto part_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("engine2.jpg"); + ValueMap vm=ParticleManager::getInstance()->GetPlistData("engine"); + auto part = ParticleSystemQuad::create(vm); + part->setTextureWithRect(part_frame->getTexture(), part_frame->getRect()); + addChild(part); + part->setPosition(0,-30); + part->setScale(0.6); + //part->setRotation(90); + } + + return true; + } + return false; +} +void CCFPlayer::update(float dt) +{ + float smoothedAngle =std::min(std::max(targetAngle*(1-dt*returnSpeed*(rollReturnThreshold-fabsf(targetAngle)/maxRoll)),-maxRoll),maxRoll); + setRotation3D(Vec3(fabsf(smoothedAngle)*0.15,smoothedAngle, 0)); + targetAngle = getRotation3D().y; +} + +void CCFPlayer::touchMoved(Point prev, Point delta) +{ + if(!ConnectionInterface::IsPlayGame()) return; + + Point _prev = getPosition(); + + Point shiftPosition = delta+_prev; + + setTargetAngle(targetAngle+delta.x*rollSpeed*(rollReturnThreshold-fabsf(targetAngle)/maxRoll)); + + setPosition(shiftPosition.getClampPoint(Point(PLAYER_LIMIT_LEFT,PLAYER_LIMIT_BOT),Point(PLAYER_LIMIT_RIGHT,PLAYER_LIMIT_TOP))); +} + +void CCFPlayer::shoot(float dt) +{ + BulletController::spawnBullet(kPlayerBullet, getPosition()+Vec2(-20,20), Vec2(-200,1600)); + BulletController::spawnBullet(kPlayerBullet, getPosition()+Vec2(20,20), Vec2(200,1600)); + BulletController::spawnBullet(kPlayerBullet, getPosition()+Vec2(0,20), Vec2(0,1600)); +} +void CCFPlayer::setPosition(Vec2 pos) +{ + if (_position.equals(pos)) + return; + + _position = pos; + _transformUpdated = _transformDirty = _inverseDirty = true; + if(_streak) + { + _streak->setPosition(pos+_trailOffset); + } + if(_emissionPart) + { + _emissionPart->setPosition(pos); + } +} +void CCFPlayer::shootMissile(float dt) +{ + auto left = BulletController::spawnBullet(kPlayerMissiles, getPosition()+Vec2(-50,-20), Vec2(-200,-200)); + left->setRotation(-45); + auto right = BulletController::spawnBullet(kPlayerMissiles, getPosition()+Vec2(50,-20), Vec2(200,-200)); + right->setRotation(45); +} + +void CCFPlayer::stop() +{ + unschedule(schedule_selector(CCFPlayer::shoot)); + unschedule(schedule_selector(CCFPlayer::shootMissile)); +} +void CCFPlayer::hideWarningLayer(Node* node) +{ + if(node) + node->setVisible(false); +} +bool CCFPlayer::hurt(float damage){ + float fromHP = _HP; + float toHP = _HP-=damage; + + auto fade = FadeTo::create(0.2, 40); + auto fadeBack = FadeTo::create(0.2, 0); + auto warningLayer = Director::getInstance()->getRunningScene()->getChildByTag(456); + warningLayer->setVisible(true); + warningLayer->runAction(Sequence::create(fade,fadeBack, + CallFunc::create( + CC_CALLBACK_0(CCFPlayer::hideWarningLayer, this, warningLayer) + ),NULL)); + +// auto hpView = ((HelloWorld*)Director::getInstance()->getRunningScene()->getChildByTag(100))->getHPView(); +// +// auto to = ProgressFromTo::create(0.5, PublicApi::hp2percent(fromHP), PublicApi::hp2percent(toHP)); +// hpView->runAction(to); +// + if(_HP <= 0 && _alive) + { + die(); + return true; + } + + return false; +} + +void CCFPlayer::die() +{ + _alive = false; + GameLayer::isDie=true; + NotificationCenter::getInstance()->postNotification("ShowGameOver",NULL); +} \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/Classes/CCFPlayer.h b/samples/EarthWarrior3D-CSDK/Classes/CCFPlayer.h new file mode 100755 index 0000000..b19bf52 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/CCFPlayer.h @@ -0,0 +1,68 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__CCFPlayer__ +#define __Moon3d__CCFPlayer__ + +#include "cocos2d.h" +#include "AirCraft.h" + + +USING_NS_CC; + +class CCFPlayer : public AirCraft +{ +public: + CREATE_FUNC(CCFPlayer); + bool init(); + + void update(float dt); + + static const float rollSpeed;// recommended 1.5 + static const float returnSpeed;// recommended 4 + static const float maxRoll; + static const float rollReturnThreshold; + void setTargetAngle(float angle){targetAngle = angle;}; + void setTargetPos(Vec2 target){targetPos = target;}; + + void shoot(float dt); + void shootMissile(float dt); + void stop(); + CC_SYNTHESIZE(MotionStreak*, _streak, Trail); + CC_SYNTHESIZE(ParticleSystemQuad*, _emissionPart, EmissionPart); + void setPosition(Vec2 pos); + virtual bool hurt(float damage); + virtual void die(); + void hideWarningLayer(Node* node); + + void touchMoved(Point prev, Point delta); + +protected: + float targetAngle; + Vec2 targetPos; + Vec2 _trailOffset; +}; + + +#endif /* defined(__Moon3d__CCFPlayer__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/ConnectionInterface.cpp b/samples/EarthWarrior3D-CSDK/Classes/ConnectionInterface.cpp new file mode 100644 index 0000000..6e18d83 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/ConnectionInterface.cpp @@ -0,0 +1,192 @@ +// +// ConnectionInterface.cpp +// HelloCcf +// +// Created by calf on 14-7-24. +// +// + +#include "ConnectionInterface.h" +#include "cocos2d.h" +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +#include "platform/android/jni/JniHelper.h" +#endif + +USING_NS_CC; + +std::list ConnectionInterface::_listPeer; +std::list ConnectionInterface::_listMessage; +std::mutex ConnectionInterface::_mutex; +std::mutex ConnectionInterface::_mutexMessage; + +bool ConnectionInterface::_bPlayGame = false; + +void ConnectionInterface::OnPeerUpdate(tagPEER peer) +{ + CCLOG("ConnectionInterface::OnPeerUpdate"); + + std::list::iterator iter; + iter = queryPeer(peer); + + _mutex.lock(); + if (iter == _listPeer.end()) { + _listPeer.push_back(peer); + } + else{ + _listPeer.insert(iter, peer); + } + + _mutex.unlock(); + + cocos2d::EventCustom event("IntelCCFPeerUpdate"); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); +} + +void ConnectionInterface::InvitePeer(tagPEER peer) +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + jclass peercls = JniHelper::getEnv()->FindClass("com/intel/csdk/wrapper/Peer"); //获得Peer类引用 + if(peercls == NULL) + { + CCLOG(" can't find class com/intel/csdk/wrapper/Peer"); + return; + } + + jmethodID constrocMID = JniHelper::getEnv()->GetMethodID(peercls,"","(Ljava/lang/String;Ljava/lang/String;ZZZ)V"); //获得得该类型的构造函数 + if(constrocMID == NULL) + { + CCLOG(" can't find construct function com/intel/csdk/wrapper/Peer"); + return; + } + + jstring strName = JniHelper::getEnv()->NewStringUTF(peer._sessionName.c_str()); + jstring strId = JniHelper::getEnv()->NewStringUTF(peer._sessionId.c_str()); + + jobject peer_ojb = JniHelper::getEnv()->NewObject(peercls,constrocMID, strName, strId, (jboolean)peer._availability, (jboolean)peer._availability_cloud, (jboolean)peer._availability_proximity); //构造一个对象,调用该类的构造函数,并且传递参数 + + if(peer_ojb == NULL) + { + CCLOG(" create objec failed com/intel/csdk/wrapper/Peer"); + return; + } + + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, CCF_ACTIVITY_CLASSNAME, "invitePeer", "(Lcom/intel/csdk/wrapper/Peer;)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, peer_ojb); + t.env->DeleteLocalRef(t.classID); + } +#endif +} + +void ConnectionInterface::OnReciveInvite(std::string sessionId) +{ + CCLOG("ConnectionInterface::OnReciveInvite"); + cocos2d::EventCustom event("IntelCCFPeerInvite"); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); +} + +void ConnectionInterface::SendMessage(std::string msg) +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + jstring strMsg = JniHelper::getEnv()->NewStringUTF(msg.c_str()); + + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, CCF_ACTIVITY_CLASSNAME, "sendMessage", "(Ljava/lang/String;)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, strMsg); + t.env->DeleteLocalRef(t.classID); + } +#endif +} + +void ConnectionInterface::OnReceiveMessage(std::string message) +{ + if(message.length() == 0) return; + + _mutexMessage.lock(); + _listMessage.push_front(message); + _mutexMessage.unlock(); + + cocos2d::EventCustom event("IntelCCFReceiveMessage"); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); +} + +void ConnectionInterface::Disconnect() +{ + _mutexMessage.lock(); + _listMessage.clear(); + _mutexMessage.unlock(); + + _bPlayGame = false; +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, CCF_ACTIVITY_CLASSNAME, "remoteDisconnectJni", "()V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID); + t.env->DeleteLocalRef(t.classID); + } +#endif + +} + +void ConnectionInterface::OnDisconnect() +{ + _mutexMessage.lock(); + _listMessage.clear(); + _mutexMessage.unlock(); + + CCLOG("OnDisconnect"); + cocos2d::EventCustom event("IntelCCFDisconnect"); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); + + _bPlayGame = false; +} + +void ConnectionInterface::SendInviteResponse(bool value) +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, CCF_ACTIVITY_CLASSNAME, "sendInviteResponse", "(Z)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, (jboolean)value); + t.env->DeleteLocalRef(t.classID); + } +#endif + _bPlayGame = false; +} + +void ConnectionInterface::OnAcknowledgment() +{ + CCLOG("OnAcknowledgment"); + cocos2d::EventCustom event("IntelCCFInviteAcknowledgment"); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); + + _bPlayGame = true; +} + +void ConnectionInterface::getPeerList(std::list &listPeer) +{ + _mutex.lock(); + listPeer = std::list(_listPeer); + _mutex.unlock(); +} + +void ConnectionInterface::getMessageList(std::list &listMessage) +{ + _mutexMessage.lock(); + listMessage = std::list(_listMessage); + _listMessage.clear(); + _mutexMessage.unlock(); +} + +std::list::iterator ConnectionInterface::queryPeer(tagPEER &peer) +{ + _mutex.lock(); + + std::list::iterator iter; + for(iter = _listPeer.begin(); iter != _listPeer.end(); iter++) { + if( (*iter)._sessionId == peer._sessionId ) { + break; + } + } + _mutex.unlock(); + + return iter; +} \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/Classes/ConnectionInterface.h b/samples/EarthWarrior3D-CSDK/Classes/ConnectionInterface.h new file mode 100644 index 0000000..4b48c8b --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/ConnectionInterface.h @@ -0,0 +1,70 @@ +// +// ConnectionInterface.h +// HelloCcf +// +// Implement interface of Intel® Common Connectivity Framework +// eg. PeerUpdate Invite ReceiveInvite SendMessage ReceiveMessage Disconnect +// +// Created by calf on 14-7-24. +// +// + +#ifndef __HelloCcf__ConnectionInterface__ +#define __HelloCcf__ConnectionInterface__ + +#include +#include +#include +#include +typedef struct tagPEER{ + std::string _sessionName; + std::string _sessionId; + bool _availability; + bool _availability_cloud; + bool _availability_proximity; + bool add; +}; + +#define CCF_ACTIVITY_CLASSNAME "org/cocos2dx/cpp/AppActivity" + +class ConnectionInterface { +public: + + static void InvitePeer(tagPEER peer); + + static void SendInviteResponse(bool value); + + static void SendMessage(std::string msg); + + static void Disconnect(); + + static void OnPeerUpdate(tagPEER peer); + + static void OnReciveInvite(std::string sessionId); + + static void OnReceiveMessage(std::string message); + + static void OnAcknowledgment(); + + static void OnDisconnect(); + + static void getPeerList(std::list &listPeer); + + static void getMessageList(std::list &listMessage); + + static bool IsPlayGame(){return _bPlayGame;} +protected: + static std::list::iterator queryPeer(tagPEER &peer); + + static std::mutex _mutex; + + static std::mutex _mutexMessage; + + static std::list _listPeer; + + static std::list _listMessage; + + static bool _bPlayGame; +}; + +#endif /* defined(__HelloCcf__ConnectionInterface__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/Effects.cpp b/samples/EarthWarrior3D-CSDK/Classes/Effects.cpp new file mode 100755 index 0000000..9d0f925 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/Effects.cpp @@ -0,0 +1,82 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "Effects.h" + +Node* EffectManager::_effectLayer = nullptr; +Vector EffectManager::_smallExplPool; +Vector EffectManager::_bigExplPool; + +void EffectManager::createExplosion(Vec2 pos) +{ + if(!_effectLayer) + { + return; + } + + SmallExplosion* explosion = nullptr; + + if (!_smallExplPool.empty()) + { + explosion = _smallExplPool.back(); + _smallExplPool.popBack(); + } + else + { + explosion = SmallExplosion::create(); + explosion->retain(); + } + + explosion->createExplosion(_effectLayer, pos); + +} + +void EffectManager::createBigExplosion(Vec2 pos) +{ + if(!_effectLayer) + { + return; + } + + BigExplosion* explosion = nullptr; + + if (!_bigExplPool.empty()) + { + explosion = _bigExplPool.back(); + _bigExplPool.popBack(); + } + else + { + explosion = BigExplosion::create(); + explosion->retain(); + } + + explosion->createExplosion(_effectLayer, pos); + +} + +void EffectManager::setLayer(Node *layer) +{ + _effectLayer = layer; +} \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/Classes/Effects.h b/samples/EarthWarrior3D-CSDK/Classes/Effects.h new file mode 100755 index 0000000..53496f0 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/Effects.h @@ -0,0 +1,47 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__Effects__ +#define __Moon3d__Effects__ + +#include "cocos2d.h" +#include "Explosion.h" +USING_NS_CC; +USING_NS_CC_MATH; + +class EffectManager +{ +public: + static void createExplosion(Vec2 pos); + static void createBigExplosion(Vec2 pos); + static void setLayer(Node* layer); + static Vector _smallExplPool; + static Vector _bigExplPool; +protected: + static Node* _effectLayer; + +}; + + +#endif /* defined(__Moon3d__Effects__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/Enemies.cpp b/samples/EarthWarrior3D-CSDK/Classes/Enemies.cpp new file mode 100755 index 0000000..bfc3cca --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/Enemies.cpp @@ -0,0 +1,578 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "Enemies.h" +#include "GameControllers.h" +#include "Bullets.h" +#include "consts.h" +#include "SimpleAudioEngine.h" +#include "Effects.h" +#include "HelloWorldScene.h" +#include "GameLayer.h" +#include "Sprite3DEffect.h" + +bool Fodder::init() +{ + _score = 10; + _alive = true; + _Model = EffectSprite3D::createFromObjFileAndTexture("dijiyuanv001.c3b", "dijiyuanv001.png"); + if(_Model) + { + _Model->setScale(6); + addChild(_Model); + _Model->setRotation3D(Vec3(90,0,0)); + GameEntity::UseOutlineEffect(static_cast(_Model), 0.02, Color3B(0,0,0)); + _type = kEnemyFodder; + _HP = 10; + _radius = 30; + return true; + } + return false; +} +void Fodder::reset() +{ + AirCraft::reset(); + _target = nullptr; + _HP = 10; +} +void Fodder::setTurnRate(float turn) +{ + setMoveMode(moveMode::kTurn); + setRotation3D(Vec3(fabsf(turn)*0.15, turn, 0)); + _turn = turn; +} +float Fodder::getTurnRate() +{ + return _turn; +} +void Fodder::move(float y, float dt) +{ +switch(_moveMode) + { + case moveMode::kTurn: + forward(y, getTurnRate()*dt); + break; + default: + //setPosition(getPosition()+pos); + forward(y); + } + +} +void Fodder::shoot(float dt) +{ + if(!GameLayer::isDie && _target->alive()) + { + //get angle to player; + float angle = (getPosition()-_target->getPosition()).getAngle(); + auto bullet =BulletController::spawnBullet(kEnemyBullet, getPosition(), Vec2(cosf(angle)*-500, sinf(angle)*-500)); + //auto bullet =BulletController::spawnBullet(kEnemyBullet, getPosition(), Vec2(0,-500)); + bullet->setRotation(-CC_RADIANS_TO_DEGREES(angle)-90); + //log("aaaaaaa"); + } + else{ + //log("player is dead,hahahaha"); + } +} + + +bool FodderLeader::init() +{ + _score = 20; + _alive = true; + _Model = EffectSprite3D::createFromObjFileAndTexture("dijiyuanv001.c3b", "dijiyuanv001.png"); + if(_Model) + { + _Model->setScale(8); + addChild(_Model); + _Model->setRotation3D(Vec3(90,0,0)); + GameEntity::UseOutlineEffect(static_cast(_Model), 0.02, Color3B(255,0,0)); + _type = kEnemyFodderL; + _HP = 20; + _radius = 35; + return true; + } + return false; +} +void FodderLeader::reset() +{ + AirCraft::reset(); + _HP = 25; +} + + +bool BigDude::init() +{ + _score = 20; + _alive = true; + _turnRate = 50; + _Model = EffectSprite3D::createFromObjFileAndTexture("diji1_v002.c3b", "diji02_v002_128.png"); + if(_Model) + { + _Model->setScale(8); + addChild(_Model); + // _Model->setRotation3D(Vec3(90,0,0)); + //static_cast(_Model)->setOutline(0.2, Color3B::BLACK); + GameEntity::UseOutlineEffect(static_cast(_Model), 0.02, Color3B::BLACK); + _type = kEnemyBigDude; + _HP = 30; + _radius = 40; + + + return true; + } + return false; +} + +void BigDude::reset() +{ + AirCraft::reset(); + _HP = 30; + //_targetPos = nullptr; +} + +void BigDude::showFinished() +{ + //remove from show Vector, add to the enemy Vector + EnemyController::enemies.pushBack(this); + EnemyController::showCaseEnemies.eraseObject(this); + schedule(schedule_selector(BigDude::shoot),CCRANDOM_0_1()*2+1, 90, 0); +} +void BigDude::shoot(float dt) +{ + if(GameLayer::isDie) + { + unschedule(schedule_selector(BigDude::shoot)); + return; + } + //Point bulletVec = Vec2(getRotation()) + + Vec2 offset1 = getPosition(); + Vec2 offset2 = offset1; + float angle = CC_DEGREES_TO_RADIANS(-getRotation()+90); + float offsetRad = CC_DEGREES_TO_RADIANS(45); + offset1.x += cosf(angle+offsetRad)*-50; + offset1.y += sinf(angle+offsetRad)*-50; + offset2.x += cosf(angle-offsetRad)*-50; + offset2.y += sinf(angle-offsetRad)*-50; + //this->showMuzzle(); + auto bullet =BulletController::spawnBullet(kEnemyBullet, offset1, Vec2(cosf(angle)*-500, sinf(angle)*-500)); + bullet->setRotation(-CC_RADIANS_TO_DEGREES(angle)-90); + bullet =BulletController::spawnBullet(kEnemyBullet, offset2, Vec2(cosf(angle)*-500, sinf(angle)*-500)); + bullet->setRotation(-CC_RADIANS_TO_DEGREES(angle)-90); + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("boom.mp3"); +} + +void BigDude::update(float dt, Node* player) +{ + //find angle difference + float angleRad = (getPosition()-player->getPosition()).getAngle(); + float angleDeg = -CC_RADIANS_TO_DEGREES(angleRad)+180; + float curRot = getRotation(); + float angleDif = std::min(std::max((angleDeg-90) - curRot, -_turnRate*dt), _turnRate*dt); + + float f = curRot + angleDif; + setRotation(f); +} + +void BigDude::showMuzzle() +{ + muzzle1 = Sprite::create("muzzle.png"); + muzzle2 = Sprite::create("muzzle.png"); + muzzle1->setScale(0.4); + muzzle2->setScale(0.4); + + Vec2 offset1 = Vec2::ZERO; + Vec2 offset2 = offset1; + float angle = 90; + float offsetRad = CC_DEGREES_TO_RADIANS(45); + offset1.x += cosf(offsetRad+angle)*-50; + offset1.y += sinf(offsetRad+angle)*-50; + offset2.x += cosf(-offsetRad+angle)*-50; + offset2.y += sinf(-offsetRad+angle)*-50; + + muzzle1->setPosition(offset1); + muzzle2->setPosition(offset2); + muzzle1->setRotation(-35.0f); + muzzle2->setRotation(-35.0f); + this->addChild(muzzle1); + this->addChild(muzzle2); + this->scheduleOnce(schedule_selector(BigDude::dismissMuzzle), 0.1); +} + +void BigDude::dismissMuzzle(float dt) +{ + muzzle1->removeFromParent(); + muzzle2->removeFromParent(); +} + +void BigDude::die() +{ + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("boom2.mp3"); + this->_alive = false; + EnemyController::enemies.eraseObject(this); + EnemyController::showCaseEnemies.pushBack(this); + EffectManager::createExplosion(getPosition()); + Vec2 nowPoint = this->getPosition(); + log("now X: %f Y:%f \n",nowPoint.x,nowPoint.y); + Vec2 targetPos = Vec2(nowPoint.x,nowPoint.y-200); + log("now X: %f Y:%f \n",targetPos.x,targetPos.y); + unscheduleAllSelectors(); + this->runAction( + Sequence::create( + Spawn::create( + EaseSineOut::create(MoveTo::create(2, targetPos)), + EaseSineOut::create(ScaleTo::create(2,0.3)),//TODO: replace with move 3d when possible + //EaseBackOut::create(RotateBy::create(2,Vec3(CC_RADIANS_TO_DEGREES((nowPoint-targetPos).getAngle()),CC_RADIANS_TO_DEGREES((nowPoint-targetPos).getAngle())+45,-CC_RADIANS_TO_DEGREES((nowPoint-targetPos).getAngle())+90))), + RotateBy::create(2, Vec3(360+CCRANDOM_0_1()*600, 360+CCRANDOM_0_1()*600, 360+CCRANDOM_0_1()*600)), + nullptr + ), + CallFunc::create(CC_CALLBACK_0(BigDude::fall, this)), + nullptr + )); + + +} + +void BigDude::fall() +{ + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("explodeEffect.mp3"); + EffectManager::createBigExplosion(getPosition()); + auto helloworld = (HelloWorld*)Director::getInstance()->getRunningScene()->getChildByTag(100); + int score = helloworld->getScore(); + helloworld->setScore(score+=_score); + std::stringstream ss; + std::string str; + ss<>str; + const char *p = str.c_str(); + helloworld->getScoreLabel()->setString(p); + _alive = false; + auto scale = ScaleTo::create(0.1, 1.2); + auto scaleBack = ScaleTo::create(0.1, 1); + auto label = helloworld->getScoreLabel(); + label->runAction(Sequence::create(scale, scaleBack,NULL)); + this->removeFromParentAndCleanup(false); + EnemyController::_bigDudePool.pushBack(this); + EnemyController::showCaseEnemies.eraseObject(this); + reset(); +} + +bool Boss::init() +{ + _score = 666; + _alive = true; + _Model = EffectSprite3D::createFromObjFileAndTexture("boss.c3b", "boss.png"); + //auto cannon2 = Sprite3D::create("bossCannon.obj", "boos.png"); + if(_Model) + { + _Model->setScale(28); + addChild(_Model); + // _Model->setRotation3D(Vec3(90,0,0)); + GameEntity::UseOutlineEffect(static_cast(_Model), 0.02, Color3B::BLACK); + _type = kEnemyBoss; + _HP = 5000; + _radius = 150; + auto cannon1 = EffectSprite3D::createFromObjFileAndTexture("bossCannon.c3b", "boss.png"); + _Cannon1 = Node::create(); + addChild(_Cannon1); + _Cannon1->addChild(cannon1); + cannon1->setScale(28); + //cannon1->setRotation3D(Vec3(90,0,0)); + _Cannon1->setPosition3D(Vec3(40,-100, 10)); + GameEntity::UseOutlineEffect(static_cast(cannon1), 0.02, Color3B(0,0,0)); + auto cannon2 = EffectSprite3D::createFromObjFileAndTexture("bossCannon.c3b", "boss.png"); + _Cannon2 = Node::create(); + addChild(_Cannon2); + _Cannon2->addChild(cannon2); + cannon2->setScale(28); + //cannon2->setRotation3D(Vec3(90,0,0)); + _Cannon2->setPosition3D(Vec3(-40,-100, 10)); + GameEntity::UseOutlineEffect(static_cast(cannon2), 0.02, Color3B(0,0,0)); + //addChild(_Cannon2); + //_Cannon2->setPosition(-20,-200); + + _Cannon1->setRotation(-45); + _Cannon2->setRotation(45); + + enterTheBattle(); + return true; + } + return false; +} + +void Boss::enterTheBattle() +{ + setRotation3D(Vec3(100,0,0)); + setScale(0.2); + runAction( + Sequence::create( + Spawn::create( + EaseSineOut::create(MoveTo::create(4, Vec2(0,300))), + EaseSineOut::create(ScaleTo::create(4,1)),//TODO: replace with move 3d when possible + EaseBackOut::create(RotateBy::create(4+0.5,Vec3(-100,0,0))), + nullptr + ), CallFunc::create(std::bind(static_cast(&Boss::startShooting), this)), + CallFunc::create(CC_CALLBACK_0(Boss::_turns,this)), + nullptr + )); +} + +void Boss::_turns() +{ + runAction + ( + Sequence::create + ( + EaseSineInOut::create(MoveBy::create(2, Vec2(200,0))), + EaseSineInOut::create(MoveBy::create(4, Vec2(-400,0))), + EaseSineInOut::create(MoveBy::create(2, Vec2(200,0))), + nullptr) + ); + + runAction( + Sequence::create( + EaseQuadraticActionInOut::create(RotateBy::create(1,-20)), + EaseQuadraticActionInOut::create(RotateBy::create(2,40)), + DelayTime::create(2), + EaseQuadraticActionInOut::create(RotateBy::create(2,-40)), + EaseQuadraticActionInOut::create(RotateBy::create(1,20)), + DelayTime::create(2), + CallFunc::create(CC_CALLBACK_0(Boss::_next, this)), + nullptr + ) + ); +} + +void Boss::_next() +{ + int random = CCRANDOM_0_1()*2; + switch(random) + { + case 0: + _turns(); + break; + case 1: + _dash(); + break; + default: + _dash(); + break; + } +} + +void Boss::_dash() +{ + int neg = (CCRANDOM_0_1()>0.5)? -1: 1; + + auto array = PointArray::create(6); + + array->addControlPoint(Vec2(0,0)); + array->addControlPoint(Vec2(80*neg,-300)); + array->addControlPoint(Vec2(500*neg,-900)); + array->addControlPoint(Vec2(700*neg,-600)); + array->addControlPoint(Vec2(500*neg,400)); + array->addControlPoint(Vec2(0,0)); + + auto action = CardinalSplineBy::create(5.5, array,0); + runAction(Sequence::create( + DelayTime::create(0.5), + EaseSineOut::create(action) + ,nullptr) + ); + runAction( + Sequence::create( + EaseSineInOut::create(RotateBy::create(0.5, Vec3(0,30*neg,0))), + RotateBy::create(2.5, Vec3(-30,45*neg,-90*neg)), + RotateBy::create(1, Vec3(0,-35*neg,-200*neg)), + EaseSineInOut::create(RotateBy::create(1.5, Vec3(30,-40*neg,-70*neg))), + CallFunc::create(CC_CALLBACK_0(Boss::_next, this)), + nullptr) + ); +} + +void Boss::startShooting() +{ + log("startShooting"); + schedule(schedule_selector(Boss::shoot),0.15, 6, 0); + +} + +void Boss::startShooting(float dt) +{ + if(GameLayer::isDie) + { + unschedule(schedule_selector(Boss::startShooting)); + return; + } + log("startShooting fd"); + startShooting(); + +} + +void Boss::createRandomExplosion() +{ + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("explodeEffect.mp3"); + EffectManager::createBigExplosion(getPosition()+Vec2(CCRANDOM_MINUS1_1()*200, CCRANDOM_MINUS1_1()*200)); +} + +void Boss::dying() +{ + _alive = false; + EnemyController::showCaseEnemies.pushBack(this); + EnemyController::enemies.eraseObject(this); +} + +void Boss::dead() +{ + auto helloworld = (HelloWorld*)Director::getInstance()->getRunningScene()->getChildByTag(100); + int score = helloworld->getScore(); + helloworld->setScore(score+=_score); + std::stringstream ss; + std::string str; + ss<>str; + const char *p = str.c_str(); + helloworld->getScoreLabel()->setString(p); + auto scale = ScaleTo::create(0.1, 1.2); + auto scaleBack = ScaleTo::create(0.1, 1); + auto label =helloworld->getScoreLabel(); + label->runAction(Sequence::create(scale, scaleBack,NULL)); + EnemyController::showCaseEnemies.eraseObject(this); + removeFromParent(); + CocosDenshion::SimpleAudioEngine::getInstance()->stopBackgroundMusic(); + NotificationCenter::getInstance()->postNotification("ShowGameOver",NULL); + scheduleOnce(schedule_selector(Boss::_endGame), 1.5); +} + +void Boss::_endGame(float dt) +{ + NotificationCenter::getInstance()->postNotification("ShowGameOver",NULL); +} + +void Boss::die() +{ + //sequence to 10 random explosion + stopAllActions(); + Vector explosions; + for(int i = 0; i < 22; i++) + { + auto expl = CallFunc::create(CC_CALLBACK_0(Boss::createRandomExplosion,this)); + auto delay = DelayTime::create(i*0.15); + auto seq = Sequence::create(delay, expl, nullptr); + explosions.pushBack(seq); + } + auto giantExpl = Spawn::create(explosions); + Vector explosions2; + for(int i = 0; i < 15; i++) + { + auto expl = CallFunc::create(CC_CALLBACK_0(Boss::createRandomExplosion,this)); + explosions2.pushBack(expl); + } + auto giantExpl2 = Spawn::create(explosions2); + auto callDead = CallFunc::create(CC_CALLBACK_0(Boss::dead,this)); + auto final = Sequence::create(giantExpl, giantExpl2, callDead,nullptr); + runAction(final); + dying(); + +} + +Vec2 Boss::_getCannon1Position() +{ + Vec2 offset = getPosition(); + float angle = CC_DEGREES_TO_RADIANS(-getRotation()+90); + float offsetRad = CC_DEGREES_TO_RADIANS(28); + offset.x += cosf(angle+offsetRad)*-100; + offset.y += sinf(angle+offsetRad)*-100; + return offset; +} + +Vec2 Boss::_getCannon2Position() +{ + Vec2 offset = getPosition(); + float angle = CC_DEGREES_TO_RADIANS(-getRotation()+90); + float offsetRad = CC_DEGREES_TO_RADIANS(28); + offset.x += cosf(angle-offsetRad)*-100; + offset.y += sinf(angle-offsetRad)*-100; + return offset; +} + +Vec2 Boss::_getCannon1Vector() +{ + float angle = CC_DEGREES_TO_RADIANS(-_Cannon1->getRotation()+90-getRotation()); + return Vec2(cosf(angle)*-500, sinf(angle)*-500); +} + +Vec2 Boss::_getCannon2Vector() +{ + float angle = CC_DEGREES_TO_RADIANS(-_Cannon2->getRotation()+90-getRotation()); + return Vec2(cosf(angle)*-500, sinf(angle)*-500); +} + +void Boss::showMuzzle() +{ + muzzle1 = Sprite::create("muzzle.png"); + muzzle2 = Sprite::create("muzzle.png"); + muzzle1->setScale(0.4); + muzzle2->setScale(0.4); + muzzle1->setPosition(3,-30); + muzzle2->setPosition(3,-30); + muzzle1->setRotation(-35.0f); + muzzle2->setRotation(-35.0f); + _Cannon1->addChild(muzzle1); + _Cannon2->addChild(muzzle2); + this->scheduleOnce(schedule_selector(Boss::dismissMuzzle), 0.1); +} + +void Boss::dismissMuzzle(float dt){ + muzzle1->removeFromParent(); + muzzle2->removeFromParent(); +} + +void Boss::shoot(float dt) +{ + if (GameLayer::isDie) { + return; + } + auto bullet =BulletController::spawnBullet(kEnemyBullet, _getCannon1Position(), _getCannon1Vector()); + + showMuzzle(); + + bullet->setRotation(_Cannon1->getRotation()+180); + bullet =BulletController::spawnBullet(kEnemyBullet, _getCannon2Position(), _getCannon2Vector()); + bullet->setRotation(_Cannon2->getRotation()+180); + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("boom.mp3"); + schedule(schedule_selector(Boss::startShooting),1, 0, 3); +} +void Boss::update(float dt, Node* player) +{ + float angleRad = (_getCannon1Position()-player->getPosition()).getAngle(); + float angleDeg = -CC_RADIANS_TO_DEGREES(angleRad)+90; + _Cannon1->setRotation(angleDeg-getRotation()); + + + angleRad = (_getCannon2Position()-player->getPosition()).getAngle(); + angleDeg = -CC_RADIANS_TO_DEGREES(angleRad)+90; + _Cannon2->setRotation(angleDeg-getRotation()); + +} \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/Classes/Enemies.h b/samples/EarthWarrior3D-CSDK/Classes/Enemies.h new file mode 100755 index 0000000..8b08b33 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/Enemies.h @@ -0,0 +1,108 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__Fodder__ +#define __Moon3d__Fodder__ + +#include "cocos2d.h" +#include "AirCraft.h" +enum moveMode{ + kDefault, + kTurn +}; + +class Fodder : public AirCraft +{ +public: + CREATE_FUNC(Fodder); + bool init(); + virtual void reset(); + virtual void move(float y, float dt); + CC_SYNTHESIZE(int, _moveMode, MoveMode); + CC_PROPERTY(float, _turn, TurnRate); + virtual void shoot(float dt); + CC_SYNTHESIZE(AirCraft*, _target, Target); +}; + +class FodderLeader : public Fodder +{ +public: + CREATE_FUNC(FodderLeader); + bool init(); + virtual void reset(); +}; + +class BigDude : public AirCraft +{ +public: + CREATE_FUNC(BigDude); + bool init(); + virtual void reset(); + virtual void die(); + void update(float dt, Node* player); + void showFinished(); + void showMuzzle(); + void dismissMuzzle(float dt); + virtual void shoot(float dt); + void fall(); +protected: + Sprite* muzzle1; + Sprite* muzzle2; + Vec2 _targetPos; + float _turnRate; +}; + +class Boss : public Fodder +{ +public: + CREATE_FUNC(Boss); + bool init(); + virtual void die(); + virtual void shoot(float dt); + void update(float dt, Node* player); +protected: + void createRandomExplosion(); + void dying(); + void dead(); + void enterTheBattle(); + void startShooting(float dt); + void startShooting(); + void showMuzzle(); + void dismissMuzzle(float dt); + void _turns(); + void _endGame(float dt); + Vec2 _getCannon1Position(); + Vec2 _getCannon2Position(); + Vec2 _getCannon1Vector(); + Vec2 _getCannon2Vector(); + Node* _Cannon1; + Node* _Cannon2; + Sprite* muzzle1; + Sprite* muzzle2; + void _dash(); + void _next(); +}; + + +#endif /* defined(__Moon3d__Fodder__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/Explosion.cpp b/samples/EarthWarrior3D-CSDK/Classes/Explosion.cpp new file mode 100755 index 0000000..2d209dd --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/Explosion.cpp @@ -0,0 +1,147 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "Explosion.h" +#include "Effects.h" +#include "ParticleManager.h" + +USING_NS_CC; + +bool SmallExplosion::init(){ + + auto part1_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonSmoke.png"); + ValueMap vm1=ParticleManager::getInstance()->GetPlistData("toonSmoke"); + part1 = ParticleSystemQuad::create(vm1); + //part1->setDisplayFrame(part1_frame); + part1->setTextureWithRect(part1_frame->getTexture(), part1_frame->getRect()); + this->addChild(part1); + auto part2_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonFlare.png"); + ValueMap vm2=ParticleManager::getInstance()->GetPlistData("flare"); + part2 = ParticleSystemQuad::create(vm2); + //part2->setDisplayFrame(part2_frame); + part2->setTextureWithRect(part2_frame->getTexture(), part2_frame->getRect()); + this->addChild(part2); + part1->setTotalParticles(10); + part1->setEmissionRate(9999999999); + part2->setTotalParticles(3); + part2->setEmissionRate(9999999999); + part1->setRotation3D(Vec3(30,0,0)); + part2->setRotation3D(Vec3(30,0,0)); + return true; +} + +void SmallExplosion::createExplosion(Node* _effectLayer, Vec2 pos){ + + part1->setTotalParticles(8); + part1->setEmissionRate(9999999999); + part1->setScale(0.7); + part2->setTotalParticles(5); + part2->setEmissionRate(9999999999); + _effectLayer->addChild(this,7); + part1->setRotation3D(Vec3(30,0,0)); + part2->setRotation3D(Vec3(30,0,0)); + this->setPosition(pos); + this->scheduleOnce(schedule_selector(SmallExplosion::recycle), 1.5); +} + +void SmallExplosion::recycle(float dt){ + this->removeFromParentAndCleanup(false); + EffectManager::_smallExplPool.pushBack(this); +} + +bool BigExplosion::init(){ + auto part1_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonSmoke.png"); + ValueMap vm1=ParticleManager::getInstance()->GetPlistData("toonSmoke"); + part1 = ParticleSystemQuad::create(vm1); + //part1->setDisplayFrame(part1_frame); + part1->setTextureWithRect(part1_frame->getTexture(), part1_frame->getRect()); + this->addChild(part1); + auto part2_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonGlow.png"); + ValueMap vm2=ParticleManager::getInstance()->GetPlistData("glow"); + part2 = ParticleSystemQuad::create(vm2); + //part2->setDisplayFrame(part2_frame); + part2->setTextureWithRect(part2_frame->getTexture(), part2_frame->getRect()); + this->addChild(part2); + auto part3_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonFlare2.png"); + ValueMap vm3=ParticleManager::getInstance()->GetPlistData("debris"); + part3 = ParticleSystemQuad::create(vm3); + //part3->setDisplayFrame(part3_frame); + part3->setTextureWithRect(part3_frame->getTexture(), part3_frame->getRect()); + this->addChild(part3); + part1->setTotalParticles(10); + part1->setEmissionRate(9999999999); + part2->setTotalParticles(3); + part2->setEmissionRate(9999999999); + part3->setTotalParticles(20); + part3->setEmissionRate(9999999999); + part3->setScale(1.5); + part1->setRotation3D(Vec3(30,0,0)); + part2->setRotation3D(Vec3(30,0,0)); + part3->setRotation3D(Vec3(30,0,0)); + return true; +} + +void BigExplosion::createExplosion(Node *_effectLayer, Vec2 pos){ + + _effectLayer->addChild(this,6); + part1->resetSystem(); + part2->resetSystem(); + part3->resetSystem(); + setPosition(pos); + + this->scheduleOnce(schedule_selector(BigExplosion::recycle), 1.2); +} + +void BigExplosion::recycle(float dt){ + this->removeFromParentAndCleanup(false); + EffectManager::_bigExplPool.pushBack(this); +} + +bool BulletExplosion::init(){ + + auto texture = Director::getInstance()->getTextureCache()->addImage("player_bullet_explosion.png"); + Sprite::initWithTexture(texture); + setTextureRect(Rect(0,0,26,17)); + //this -> setTexture(texture); + return true; +} + +void BulletExplosion::showExplosion(Vec2 point){ + auto animation = AnimationCache::getInstance()->getAnimation("bullet_expl"); + auto animate = Animate::create(animation); + this->runAction(Sequence::create(animate, + CallFuncN::create(CC_CALLBACK_1(BulletExplosion::explosionFinished,this)), NULL)); + this->setScale(0.5); + this->runAction(ScaleBy::create(0.4, 2)); + this->runAction(FadeOut::create(0.4)); + this->setPosition(point); + this->setRotation3D(Vec3(30,0,0)); + this->setBlendFunc(BlendFunc::ADDITIVE); + Director::getInstance()->getRunningScene()->getChildByTag(100)->getChildByTag(123)->addChild(this,3); +} + +void BulletExplosion::explosionFinished(Ref* obj){ + auto expl=static_cast(obj); + expl->removeFromParentAndCleanup(false); +} diff --git a/samples/EarthWarrior3D-CSDK/Classes/Explosion.h b/samples/EarthWarrior3D-CSDK/Classes/Explosion.h new file mode 100755 index 0000000..f36a62f --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/Explosion.h @@ -0,0 +1,68 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__Explosion__ +#define __Moon3d__Explosion__ + +#include "cocos2d.h" + +class SmallExplosion : public cocos2d::Node{ + +public: + CREATE_FUNC(SmallExplosion); + bool init(); + void createExplosion(Node* _effectLayer, cocos2d::Vec2 pos); + +private: + void recycle(float dt); + cocos2d::ParticleSystemQuad* part1; + cocos2d::ParticleSystemQuad* part2; + +}; + +class BigExplosion : public cocos2d::Node{ + +public: + CREATE_FUNC(BigExplosion); + bool init(); + void createExplosion(Node* _effectLayer,cocos2d::Vec2 pos); + cocos2d::ParticleSystemQuad* part1; + cocos2d::ParticleSystemQuad* part2; + cocos2d::ParticleSystemQuad* part3; +private: + void recycle(float dt); + +}; + +class BulletExplosion : public cocos2d::Sprite +{ +public: + CREATE_FUNC(BulletExplosion); + bool init(); + void showExplosion(cocos2d::Vec2 point); + void explosionFinished(Ref* obj); +}; + + +#endif /* defined(__Moon3d__Explosion__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/FriendControlScene.cpp b/samples/EarthWarrior3D-CSDK/Classes/FriendControlScene.cpp new file mode 100755 index 0000000..65064d1 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/FriendControlScene.cpp @@ -0,0 +1,167 @@ +#include "MainMenuScene.h" +#include "FriendControlScene.h" +#include "CCFPlayer.h" +#include "ParticleManager.h" +#include "ConnectionInterface.h" +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +#include "platform/android/jni/JniHelper.h" +#endif + +USING_NS_CC; + +Scene* FriendControl::createScene() +{ + // 'scene' is an autorelease object + auto scene = Scene::create(); + + // 'layer' is an autorelease object + auto layer = FriendControl::create(); + + // add layer as a child to scene + scene->addChild(layer); + + layer->setTag(1002); + + // return the scene + return scene; +} + +// on "init" you need to initialize your instance +bool FriendControl::init() +{ + ////////////////////////////// + // 1. super init first + if ( !Layer::init() ) + { + return false; + } + + visibleSize = Director::getInstance()->getVisibleSize(); + Point origin = Director::getInstance()->getVisibleOrigin(); + + auto closeItem = MenuItemImage::create( + "CloseNormal.png", + "CloseSelected.png", + CC_CALLBACK_1(FriendControl::menuCloseCallback, this)); + + closeItem->setPosition(Point(origin.x + visibleSize.width - closeItem->getContentSize().width/2 , + origin.y + closeItem->getContentSize().height/2)); + + // create menu, it's an autorelease object + auto menu = Menu::create(/*leftItem, rightItem, addItem, */closeItem, NULL); + menu->setPosition(Point::ZERO); + this->addChild(menu, 1); + + ///////////////////////////// + // 3. add your codes below... + + // add a label shows "Hello World" + // create and initialize a label + + auto label = LabelTTF::create("Move the plane and see what happen in another screen", "Arial", 24); + + // position the label on the center of the screen + label->setPosition(Point(origin.x + visibleSize.width/2, + origin.y + visibleSize.height - label->getContentSize().height)); + + // add the label as a child to this layer + this->addChild(label, 1); + + auto listener = EventListenerTouchOneByOne::create(); + listener->setSwallowTouches(true); + + listener->onTouchBegan = CC_CALLBACK_2(FriendControl::onTouchBegan, this); + listener->onTouchMoved = CC_CALLBACK_2(FriendControl::onTouchMoved, this); + listener->onTouchEnded = CC_CALLBACK_2(FriendControl::onTouchEnded, this); + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + + ParticleManager::getInstance()->AddPlistData("engine.plist", "engine"); + + _friendPlayer = CCFPlayer::create(); + if(_friendPlayer) + { + addChild(_friendPlayer); + + _friendPlayer->setPosition(Vec2(visibleSize.width/2 + origin.x, -100)); + _friendPlayer->runAction(Sequence::create( + DelayTime::create(0.75), + Spawn::create( + EaseBackOut::create(MoveTo::create(1.7,Vec2(visibleSize.width/2,visibleSize.height/3))), + EaseSineOut::create(RotateBy::create(1.7,Vec3(0,720,0))), + nullptr + ), + CallFunc::create(CC_CALLBACK_0(FriendControl::schedulePlayer,this)),nullptr)); + + } + + auto peerDisconnectListener = EventListenerCustom::create("IntelCCFDisconnect", CC_CALLBACK_1(FriendControl::listenToDisconnect, this)); + Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(peerDisconnectListener, this); + + return true; +} + +void FriendControl::menuCloseCallback(Ref* pSender) +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, CCF_ACTIVITY_CLASSNAME, "remoteDisconnectJni", "()V")) { + + t.env->CallStaticVoidMethod(t.classID, t.methodID); + t.env->DeleteLocalRef(t.classID); + } +#endif + + Director::getInstance()->replaceScene(MainMenuScene::createScene()); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + exit(0); +#endif +} + +void FriendControl::schedulePlayer() +{ + _friendPlayer->scheduleUpdate(); +} + +void FriendControl::listenToDisconnect(cocos2d::EventCustom *event) +{ + this->schedule(schedule_selector(FriendControl::scheduleReturnMainMenu),0.1,0,0); +} + +void FriendControl::scheduleReturnMainMenu(float dt) +{ + Director::getInstance()->replaceScene(MainMenuScene::createScene()); +} + +bool FriendControl::onTouchBegan(Touch *touch, Event *event) +{ + return true; +} + +long g_serialNo = 1; +void FriendControl::onTouchMoved(Touch *touch, Event *event) +{ + Point prev = _friendPlayer->getPosition(); + Point delta =touch->getDelta(); + _friendPlayer->setPosition(prev + delta); + + prev = prev - Point(visibleSize.width/2, visibleSize.height/2); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + JniMethodInfo t; + + std::string strMessage = StringUtils::format("{\"serialNo\":%ld, \"type\":4, \"prevX\":%.2f, \"prevY\":%.2f, \"deltaX\":%.2f, \"deltaY\":%.2f}", g_serialNo++, prev.x, prev.y, delta.x, delta.y); + if (JniHelper::getStaticMethodInfo(t, CCF_ACTIVITY_CLASSNAME, "friendControl", "(Ljava/lang/String;)V")) { + jstring stringArg1 = t.env->NewStringUTF(strMessage.c_str()); + CCLOG("Doc. %s", strMessage.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, stringArg1); + t.env->DeleteLocalRef(t.classID); + t.env->DeleteLocalRef(stringArg1); + } +#endif +} + +void FriendControl::onTouchEnded(Touch *touch, Event *event) +{ +} diff --git a/samples/EarthWarrior3D-CSDK/Classes/FriendControlScene.h b/samples/EarthWarrior3D-CSDK/Classes/FriendControlScene.h new file mode 100755 index 0000000..39a3a05 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/FriendControlScene.h @@ -0,0 +1,39 @@ +#ifndef __FriendControl_SCENE_H__ +#define __FriendControl_SCENE_H__ + +#include "cocos2d.h" + +class CCFPlayer; +class FriendControl : public cocos2d::Layer +{ +public: + // there's no 'id' in cpp, so we recommend returning the class instance pointer + static cocos2d::Scene* createScene(); + + // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone + virtual bool init(); + + virtual bool onTouchBegan(Touch *touch, Event *event); + virtual void onTouchMoved(Touch *touch, Event *event); + virtual void onTouchEnded(Touch *touch, Event *event); + +protected: + + // a selector callback + void menuCloseCallback(cocos2d::Ref* pSender); + + void schedulePlayer(); + + void scheduleReturnMainMenu(float dt); + + void listenToDisconnect(cocos2d::EventCustom *event); + + // implement the "static create()" method manually + CREATE_FUNC(FriendControl); + + CCFPlayer *_friendPlayer; + + Size visibleSize; +}; + +#endif // __FriendControl_SCENE_H__ diff --git a/samples/EarthWarrior3D-CSDK/Classes/GameControllers.cpp b/samples/EarthWarrior3D-CSDK/Classes/GameControllers.cpp new file mode 100755 index 0000000..e40199c --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/GameControllers.cpp @@ -0,0 +1,370 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "GameControllers.h" +#include "GameEntity.h" +#include "Bullets.h" +#include "consts.h" +#include "AirCraft.h" +#include "Effects.h" +#include "SimpleAudioEngine.h" +#include "Enemies.h" +#include "Player.h" +#include "HelloWorldScene.h" +Node* BulletController::_bulletLayer = nullptr; +bool BulletController::_inited = false; +Vector BulletController::bullets; +Vector BulletController::_missilePool; + + +void BulletController::reset(){ + _inited = false; + _bulletLayer = nullptr; + bullets.clear(); +} +bool BulletController::init(Node *bulletLayer){ + if(bulletLayer) + { + reset(); + _bulletLayer = bulletLayer; + _inited = false; + return true; + } + return false; +} +Bullet* BulletController::spawnBullet(int type, Vec2 pos, Vec2 vec) +{ + Bullet *bullet = nullptr; + switch(type) + { + case kPlayerBullet: + bullet = PlayerBullet::create(); + //bullet->retain(); + //bullet->setType(kPlayerBullet); + break; + case kPlayerMissiles: + if(!_missilePool.empty()) + { + // if the pool is not empty, we don't need to create, just return that, and reset its data + bullet = _missilePool.back(); + //bullet->retain(); + _missilePool.popBack(); + + //bullet->reset(); + } + else + { + bullet = Missile::create(); + bullet->retain(); + } + //bullet->setType + break; + case kEnemyBullet: + bullet = Bullet::create(); + bullet->setType(kEnemyBullet); + break; + } + if(bullet) + { + bullets.pushBack(bullet); + _bulletLayer->addChild(bullet,1); + //bullet->release(); + bullet->setPosition(pos); + bullet->setVector(vec); + return bullet; + } + return nullptr; +} +void BulletController::erase(Bullet* b) +{ + if(b->getType() == kPlayerMissiles) + { + _missilePool.pushBack(static_cast(b)); + bullets.eraseObject(b); + b->removeFromParentAndCleanup(false); + b->reset(); + } + else + { + b->removeFromParentAndCleanup(true); + bullets.eraseObject(b); + } +} +void BulletController::erase(int i) +{ + auto b = bullets.at(i); + if(b->getType() == kPlayerMissiles) + { + _missilePool.pushBack(static_cast(b)); + bullets.erase(i); + b->removeFromParentAndCleanup(false); + b->reset(); + } + else + { + bullets.erase(i); + b->removeFromParentAndCleanup(true); + } +} + + +Node* EnemyController::_enemyLayer = nullptr; +bool EnemyController::_inited = false; +Vector EnemyController::enemies; +Vector EnemyController::showCaseEnemies; +Vector EnemyController::_fodderPool; +Vector EnemyController::_fodderLPool; +Vector EnemyController::_bigDudePool; +Vector EnemyController::_bossPool; + +const float EnemyController::EnemyMoveDist = -400; + +bool EnemyController::init(Node* enemyLayer) +{ + _enemyLayer = enemyLayer; + _inited = true; + return true; +} + +void EnemyController::reset() +{ + _inited = false; + _enemyLayer = nullptr; + enemies.clear(); +} +AirCraft* EnemyController::createOrGet(int type) +{ + AirCraft *enemy = nullptr; + switch(type) + { + case kEnemyFodder: + if(!_fodderPool.empty()) + { + enemy = _fodderPool.back(); + _fodderPool.popBack(); + } + else + { + enemy = Fodder::create(); + enemy->retain(); + } + break; + case kEnemyFodderL: + if(!_fodderLPool.empty()) + { + enemy = _fodderLPool.back(); + _fodderLPool.popBack(); + } + else + { + enemy = FodderLeader::create(); + enemy->retain(); + } + break; + case kEnemyBigDude: + if(!_bigDudePool.empty()) + { + enemy = _bigDudePool.back(); + _bigDudePool.popBack(); + } + else + { + enemy = BigDude::create(); + enemy->retain(); + } + break; + case kEnemyBoss: + if(!_bossPool.empty()) + { + enemy = _bossPool.back(); + _bossPool.popBack(); + } + else + { + enemy = Boss::create(); + enemy->retain(); + } + break; + } + return enemy; +} + +AirCraft* EnemyController::spawnEnemy(int type) +{ + CC_ASSERT(_enemyLayer); + AirCraft *enemy = createOrGet(type); + if(enemy) + { + enemies.pushBack(enemy); + _enemyLayer->addChild(enemy); + return enemy; + } + return nullptr; +} +AirCraft* EnemyController::showCaseEnemy(int type) +{ + CC_ASSERT(_enemyLayer); + AirCraft *enemy = createOrGet(type); + if(enemy) + { + showCaseEnemies.pushBack(enemy); + _enemyLayer->addChild(enemy); + return enemy; + } + return nullptr; +} +void EnemyController::erase(int i) +{ + auto e = enemies.at(i); + int type = e->getType(); + switch(type) + { + case kEnemyFodder: + _fodderPool.pushBack(static_cast(e)); + break; + case kEnemyFodderL: + _fodderLPool.pushBack(static_cast(e)); + break; + case kEnemyBigDude: + _bigDudePool.pushBack(static_cast(e)); + break; + case kEnemyBoss: + _bossPool.pushBack(static_cast(e)); + break; + } + enemies.erase(i); + e->removeFromParentAndCleanup(false); + e->reset(); +} + + +void GameController::update(float dt, AirCraft* player) +{ + if(player == NULL) return; + + Vec2 temp; + Bullet* b; + auto list =BulletController::bullets; + float enemyMoveDist =EnemyController::EnemyMoveDist*dt; + for(int i = BulletController::bullets.size()-1; i >= 0; i-- ) + { + b =BulletController::bullets.at(i); + temp =b->getPosition(); + if(BOUND_RECT.containsPoint(temp)) + { + if(b->getOwner() == kPlayer) + { + //********* Enemy Loop ********** + for(int j = EnemyController::enemies.size()-1; j >= 0; j--) + { + auto e = EnemyController::enemies.at(j); + if(b->getPosition().getDistance(e->getPosition()) <(b->getRadius() + e->getRadius())) + { + //collision happened + bool dead = e->hurt(b->getDamage()); + if(!dead) + { + switch(b->getType()) + { + case kPlayerMissiles: + EffectManager::createExplosion(b->getPosition()); + + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("boom2.mp3"); + break; + default: + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("hit.mp3"); + break; + } + } + BulletController::erase(i); + } + + } + //*********** Enemy Loop *************** + if(b->getType() == kPlayerMissiles) + { + b->update(dt); + } + else{ + b->setPosition(temp+(b->getVector()*dt)); + } + } + // loop all enemy bullets against player + else if(b->getPosition().getDistance(player->getPosition()) < b->getRadius()+player->getRadius()) + { + player->hurt(b->getDamage()); + BulletController::erase(i); + EffectManager::createExplosion(player->getPosition()); + break; + } + else // nothing happens to the bullet, move along.. + { + + b->setPosition(temp+(b->getVector()*dt)); + } + } + else + { + BulletController::erase(i); + } + } + // Enemies update + for(int k = EnemyController::enemies.size()-1; k>=0; k--) + { + auto enemy =EnemyController::enemies.at(k); + if(!enemy->alive()) + { + EnemyController::erase(k); + //enemy->reset(); + //break; + } + switch(enemy->getType()) + { + case kEnemyBigDude: + static_cast(enemy)->update(dt, player); + break; + case kEnemyBoss: + static_cast(enemy)->update(dt, player); + break; + default: + enemy->move(enemyMoveDist, dt); + break; + } + if(!ENEMY_BOUND_RECT.containsPoint(enemy->getPosition()) && enemy->getType() != kEnemyBoss) + { + //enemy went out side, kill it + EnemyController::erase(k); + } + //if colliding with player + else if(enemy->getPosition().getDistance(player->getPosition()) <(enemy->getRadius() + player->getRadius())) + { + player->hurt(50); + enemy->hurt(50); + if(enemy->getType() != kEnemyBoss && enemy->getType() != kEnemyBigDude) + EnemyController::erase(k); + } + //TODO: if enemy collide with player + //if(enemy->getPosition().getDistance(<#const cocos2d::Point &other#>)) + } +} diff --git a/samples/EarthWarrior3D-CSDK/Classes/GameControllers.h b/samples/EarthWarrior3D-CSDK/Classes/GameControllers.h new file mode 100755 index 0000000..2cfa654 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/GameControllers.h @@ -0,0 +1,91 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__BulletController__ +#define __Moon3d__BulletController__ + +#include "cocos2d.h" +USING_NS_CC; +class Bullet; +class AirCraft; +class Missile; +class Fodder; +class FodderLeader; +class BigDude; +class Player; +class Boss; +class BulletController +{ +public: + static void reset(); + static bool init(Node *bulletLayer); + static Bullet* spawnBullet(int type, Vec2 pos, Vec2 vec); + //static void update(float dt); + static Vector bullets; + static void erase(Bullet* b); //returns the bullet to the pool + static void erase(int i); + + static Vector _missilePool; + +protected: + //static BulletController *s_instance; + static bool _inited; + static Node *_bulletLayer; +}; + +class EnemyController +{ +public: + static void reset(); + static bool init(Node *enemyLayer); + static AirCraft* spawnEnemy(int type); + static AirCraft* createOrGet(int type); + static AirCraft* showCaseEnemy(int type); + static void update(float dt); + static Vector enemies; + static void erase(int i); + static Vector showCaseEnemies; + + static const float EnemyMoveDist; + + + //all kinds of enemies container + static Vector _fodderPool; + static Vector _fodderLPool; + static Vector _bigDudePool; + static Vector _bossPool; + +protected: + static bool _inited; + static Node *_enemyLayer; + +}; + +class GameController +{ +public: + static void update(float dt, AirCraft* player); +}; + +#endif /* defined(__Moon3d__BulletController__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/GameEntity.cpp b/samples/EarthWarrior3D-CSDK/Classes/GameEntity.cpp new file mode 100755 index 0000000..ea806ad --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/GameEntity.cpp @@ -0,0 +1,83 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "GameEntity.h" +#include "Sprite3DEffect.h" + +USING_NS_CC_MATH; + +Node *GameEntity::getModel(){ + return _Model; +} + +Vec3 GameEntity::getOrientation(){ + return _orientation; +} + +void GameEntity::forward(float dist){ + float f = getRotation(); + setPosition(getPosition() + +Vec2( + sinf(CC_DEGREES_TO_RADIANS(f))*dist, + cosf(CC_DEGREES_TO_RADIANS(f))*dist) + ); +} +void GameEntity::forward(float dist, float angle) +{ + setRotation(getRotation()-angle); + forward(dist); +} + +void GameEntity::UseOutlineEffect(Sprite3D* sprite, float width, Color3B color) +{ + if(nullptr == sprite) + CCLOGERROR("Can not apply outline effect to a null Sprite3D"); + EffectSprite3D* _effectSprite3D = dynamic_cast(sprite); + if(_effectSprite3D) + { + Effect3DOutline* effect(nullptr); + for (ssize_t index = 0; index < _effectSprite3D->getEffectCount(); ++index) + { + effect = dynamic_cast(_effectSprite3D->getEffect(index)); + if(nullptr != effect) break; + } + if(effect) + { + effect->setOutlineColor(Vec3(color.r/255.0f, color.g/255.0f, color.b/255.0f)); + effect->setOutlineWidth(width); + } + else + { + effect = Effect3DOutline::create(); + effect->setOutlineColor(Vec3(color.r/255.0f, color.g/255.0f, color.b/255.0f)); + effect->setOutlineWidth(width); + _effectSprite3D->addEffect(effect, 1); + } + + } +// Sprite3DOutlineEffect* effect = Sprite3DOutlineEffect::create(); +// sprite->setEffect(effect); +// effect->setOutlineColor(Vec3(color.r/255.0f, color.g/255.0f, color.b/255.0f)); +// effect->setOutlineWidth(width); +} \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/Classes/GameEntity.h b/samples/EarthWarrior3D-CSDK/Classes/GameEntity.h new file mode 100755 index 0000000..7b55e9b --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/GameEntity.h @@ -0,0 +1,55 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__GameEntity__ +#define __Moon3d__GameEntity__ + +#include "cocos2d.h" + +USING_NS_CC; + +class GameEntity : public Node +{ +public: + CREATE_FUNC(GameEntity); + Node *getModel(); + void remove(); + Vec3 getOrientation(); + void setType(int type){_type = type;}; + int getType(){return _type;}; + float getRadius(){return _radius;}; + void forward(float dist); + void forward(float dist, float angle); +public: + static void UseOutlineEffect(Sprite3D* sprite, float width, Color3B color); +protected: + Node *_Model; + float _radius; + Vec3 _orientation; + int _type; + +}; + + +#endif /* defined(__Moon3d__GameEntity__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/GameLayer.cpp b/samples/EarthWarrior3D-CSDK/Classes/GameLayer.cpp new file mode 100755 index 0000000..ccb0e2e --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/GameLayer.cpp @@ -0,0 +1,368 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "GameLayer.h" +#include "Player.h" +#include "Enemies.h" +#include "PublicApi.h" +#include "GameControllers.h" +#include "consts.h" +#include "Bullets.h" +//#include "EnemyManager.h" +#include "Effects.h" +#include "GameEntity.h" +#include "SimpleAudioEngine.h" +#include "Effects.h" +#include "ParticleManager.h" +#include "CCFPlayer.h" +#include "json/document.h" +#include "ConnectionInterface.h" +#include "MainMenuScene.h" + +USING_NS_CC; +using namespace std; + +bool GameLayer::isDie=false; + +bool GameLayer::init() +{ + //************** animation cache ****************** +// auto animation = Animation::create(); +// animation->setDelayPerUnit(0.1); +// auto texture = Director::getInstance()->getTextureCache()->addImage("player_bullet_explosion.png"); +// animation->addSpriteFrameWithTexture(texture, Rect(0,0,26,17)); +// animation->addSpriteFrameWithTexture(texture, Rect(0,18,26,22)); +// animation->addSpriteFrameWithTexture(texture, Rect(0,40,26,20)); +// animation->addSpriteFrameWithTexture(texture, Rect(0,61,26,23)); +// +// animation->retain(); +// AnimationCache::getInstance()->addAnimation(animation,"bullet_expl"); + + xScroll = 0.0f; + speed = -60.0f; + _elapsed = 20; //testing purpose, this was set to near boss timer + _bossOut = false; + + _spr = Sprite::create("groundLevel.jpg"); + addChild(_spr, -5); + Texture2D::TexParams texRepeat = {GL_LINEAR, GL_LINEAR, GL_CLAMP_TO_EDGE, GL_REPEAT}; + _spr->getTexture()->setTexParameters(texRepeat); + setRotation3D(Vec3(-30.0,0.0f,0.0f)); + _spr->setScale(1.4); + _spr->setPosition(0.0f,400.0f); + + _player = Player::create(); + + _streak = MotionStreak::create(0.4, 1, 15, Color3B(82,255,253), "streak.png"); + _streak ->setBlendFunc(BlendFunc::ADDITIVE); + _player->setTrail(_streak); + addChild(_streak,3); + auto emission_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("engine.jpg"); + ValueMap vm_emission=ParticleManager::getInstance()->GetPlistData("emissionPart"); + _emissionPart = ParticleSystemQuad::create(vm_emission); + //_emissionPart->setDisplayFrame(emission_frame); + _emissionPart->setTextureWithRect(emission_frame->getTexture(), emission_frame->getRect()); + _player->setEmissionPart(_emissionPart); + addChild(_emissionPart,4); + _emissionPart->setPositionType(tPositionType::FREE); + addChild(_player,5); + EffectManager::setLayer(this); + + this->schedule(schedule_selector(GameLayer::gameMaster) , 1.5, -1, 2.0); + + BulletController::init(this); + EnemyController::init(this); + scheduleUpdate(); + + + _player->setPosition(Vec2(0,-1000)); + _player->runAction(Sequence::create( + DelayTime::create(0.75), + Spawn::create( + EaseBackOut::create(MoveTo::create(1.7,Vec2(0,-200))), + EaseSineOut::create(RotateBy::create(1.7,Vec3(0,720,0))), + nullptr + ), + CallFunc::create(CC_CALLBACK_0(GameLayer::schedulePlayer,this)),nullptr)); + + if(ConnectionInterface::IsPlayGame()) + { + _friendPlayer = CCFPlayer::create(); + MotionStreak *_streak1 = MotionStreak::create(0.4, 1, 15, Color3B(82,255,253), "streak.png"); + _friendPlayer->setTrail(_streak1); + addChild(_streak1,3); + + auto emission_frame1=SpriteFrameCache::getInstance()->getSpriteFrameByName("engine.jpg"); + ValueMap vm_emission1=ParticleManager::getInstance()->GetPlistData("emissionPart"); + ParticleSystemQuad *_emissionPart1 = ParticleSystemQuad::create(vm_emission1); + + _friendPlayer->setEmissionPart(_emissionPart1); + addChild(_emissionPart1,4); + _emissionPart1->setPositionType(tPositionType::FREE); + addChild(_friendPlayer,999); + + _friendPlayer->setPosition(Point(0,-1000)); + _friendPlayer->runAction(Sequence::create( + DelayTime::create(0.75), + Spawn::create( + EaseBackOut::create(MoveTo::create(1.7,Point(0,-200))), + EaseSineOut::create(RotateBy::create(1.7,Vertex3F(0,720,0))), + nullptr + ), + CallFunc::create(CC_CALLBACK_0(GameLayer::scheduleFriendPlayer,this)),nullptr)); + + auto peerListener1 = EventListenerCustom::create("IntelCCFReceiveMessage", CC_CALLBACK_1(GameLayer::listenToReceiveMessage, this)); + Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(peerListener1, this); + + auto peerListener2 = EventListenerCustom::create("IntelCCFDisconnect", CC_CALLBACK_1(GameLayer::listenToDisconnect, this)); + Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(peerListener2, this); + } + else + { + _friendPlayer = NULL; + } + + return true; +} + +void GameLayer::schedulePlayer() +{ + _player->scheduleUpdate(); +} + +void GameLayer::scheduleFriendPlayer() +{ + if(_friendPlayer == NULL) return; + + _friendPlayer->scheduleUpdate(); +} + +void GameLayer::gameMaster(float dt) +{ + if(isDie) + { + return; + } + _elapsed+=dt; + int enemyCount =EnemyController::enemies.size(); + //if(_elapsed < 10 && enemyCount < 5) + if(enemyCount < 5 &&_elapsed < 60) + { + Vec2 random = Vec2(100*CCRANDOM_MINUS1_1(), BOUND_RECT.size.height/2+200); + for(int i=0; i < 4; i++) + { + auto enemy1 = EnemyController::spawnEnemy(kEnemyFodder); + enemy1->setPosition(random + Vec2(60,60)*(i+1)); + static_cast(enemy1)->setMoveMode(moveMode::kDefault); + auto enemy2 = EnemyController::spawnEnemy(kEnemyFodder); + enemy2->setPosition(random + Vec2(-60,60)*(i+1)); + static_cast(enemy2)->setMoveMode(moveMode::kDefault); + enemy1->setRotation3D(Vec3::ZERO); + enemy2->setRotation3D(Vec3::ZERO); + } + auto leader = EnemyController::spawnEnemy(kEnemyFodderL); + leader->setPosition(random); + leader->setRotation3D(Vec3::ZERO); + static_cast(leader)->setTarget(_player); + static_cast(leader)->setMoveMode(moveMode::kDefault); + } + //else if(_elapsed < 20 && enemyCount <5) + if(_elapsed > 4 && enemyCount <4 &&_elapsed < 60) + { + Vec2 random = Vec2(-400, BOUND_RECT.size.height/4*CCRANDOM_MINUS1_1()+350); + for(int i=0; i < 3; i++) + { + float randomAngle = CCRANDOM_MINUS1_1()*70; + auto enemy = EnemyController::spawnEnemy(kEnemyFodder); + enemy->setPosition(random + Vec2(60,60)*(i+1)); + static_cast(enemy)->setTurnRate(randomAngle*0.5); + enemy->setRotation(-randomAngle-90); + auto enemy2 = EnemyController::spawnEnemy(kEnemyFodder); + enemy2->setPosition(random + Vec2(-60,60)*(i+1)); + static_cast(enemy2)->setTurnRate(randomAngle*0.5); + enemy2->setRotation(-randomAngle-90); + } + auto leader = EnemyController::spawnEnemy(kEnemyFodderL); + leader->setPosition(random); + static_cast(leader)->setTurnRate(45); + leader->setRotation(-45); + //enemy->runAction(EaseBackOut::create(MoveTo::create(2, _player->getPosition()))); + static_cast(leader)->setTarget(_player); + leader->schedule(schedule_selector(FodderLeader::shoot),CCRANDOM_0_1()*1+1,90,0); + + } + if(_elapsed > 10 && enemyCount < 4 &&_elapsed < 60 ) + { + for(int q = 0; q< 2; q++) + { + //random if its from the top, left, or bottom + int direction = CCRANDOM_0_1()*4; + float rX, rY; + switch(direction) + { + case 0://top + rY = BOUND_RECT.size.height/2+200; + rX = ENEMY_BOUND_RECT.size.width*CCRANDOM_0_1(); + break; + case 1://bottom + rY = -200; + rX = ENEMY_BOUND_RECT.size.width*CCRANDOM_0_1(); + break; + case 2://left + rY = ENEMY_BOUND_RECT.size.height*CCRANDOM_0_1(); + rX = ENEMY_BOUND_RECT.origin.x; + break; + case 3://right + rY = ENEMY_BOUND_RECT.size.height*CCRANDOM_0_1(); + rX = ENEMY_BOUND_RECT.size.width; + break; + } + auto enemy = EnemyController::showCaseEnemy(kEnemyBigDude); + //enemy->setPosition(Vec2(100*CCRANDOM_MINUS1_1(), BOUND_RECT.size.height/2+200)); + enemy->setPosition(rX,rY); + Vec2 targetPos =Vec2(BOUND_RECT.size.width/3*CCRANDOM_MINUS1_1(),BOUND_RECT.size.height/3*CCRANDOM_0_1()); + enemy->setScale(2*CCRANDOM_MINUS1_1()+2); + float randomTime = CCRANDOM_0_1()*1+1; + enemy->setRotation3D(Vec3(300,0,-CC_RADIANS_TO_DEGREES((enemy->getPosition()-targetPos).getAngle())+90)); + enemy->runAction( + Sequence::create( + Spawn::create( + EaseSineOut::create(MoveTo::create(randomTime, targetPos)), + EaseSineOut::create(ScaleTo::create(randomTime,1)),//TODO: replace with move 3d when possible + EaseBackOut::create(RotateBy::create(randomTime+0.2,Vec3(-300,0,0))), + nullptr + ), + CallFunc::create(CC_CALLBACK_0(BigDude::showFinished, static_cast(enemy))), + nullptr + )); + } + } + if(_elapsed > 65 && !_bossOut) + { + //spawn boss + _bossOut = true; + auto boss = EnemyController::spawnEnemy(kEnemyBoss); + boss->setPosition(0,800); + CocosDenshion::SimpleAudioEngine::getInstance()->stopBackgroundMusic(); + // Music By Matthew Pable (http://www.matthewpablo.com/) + // Licensed under CC-BY 3.0 (http://creativecommons.org/licenses/by/3.0/) + CocosDenshion::SimpleAudioEngine::getInstance()->playBackgroundMusic("Orbital Colossus_0.mp3", true); + } +} + +void GameLayer::update(float dt) +{ + xScroll += speed*dt; + _spr->setTextureRect(Rect(0,((int)xScroll)%2048,512,1200)); + //_cloud->setTextureRect(Rect(0,((int)xScroll)%1024, 256, 1024)); + if (!isDie) { + GameController::update(dt, _player); + GameController::update(dt, _friendPlayer); + } + else + { + if (_player) { + _player->stop(); + removeChild(_player); + _player=NULL; + removeChild(_streak); + _streak=NULL; + removeChild(_emissionPart); + _emissionPart=NULL; + //scheduleOnce(schedule_selector(GameLayer::removeBulletAndEnmeys), 1/60); + stopAllActions(); + unscheduleAllSelectors(); + } + + if (_friendPlayer) { + _friendPlayer->stop(); + + removeChild(_friendPlayer->getTrail()); + removeChild(_friendPlayer->getEmissionPart()); + removeChild(_friendPlayer); + _friendPlayer=NULL; + } + } +} + +void GameLayer::removeBulletAndEnmeys(float dt) +{ + for(int i=EnemyController::enemies.size()-1;i>=0;i--) + { + EnemyController::erase(i); + } + for(int i=EnemyController::showCaseEnemies.size()-1;i>=0;i--) + { + //EnemyController::erase(i); + EnemyController::showCaseEnemies.at(i)->removeFromParentAndCleanup(false); + EnemyController::showCaseEnemies.erase(i); + } + for(int i=BulletController::bullets.size()-1;i>=0;i--) + { + BulletController::erase(i); + } +} + + +void GameLayer::listenToReceiveMessage(EventCustom* event) +{ + this->scheduleOnce(schedule_selector(GameLayer::scheduleReceiveMessage), 0); +} + +void GameLayer::scheduleReceiveMessage(float dt) +{ + if(_friendPlayer == NULL) return; + + std::list::iterator iter; + std::list listMessage; + ConnectionInterface::getMessageList(listMessage); + + rapidjson::Document doc; + + while (listMessage.size()) { + std::string msg = listMessage.front(); + listMessage.pop_front(); + + doc.Parse(msg.c_str()); + if(doc.HasParseError() != 0) continue; + + if (doc.HasMember("type") && doc.HasMember("prevX") && doc.HasMember("prevY") && doc.HasMember("deltaX") && doc.HasMember("deltaY") + && doc["type"].IsInt() && doc["prevX"].IsDouble() && doc["prevY"].IsDouble() && doc["deltaX"].IsDouble() && doc["deltaY"].IsDouble()) + { + _friendPlayer->touchMoved(Point(doc["prevX"].GetDouble(), doc["prevY"].GetDouble()), Point(doc["deltaX"].GetDouble(), doc["deltaY"].GetDouble())); + } + } +} + +void GameLayer::listenToDisconnect(EventCustom *event) +{ + this->scheduleOnce(schedule_selector(GameLayer::scheduleDisconnect), 0); +} + +void GameLayer::scheduleDisconnect(float dt) +{ + auto helloworld = MainMenuScene::createScene(); + Director::getInstance()->replaceScene(helloworld); +} + diff --git a/samples/EarthWarrior3D-CSDK/Classes/GameLayer.h b/samples/EarthWarrior3D-CSDK/Classes/GameLayer.h new file mode 100755 index 0000000..5a55545 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/GameLayer.h @@ -0,0 +1,69 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__GameLayer__ +#define __Moon3d__GameLayer__ +#include "cocos2d.h" +USING_NS_CC; +class Player; +//class QuadTree; +class AirCraft; +class GameEntity; +class CCFPlayer; +class GameLayer : public Layer +{ +public: + virtual bool init(); + void update(float dt); + CREATE_FUNC(GameLayer); + static bool isDie; + //virtual void onEnter(); + +protected: + float xScroll; + float speed; + Sprite *_spr; + Sprite *_cloud; + Player *_player; + MotionStreak *_streak; + ParticleSystemQuad *_emissionPart; + void schedulePlayer(); + //QuadTree *_collisionTree; + + CCFPlayer *_friendPlayer; + void scheduleFriendPlayer(); + void listenToReceiveMessage(cocos2d::EventCustom *event); + void listenToDisconnect(cocos2d::EventCustom *event); + void scheduleReceiveMessage(float dt); + void scheduleDisconnect(float dt); + + //QuadTree *container; + void gameMaster(float dt); + float _elapsed; //testing purpose, this was set to near boss timer + bool _bossOut; + +private: + void removeBulletAndEnmeys(float dt); +}; +#endif /* defined(__Moon3d__GameLayer__) */ \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/Classes/GameOverLayer.cpp b/samples/EarthWarrior3D-CSDK/Classes/GameOverLayer.cpp new file mode 100755 index 0000000..b7c4c87 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/GameOverLayer.cpp @@ -0,0 +1,190 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "GameOverLayer.h" +#include "MainMenuScene.h" +#include "HelloWorldScene.h" +#include "GameLayer.h" +#include "GameControllers.h" +#include "AirCraft.h" +#include "Bullets.h" +#include + +GameOverLayer* GameOverLayer::create(int score) +{ + GameOverLayer *pRet = new GameOverLayer(); + pRet->m_score=score; + if (pRet && pRet->init()) + { + pRet->autorelease(); + } + else + { + delete pRet; + pRet = NULL; + } + return pRet; +} + +bool GameOverLayer::init() +{ + if (!LayerColor::initWithColor(Color4B(255, 255, 255, 50))) { + return false; + } + + auto visibleSize=Director::getInstance()->getVisibleSize(); + + auto score_bk=Sprite::createWithSpriteFrameName("gameover_score_bk.png"); + score_bk->setPosition(Vec2(visibleSize.width/2, visibleSize.height/2)); + addChild(score_bk,1); + score_bk->setScale(0.2f); + score_bk->runAction(Sequence::create(ScaleTo::create(0.2f, 1.1f), + ScaleTo::create(0.1f, 0.9f), + ScaleTo::create(0.1f, 1.0f), + CallFunc::create(CC_CALLBACK_0(GameOverLayer::ShowScore,this)), + NULL)); + + auto backtomenu_normal=Sprite::createWithSpriteFrameName("gameover_backtomenu.png"); + auto backtomenu_pressed=Sprite::createWithSpriteFrameName("gameover_backtomenu.png"); + backtomenu_Item = MenuItemSprite::create(backtomenu_normal, + backtomenu_pressed, + CC_CALLBACK_1(GameOverLayer::menu_backtomenu_Callback,this)); + +// auto playagain_normal=Sprite::createWithSpriteFrameName("gameover_playagain.png"); +// auto playagain_pressed=Sprite::createWithSpriteFrameName("gameover_playagain.png"); +// playagain_Item = MenuItemSprite::create(playagain_normal, +// playagain_pressed, +// CC_CALLBACK_1(GameOverLayer::menu_playagain_Callback,this)); + + auto menu = Menu::create(backtomenu_Item,NULL); + menu->alignItemsHorizontallyWithPadding(20); + menu->setPosition(visibleSize.width/2, 100); + this->addChild(menu, 2); + + auto listener = EventListenerTouchOneByOne::create(); + listener->setSwallowTouches(true); + + listener->onTouchBegan = CC_CALLBACK_2(GameOverLayer::onTouchBegan, this); + listener->onTouchMoved = CC_CALLBACK_2(GameOverLayer::onTouchMoved, this); + listener->onTouchEnded = CC_CALLBACK_2(GameOverLayer::onTouchEnded, this); + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + + return true; +} + +void GameOverLayer::ShowScore() +{ + auto visibleSize=Director::getInstance()->getVisibleSize(); + + auto score_text=Sprite::createWithSpriteFrameName("gameover_score.png"); + score_text->setPosition(Vec2(-200, visibleSize.height/2+30)); + score_text->runAction(MoveTo::create(0.5f, Vec2(visibleSize.width/2,visibleSize.height/2+30))); + addChild(score_text,2); + + std::ostringstream pScore; + pScore<setAnchorPoint(Vec2(0.5f,0.5f)); + score_label->setPosition(Vec2(1000,visibleSize.height/2-40)); + score_label->runAction(Sequence::create( + MoveTo::create(0.5f, Vec2(visibleSize.width/2,visibleSize.height/2-30)), + ScaleTo::create(0.1f, 1.3f), + ScaleTo::create(0.1f, 0.98f), + ScaleTo::create(0.1f, 1.2f),NULL)); + addChild(score_label,2); + +} + +void GameOverLayer::menu_backtomenu_Callback(Ref* sender) +{ + backtomenu_Item->runAction(Sequence::create(ScaleTo::create(0.1f, 1.1f), + ScaleTo::create(0.1f, 0.9f), + ScaleTo::create(0.1f, 1.0f), + CallFunc::create(CC_CALLBACK_0(GameOverLayer::menu_backtomenu, this)),NULL)); +} + +void GameOverLayer::menu_backtomenu() +{ + CocosDenshion::SimpleAudioEngine::getInstance()->stopBackgroundMusic(); + + Director::getInstance()->replaceScene(MainMenuScene::createScene()); + for(int i=EnemyController::enemies.size()-1;i>=0;i--) + { + EnemyController::enemies.at(i)->removeFromParentAndCleanup(true); + } + EnemyController::enemies.clear(); + for(int i=EnemyController::showCaseEnemies.size()-1;i>=0;i--) + { + EnemyController::showCaseEnemies.at(i)->removeFromParentAndCleanup(true); + //EnemyController::showCaseEnemies.erase(i); + } + EnemyController::showCaseEnemies.clear(); + for(int i=BulletController::bullets.size()-1;i>=0;i--) + { + BulletController::bullets.erase(i); + } + BulletController::bullets.clear(); +} + +void GameOverLayer::menu_playagain_Callback(Ref* sender) +{ + playagain_Item->runAction(Sequence::create(ScaleTo::create(0.1f, 1.1f), + ScaleTo::create(0.1f, 0.9f), + ScaleTo::create(0.1f, 1.0f), + CallFunc::create(CC_CALLBACK_0(GameOverLayer::menu_playagain, this)),NULL)); + +} + +void GameOverLayer::menu_playagain() +{ + CocosDenshion::SimpleAudioEngine::getInstance()->stopBackgroundMusic(); + GameLayer::isDie = false; + for(int i=EnemyController::enemies.size()-1;i>=0;i--) + { + EnemyController::erase(i); + } + for(int i=EnemyController::showCaseEnemies.size()-1;i>=0;i--) + { + //EnemyController::erase(i); + EnemyController::showCaseEnemies.at(i)->removeFromParentAndCleanup(false); + } + for(int i=BulletController::bullets.size()-1;i>=0;i--) + { + BulletController::erase(i); + } + Director::getInstance()->replaceScene(HelloWorld::createScene()); +} + +bool GameOverLayer::onTouchBegan(Touch *touch, Event *event) +{ + return true; +} +void GameOverLayer::onTouchMoved(Touch *touch, Event *event) +{ + +} +void GameOverLayer::onTouchEnded(Touch *touch, Event *event) +{ +} \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/Classes/GameOverLayer.h b/samples/EarthWarrior3D-CSDK/Classes/GameOverLayer.h new file mode 100755 index 0000000..915ff2b --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/GameOverLayer.h @@ -0,0 +1,60 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__GameOverLayer__ +#define __Moon3d__GameOverLayer__ + +#include "cocos2d.h" +#include "SimpleAudioEngine.h" + +USING_NS_CC; +using namespace CocosDenshion; + +class GameOverLayer : public LayerColor +{ +public: + + static GameOverLayer* create(int score); + + virtual bool init(); + +private: + + int m_score; + MenuItemSprite* backtomenu_Item; + MenuItemSprite* playagain_Item; + + void ShowScore(); + + void menu_backtomenu_Callback(Ref* sender); + void menu_playagain_Callback(Ref* sender); + void menu_backtomenu(); + void menu_playagain(); + + virtual bool onTouchBegan(Touch *touch, Event *event); + virtual void onTouchMoved(Touch *touch, Event *event); + virtual void onTouchEnded(Touch *touch, Event *event); +}; + +#endif /* defined(__Moon3d__GameOverLayer__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/HelloWorldScene.cpp b/samples/EarthWarrior3D-CSDK/Classes/HelloWorldScene.cpp new file mode 100755 index 0000000..0288ee3 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/HelloWorldScene.cpp @@ -0,0 +1,155 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "HelloWorldScene.h" +#include "GameLayer.h" +#include "HelloWorldScene.h" +#include "GameOverLayer.h" +#include "GameControllers.h" + +USING_NS_CC; + +HelloWorld::~HelloWorld() +{ + //NotificationCenter::getInstance()->destroyInstance(); +} + +Scene* HelloWorld::createScene() +{ + // 'scene' is an autorelease object + auto scene = Scene::create(); + + // 'layer' is an autorelease object + auto layer = HelloWorld::create(); + layer->setTag(100); + // add layer as a child to scene + scene->addChild(layer,2); + + // add warning layer + auto warningLayer = LayerColor::create(Color4B(255, 0, 0, 60)); + warningLayer->setOpacity(0); + warningLayer->setTag(456); + scene->addChild(warningLayer,7); + + + // return the scene + return scene; +} + +HelloWorld::HelloWorld() +:score(0) +, hpView(nullptr) +, scoreLabel(nullptr) +{ +} + +// on "init" you need to initialize your instance +bool HelloWorld::init() +{ + if ( !Layer::init() ) + { + return false; + } + Size visibleSize = Director::getInstance()->getVisibleSize(); + auto origin = Director::getInstance()->getVisibleOrigin(); + auto sb = GameLayer::create(); + sb->setTag(123); + sb->setPosition(Vec2(visibleSize.width/2 + origin.x, visibleSize.height/2 + origin.y)); + addChild(sb); + auto fog = Sprite::createWithSpriteFrameName("fog.png"); + addChild(fog); + fog->setPosition(visibleSize.width/2,visibleSize.height/2+285); + fog->setScaleX(visibleSize.width/10); + + //HP + auto lefttopUI = Sprite::createWithSpriteFrameName("hp_empty.png"); + lefttopUI->setAnchorPoint(Vec2(0,1)); + lefttopUI->setPosition(Vec2(0, visibleSize.height+origin.y)); + addChild(lefttopUI); + + hpView = ProgressTimer::create(Sprite::createWithSpriteFrameName("hp.png")); + hpView->setType(ProgressTimer::Type::BAR); + hpView->setMidpoint(Vec2(0,0)); + hpView->setPercentage(1); + hpView->setBarChangeRate(Vec2(0, 1)); + hpView->setPercentage(100); + hpView->setAnchorPoint(Vec2(0,1)); + hpView->setPosition(Vec2(18, visibleSize.height+origin.y-32)); + addChild(hpView); + + auto hpAbove = Sprite::createWithSpriteFrameName("hp_above.png"); + hpAbove->setAnchorPoint(Vec2(0,1)); + hpAbove->setPosition(Vec2(18, visibleSize.height+origin.y-32)); + addChild(hpAbove); + + //Score + auto rightTopUI = Sprite::createWithSpriteFrameName("right_top_ui.png"); + rightTopUI->setAnchorPoint(Vec2(1,1)); + rightTopUI->setPosition(origin+visibleSize); + this->addChild(rightTopUI); + + //the menuitem to show score + scoreLabel = LabelAtlas::create("0", "score_right_top.png", 23, 28, '0'); + scoreLabel->setAnchorPoint(Vec2(1,0.5)); + scoreLabel->setPosition(visibleSize.width-40,visibleSize.height-45); + this->addChild(scoreLabel); + + this->schedule(schedule_selector(HelloWorld::increaseScore), (float)1/10); + //this->addChild(scoreLabel); + + + NotificationCenter::getInstance()->destroyInstance(); + NotificationCenter::getInstance()->addObserver(this,callfuncO_selector(HelloWorld::ShowGameOver),"ShowGameOver",NULL); + + return true; +} + +void HelloWorld::increaseScore(float dt) +{ + this->score++; + std::stringstream ss; + std::string str; + ss<>str; + const char *p = str.c_str(); + scoreLabel->setString(p); +} + +void HelloWorld::ShowGameOver(Ref* pObj) +{ + //unschedule(schedule_selector(HelloWorld::increaseScore)); +// BulletController::reset(); +// EnemyController::reset(); + auto gameoverlayer=GameOverLayer::create(score); + addChild(gameoverlayer,10); +} + +void HelloWorld::menuCloseCallback(Ref* sender) +{ + Director::getInstance()->end(); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + exit(0); +#endif +} diff --git a/samples/EarthWarrior3D-CSDK/Classes/HelloWorldScene.h b/samples/EarthWarrior3D-CSDK/Classes/HelloWorldScene.h new file mode 100755 index 0000000..452d5c3 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/HelloWorldScene.h @@ -0,0 +1,58 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __HELLOWORLD_SCENE_H__ +#define __HELLOWORLD_SCENE_H__ + +#include "cocos2d.h" +# +class HelloWorld : public cocos2d::Layer +{ +public: + // there's no 'id' in cpp, so we recommend returning the class instance pointer + static cocos2d::Scene* createScene(); + + // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone + virtual bool init(); + + // a selector callback + void menuCloseCallback(cocos2d::Ref* pSender); + + // implement the "static create()" method manually + CREATE_FUNC(HelloWorld); +protected: + HelloWorld(); + ~HelloWorld(); + + +private: + CC_SYNTHESIZE(cocos2d::ProgressTimer*, hpView, HPView); + CC_SYNTHESIZE(int, score, Score) + CC_SYNTHESIZE(cocos2d::LabelAtlas*, scoreLabel, ScoreLabel); + void increaseScore(float dt); + void ShowGameOver(Ref* pObj); + +}; + +#endif // __HELLOWORLD_SCENE_H__ diff --git a/samples/EarthWarrior3D-CSDK/Classes/LicenseLayer.cpp b/samples/EarthWarrior3D-CSDK/Classes/LicenseLayer.cpp new file mode 100755 index 0000000..f3810fe --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/LicenseLayer.cpp @@ -0,0 +1,82 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "LicenseLayer.h" + +LicenseLayer* LicenseLayer::create(const char* type_file_name) +{ + LicenseLayer *pRet = new LicenseLayer(); + pRet->type_file_name = type_file_name; + if (pRet && pRet->init()) + { + pRet->autorelease(); + } + else + { + delete pRet; + pRet = NULL; + } + return pRet; +} + + +bool LicenseLayer::init() +{ + auto window = Sprite::create(type_file_name); + //window->setPosition(Vec2(visibleSize.width/2, visibleSize.height/2)); + addChild(window,1); + window->setScale(0.2f); + window->runAction(Sequence::create(ScaleTo::create(0.2f, 1.1f), + ScaleTo::create(0.1f, 0.9f), + ScaleTo::create(0.1f, 1.0f), + NULL)); + + auto listener = EventListenerTouchOneByOne::create(); + listener->setSwallowTouches(true); + + listener->onTouchBegan = CC_CALLBACK_2(LicenseLayer::onTouchBegan, this); + listener->onTouchMoved = CC_CALLBACK_2(LicenseLayer::onTouchMoved, this); + listener->onTouchEnded = CC_CALLBACK_2(LicenseLayer::onTouchEnded, this); + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + + return true; +} + +void LicenseLayer::dismiss(){ + this->removeFromParent(); +} + +bool LicenseLayer::onTouchBegan(Touch *touch, Event *event) +{ + this->runAction(Sequence::create(ScaleTo::create(0.2f, 0.2f),CallFunc::create(CC_CALLBACK_0(LicenseLayer::dismiss,this)), NULL)); + return true; +} +void LicenseLayer::onTouchMoved(Touch *touch, Event *event) +{ + +} +void LicenseLayer::onTouchEnded(Touch *touch, Event *event) +{ +} \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/Classes/LicenseLayer.h b/samples/EarthWarrior3D-CSDK/Classes/LicenseLayer.h new file mode 100755 index 0000000..fd2fabc --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/LicenseLayer.h @@ -0,0 +1,53 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__LicenseLayer__ +#define __Moon3d__LicenseLayer__ + +#include "cocos2d.h" + +USING_NS_CC; + +class LicenseLayer : public Layer +{ +public: + + static LicenseLayer* create(const char* type_file_name); + + virtual bool init(); + +private: + + MenuItemSprite* license; + + const char* type_file_name; + + void dismiss(); + + virtual bool onTouchBegan(Touch *touch, Event *event); + virtual void onTouchMoved(Touch *touch, Event *event); + virtual void onTouchEnded(Touch *touch, Event *event); +}; + +#endif /* defined(__Moon3d__LicenseLayer__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/LoadingScene.cpp b/samples/EarthWarrior3D-CSDK/Classes/LoadingScene.cpp new file mode 100755 index 0000000..8ec8f59 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/LoadingScene.cpp @@ -0,0 +1,307 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "LoadingScene.h" +#include "HelloWorldScene.h" +#include "AirCraft.h" +#include "Enemies.h" +#include "Bullets.h" +#include "GameControllers.h" +#include "ParticleManager.h" +#include "consts.h" +#include "Sprite3DEffect.h" + +int LoadingScene::updatecount=0; +int LoadingScene::m_curPreload_fodder_count=0; +int LoadingScene::m_curPreload_fodderL_count=0; +int LoadingScene::m_curPreload_BigDude_count=0; +int LoadingScene::m_curPreload_Missile_count=0; +int LoadingScene::m_curPreload_Boss_count=0; + +int LoadingScene::audioloaded = false; +int LoadingScene::particleloaded = false; + +LoadingScene::~LoadingScene() +{ +} + +Scene* LoadingScene::createScene() +{ + // 'scene' is an autorelease object + auto scene = Scene::create(); + + // 'layer' is an autorelease object + auto layer = LoadingScene::create(); + + // add layer as a child to scene + scene->addChild(layer); + + // return the scene + return scene; +} + +// on "init" you need to initialize your instance +bool LoadingScene::init() +{ + if ( !Layer::init() ) + { + return false; + } + + InitBk(); + InitCoco(); + LoadingResource(); + + //NotificationCenter::getInstance()->addObserver(this,callfuncO_selector(LoadingScene::GotoNextScene),"GotoNextScene",NULL); + scheduleUpdate(); + + return true; +} + +void LoadingScene::InitBk() +{ + Size visibleSize = Director::getInstance()->getVisibleSize(); + + + SpriteFrameCache::getInstance()->addSpriteFramesWithFile("loadingAndHP.plist","loadingAndHP.png"); + + //bk + auto loading_bk=Sprite::createWithSpriteFrameName("loading_bk.png"); + loading_bk->setPosition(Vec2(visibleSize.width/2, visibleSize.height/2)); + addChild(loading_bk,0); + + + //LabelPercent + m_pPercent=Label::createWithBMFont("num.fnt","0%"); + m_pPercent->setPosition(Vec2(visibleSize.width/2,visibleSize.height/2+170)); + this->addChild(m_pPercent,1); + + //progress + auto progress_bk=Sprite::createWithSpriteFrameName("loading_progress_bk.png"); + progress_bk->setPosition(Vec2(visibleSize.width/2, visibleSize.height/2+300)); + addChild(progress_bk); + + m_pProgress=Sprite::createWithSpriteFrameName("loading_progress_thumb.png"); + m_pProgress->setPosition(Vec2(100, visibleSize.height/2+320)); + addChild(m_pProgress); +} + +void LoadingScene::InitCoco() +{ + Size visibleSize = Director::getInstance()->getVisibleSize(); + auto coco = EffectSprite3D::createFromObjFileAndTexture("coconut.c3b", "coco.png"); + if(coco) + { + coco->setRotation3D(Vec3(90,0,180)); + coco->setPosition(Vec2(visibleSize.width/2, visibleSize.height/2-150)); + GameEntity::UseOutlineEffect(static_cast(coco), 0.03, Color3B(0,0,0)); + + addChild(coco,1); + coco->runAction(RepeatForever::create(RotateBy::create(0.8f,Vec3(0,360,0)))); + } +} + +void LoadingScene::LoadingResource() +{ + if(!particleloaded) + LoadingParticle(); + //Loading Music + if(!audioloaded) + LoadingMusic(); + + //Loading Picture + LoadingPic(); +} + +void LoadingScene::LoadingMusic() +{ + audioloaded = true; + auto Audio = CocosDenshion::SimpleAudioEngine::getInstance(); + Audio->preloadEffect("explodeEffect.mp3"); + Audio->preloadEffect("hit.mp3"); + Audio->preloadEffect("boom2.mp3"); + Audio->preloadEffect("boom.mp3"); + Audio->preloadBackgroundMusic("Orbital Colossus_0.mp3"); + //Audio->preloadBackgroundMusic("Star_Chaser.mp3"); + + // Music By Matthew Pable (http://www.matthewpablo.com/) + // Licensed under CC-BY 3.0 (http://creativecommons.org/licenses/by/3.0/) + Audio->playBackgroundMusic("Flux2.mp3"); +} + +void LoadingScene::LoadingPic() +{ + auto TexureCache=Director::getInstance()->getTextureCache(); + TexureCache->addImageAsync("boss.png",CC_CALLBACK_1(LoadingScene::LoadingCallback,this)); + TexureCache->addImageAsync("coco.png",CC_CALLBACK_1(LoadingScene::LoadingCallback,this)); + TexureCache->addImageAsync("groundLevel.jpg", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + TexureCache->addImageAsync("bullets.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + TexureCache->addImageAsync("daodan_32.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + TexureCache->addImageAsync("diji02_v002_128.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + TexureCache->addImageAsync("dijiyuanv001.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + TexureCache->addImageAsync("playerv002_256.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + TexureCache->addImageAsync("streak.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + + TexureCache->addImageAsync("gameover_score_num_0.png",CC_CALLBACK_1(LoadingScene::LoadingCallback,this)); + TexureCache->addImageAsync("num_0.png",CC_CALLBACK_1(LoadingScene::LoadingCallback,this)); + TexureCache->addImageAsync("score_right_top.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + + TexureCache->addImageAsync("gameover.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + +} + +void LoadingScene::LoadingCallback(Ref* pObj) +{ + ++currentNum; + char tmp[10]; + int percent=(int)(((float)currentNum / totalNum) * 100); + sprintf(tmp, "%d%%", percent); + m_pPercent->setString(tmp); + m_pProgress->runAction(MoveBy::create(0.01f, Vec2(420/TOTAL_PIC_NUM,0))); +// m_pSlider->setValue(percent); + + + if (currentNum == totalNum) + { + //NotificationCenter::getInstance()->postNotification("GotoNextScene",NULL); + GotoNextScene(); + } +} + +void LoadingScene::GotoNextScene() +{ + //goto next scene. + SpriteFrameCache::getInstance()->addSpriteFramesWithFile("gameover.plist","gameover.png"); + + scheduleOnce(schedule_selector(LoadingScene::RunNextScene), 1.0f); +} + +void LoadingScene::RunNextScene(float dt) +{ + this->removeAllChildren(); + auto helloworldScene=HelloWorld::createScene(); + Director::getInstance()->replaceScene(TransitionZoomFlipX::create(1.0f,helloworldScene)); + +} + +void LoadingScene::update(float dt) +{ + ++updatecount; + log("updateCount:%d........",updatecount); + + if (m_curPreload_fodder_countretain(); + EnemyController::_fodderPool.pushBack(enemy_fodder); + } + break; + case kEnemyFodderL: + { + auto enemy_fodderL= FodderLeader::create(); + enemy_fodderL->retain(); + EnemyController::_fodderLPool.pushBack(enemy_fodderL); + } + break; + case kEnemyBigDude: + { + auto enmey_bigdude= BigDude::create(); + enmey_bigdude->retain(); + EnemyController::_bigDudePool.pushBack(enmey_bigdude); + } + case kEnemyBoss: + { + auto enemy_boss =Boss::create(); + enemy_boss->retain(); + EnemyController::_bossPool.pushBack(enemy_boss); + } + break; + default: + break; + } +} + +void LoadingScene::LoadingBullet(int type) +{ + switch (type) { + case kPlayerMissiles: + { + auto bullet = Missile::create(); + bullet->retain(); + BulletController::_missilePool.pushBack(bullet); + } + break; + default: + break; + } +} + +void LoadingScene::LoadingParticle() +{ + particleloaded = true; + auto particle=ParticleManager::getInstance(); + particle->AddPlistData("missileFlare.plist","missileFlare"); + particle->AddPlistData("emission.plist", "emission"); + particle->AddPlistData("missileFlare.plist","missileFlare"); + particle->AddPlistData("toonSmoke.plist", "toonSmoke"); + particle->AddPlistData("flare.plist", "flare"); + particle->AddPlistData("glow.plist", "glow"); + particle->AddPlistData("debris.plist", "debris"); + particle->AddPlistData("emissionPart.plist", "emissionPart"); + particle->AddPlistData("engine.plist", "engine"); +} diff --git a/samples/EarthWarrior3D-CSDK/Classes/LoadingScene.h b/samples/EarthWarrior3D-CSDK/Classes/LoadingScene.h new file mode 100755 index 0000000..f1fde08 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/LoadingScene.h @@ -0,0 +1,95 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__LoadingScene__ +#define __Moon3d__LoadingScene__ + +#include "cocos2d.h" +#include "SimpleAudioEngine.h" + +USING_NS_CC; +using namespace CocosDenshion; + +#define TOTAL_PIC_NUM 13 + +#define PRELOAD_FODDER_COUNT 18 +#define PRELOAD_FODDERL_COUNT 3 +#define PRELOAD_BIGDUDE_COUBR 5 +#define PRELOAD_MISSILE_COUNT 5 +#define PRElOAD_BOSS_COUNT 1 + +class LoadingScene : public Layer +{ +public: + + LoadingScene():currentNum(0), + totalNum(TOTAL_PIC_NUM){}; + + ~LoadingScene(); + + static Scene* createScene(); + + virtual bool init(); + + void update(float dt); + static int audioloaded; + CREATE_FUNC(LoadingScene); + +private: + void InitBk(); + void InitCoco(); + void LoadingResource(); + void LoadingMusic(); + void LoadingPic(); + void LoadingEnemy(int type); + void LoadingBullet(int type); + void LoadingParticle(); + + void LoadingCallback(Ref* pObj); + void GotoNextScene(); + void RunNextScene(float dt); + + +private: + static bool isReg; + int currentNum; + int totalNum; + + Sprite* m_pProgress; + Label* m_pPercent; + + static int m_curPreload_fodder_count; + static int m_curPreload_fodderL_count; + static int m_curPreload_BigDude_count; + static int m_curPreload_Missile_count; + static int m_curPreload_Boss_count; + + static int updatecount; + + static int particleloaded; +}; + + + +#endif /* defined(__Moon3d__LoadingScene__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/MainMenuScene.cpp b/samples/EarthWarrior3D-CSDK/Classes/MainMenuScene.cpp new file mode 100755 index 0000000..ca0d128 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/MainMenuScene.cpp @@ -0,0 +1,277 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "MainMenuScene.h" +#include "LoadingScene.h" +#include "PublicApi.h" +#include "Plane.h" +#include "GameLayer.h" +#include "HelloWorldScene.h" +#include "LicenseLayer.h" +#include "CCFLayer.h" +#include "PopLayer.h" +#include "FriendControlScene.h" +USING_NS_CC; + +Scene* MainMenuScene::createScene() +{ + // 'scene' is an autorelease object + auto scene = Scene::create(); + + // 'layer' is an autorelease object + auto layer = MainMenuScene::create(); + + // add layer as a child to scene + scene->addChild(layer); + + // return the scene + return scene; +} + +// on "init" you need to initialize your instance +bool MainMenuScene::init() +{ + if ( !Layer::init() ) + { + return false; + } + + pRate = 3.1415926/2; + + // Music By Matthew Pable (http://www.matthewpablo.com/) + // Licensed under CC-BY 3.0 (http://creativecommons.org/licenses/by/3.0/) + CocosDenshion::SimpleAudioEngine::getInstance()->playBackgroundMusic("Star_Chaser.mp3"); + + SpriteFrameCache::getInstance()->addSpriteFramesWithFile("menu_scene.plist","menu_scene.png"); + SpriteFrameCache::getInstance()->addSpriteFramesWithFile("Particle.plist","Particle.png"); + + Size visibleSize = Director::getInstance()->getVisibleSize(); + auto origin = Director::getInstance()->getVisibleOrigin(); + Size winSize = Director::getInstance()->getWinSize(); +// if(){ +// log("x"); +// }else if(920 == visibleSize.height){ +// log("y"); +// } +// log("w:%f",visibleSize.width); +// log("h:%f",visibleSize.height); +// log("w:%f",winSize.width); +// log("h:%f",winSize.height); + + + //************ adds Plane **************** + plane = Plane::create(); + this->addChild(plane, 10); + this->scheduleUpdate(); + + //************ adds emission flare **************** + auto flare = ParticleSystemQuad::create("missileFlare.plist"); + flare->setScale(5); + float originX = -9.0f; + float originY = 159.0f; + float originZ = 9.0f; + flare->setTotalParticles(50); + flare->setRotation3D(Vec3(-originX,-originY,-originZ)); + flare->setPosition(-39,0); + flare->setPositionType(tPositionType::GROUPED); + flare->setStartColor(Color4F(0,0.99,1,1)); + plane->addChild(flare, -1); + + auto emis = ParticleSystemQuad::create("menuEmission.plist"); + emis->setScale(3); + emis->setRotation3D(Vec3(-originX,-originY,-originZ)); + emis->setPosition(-40,0); + emis->setPositionType(tPositionType::GROUPED); + emis->setRotation(180); + plane->addChild(emis, -2); + + + //************ adds vanishing **************** + auto fileUtil = FileUtils::getInstance(); + auto plistData = fileUtil->getValueMapFromFile("vanishingPoint.plist"); + //auto sf = SpriteFrame::create("bullets.png", Rect(5,8,24,32)); + auto vanishing = ParticleSystemQuad::create(plistData); + vanishing->setAnchorPoint(Vec2(0.5f,0.5f)); + vanishing->setPosition(visible_size_macro.width-90,visible_size_macro.height/2 +50); + this->addChild(vanishing,1,1); + + //************* adds background *********** + auto background = Sprite::createWithSpriteFrameName("mainmenu_BG.png"); + background->setAnchorPoint(Vec2(0,0)); + this->addChild(background,-1,-1); + + //************* adds start game *********** + auto start_normal=Sprite::createWithSpriteFrameName("start_game.png"); + auto start_pressed=Sprite::createWithSpriteFrameName("start_game.png"); + startgame_item = MenuItemSprite::create(start_normal, start_pressed, CC_CALLBACK_1(MainMenuScene::startgame, this)); + startgame_item->setPosition(visibleSize.width/2 - 150,200); + startgame_item->setScale(1.3); + + //************* adds PK game *********** + auto pk_normal=Sprite::create("pkstart.png"); + auto pk_pressed=Sprite::create("pkstart.png"); + pk_item = MenuItemSprite::create(pk_normal, pk_pressed, CC_CALLBACK_1(MainMenuScene::pkgame, this)); + pk_item->setPosition(visibleSize.width/2 + 150,200); + pk_item->setScale(1.3); + + //************* license ******************* + auto license_normal=Sprite::createWithSpriteFrameName("license.png"); + auto license_pressed=Sprite::createWithSpriteFrameName("license.png"); + license_item = MenuItemSprite::create(license_normal, license_pressed, CC_CALLBACK_1(MainMenuScene::license, this)); + license_item->setPosition(visibleSize.width/2-200,100); + license_item->setScale(0.7); + + //************* credits ****************** + auto credits_normal=Sprite::createWithSpriteFrameName("credits.png"); + auto credits_pressed=Sprite::createWithSpriteFrameName("credits.png"); + credits_item = MenuItemSprite::create(credits_normal, credits_pressed, CC_CALLBACK_1(MainMenuScene::credits, this)); + credits_item->setPosition(visibleSize.width/2+200,100); + credits_item->setScale(0.7); + + //************* Menu ****************** + auto menu = Menu::create(startgame_item,license_item,credits_item,pk_item, NULL); + menu->setPosition(origin); + this->addChild(menu,3); + + auto peerInviteListener = EventListenerCustom::create("IntelCCFPeerInvite", CC_CALLBACK_1(MainMenuScene::listenToPeerInvite, this)); + Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(peerInviteListener, this); + + auto peerAcknowledgmentListener = EventListenerCustom::create("IntelCCFInviteAcknowledgment", CC_CALLBACK_1(MainMenuScene::listenToAcknowledgment, this)); + Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(peerAcknowledgmentListener, this); + + auto peerStartControlListener = EventListenerCustom::create("OnStartControl", CC_CALLBACK_1(MainMenuScene::listenToStartControl, this)); + Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(peerStartControlListener, this); + + return true; +} + +void MainMenuScene::update(float dt){ + pRate+=0.01; + plane->setPosition3D(Vec3(visible_size_macro.width/2+50,480-20*sin(1.05*pRate),0)); +} + +void MainMenuScene::startgame(Ref* sender) +{ + startgame_item->runAction(Sequence::create(ScaleTo::create(0.1f, 1.4f), + ScaleTo::create(0.1f, 1.2f), + ScaleTo::create(0.1f, 1.3f), + CallFunc::create(CC_CALLBACK_0(MainMenuScene::startgame_callback,this)),NULL)); +} + +void MainMenuScene::startgame_callback() +{ + CocosDenshion::SimpleAudioEngine::getInstance()->stopBackgroundMusic(); + GameLayer::isDie=false; + auto scene = (LoadingScene::audioloaded) ? HelloWorld::createScene() :LoadingScene::createScene(); + Director::getInstance()->replaceScene(scene); +} + + +void MainMenuScene::pkgame(Ref* sender) +{ + pk_item->runAction(Sequence::create(ScaleTo::create(0.1f, 1.4f), + ScaleTo::create(0.1f, 1.2f), + ScaleTo::create(0.1f, 1.3f), + CallFunc::create(CC_CALLBACK_0(MainMenuScene::pkgame_callback,this)),NULL)); +} + +void MainMenuScene::pkgame_callback() +{ + auto ccfLayer = CCFLayer::create("credits_03.png"); + ccfLayer->setAnchorPoint(Vec2(0.5f,0.5f)); + ccfLayer->setPosition(Vec2(visible_size_macro.width/2, visible_size_macro.height/2)); + addChild(ccfLayer,20); + + ccfLayer->runAction(Sequence::create(ScaleTo::create(0.2f, 1.1f), + ScaleTo::create(0.1f, 0.9f), + ScaleTo::create(0.1f, 1.0f), + NULL)); +} + +void MainMenuScene::credits(Ref* sender){ + credits_item->runAction(Sequence::create(ScaleTo::create(0.1f, 0.8f), + ScaleTo::create(0.1f, 0.6f), + ScaleTo::create(0.1f, 0.7f), + CallFunc::create(CC_CALLBACK_0(MainMenuScene::credits_callback, this)),NULL)); +} + +void MainMenuScene::credits_callback() +{ + auto license =LicenseLayer::create("credits_03.png"); + license->setAnchorPoint(Vec2(0.5f,0.5f)); + license->setPosition(Vec2(visible_size_macro.width/2, visible_size_macro.height/2)); + addChild(license,20); + license->runAction(Sequence::create(ScaleTo::create(0.2f, 1.1f), + ScaleTo::create(0.1f, 0.9f), + ScaleTo::create(0.1f, 1.0f), + NULL)); +} + +void MainMenuScene::license(Ref* sender){ + license_item->runAction(Sequence::create(ScaleTo::create(0.1f, 0.8f), + ScaleTo::create(0.1f, 0.6f), + ScaleTo::create(0.1f, 0.7f), + CallFunc::create(CC_CALLBACK_0(MainMenuScene::license_callback, this)),NULL)); +} + +void MainMenuScene::license_callback() +{ + auto license =LicenseLayer::create("LICENSE_03.png"); + license->setAnchorPoint(Vec2(0.5f,0.5f)); + license->setPosition(Vec2(visible_size_macro.width/2, visible_size_macro.height/2)); + addChild(license,20); + license->runAction(Sequence::create(ScaleTo::create(0.2f, 1.1f), + ScaleTo::create(0.1f, 0.9f), + ScaleTo::create(0.1f, 1.0f), + NULL)); +} + +void MainMenuScene::listenToAcknowledgment(cocos2d::EventCustom *event) +{ + this->scheduleOnce(schedule_selector(MainMenuScene::scheduleAcknowledgement), 0); +} + +void MainMenuScene::scheduleAcknowledgement(float dt) +{ + startgame(NULL); +} + +void MainMenuScene::listenToPeerInvite(EventCustom *event) +{ + this->scheduleOnce(schedule_selector(MainMenuScene::scheduleInvite), 0); +} + +void MainMenuScene::scheduleInvite(float dt) +{ + auto popLayer = PopLayer::create(); + addChild(popLayer, 30); +} + +void MainMenuScene::listenToStartControl(EventCustom *event) +{ + CocosDenshion::SimpleAudioEngine::getInstance()->stopBackgroundMusic(); + GameLayer::isDie=false; + auto scene = FriendControl::createScene(); + Director::getInstance()->replaceScene(scene); +} diff --git a/samples/EarthWarrior3D-CSDK/Classes/MainMenuScene.h b/samples/EarthWarrior3D-CSDK/Classes/MainMenuScene.h new file mode 100755 index 0000000..63fa4c9 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/MainMenuScene.h @@ -0,0 +1,69 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__MainMenuScene__ +#define __Moon3d__MainMenuScene__ + +#include "cocos2d.h" +#include "Plane.h" + +USING_NS_CC; + +class CCFLayer; +class MainMenuScene : public cocos2d::Layer +{ +public: + static cocos2d::Scene* createScene(); + virtual bool init(); + CREATE_FUNC(MainMenuScene); + void update(float dt); +private: + void startgame(cocos2d::Ref* sender); + void pkgame(cocos2d::Ref* sender); + void license(cocos2d::Ref* sender); + void credits(cocos2d::Ref* sender); + Plane* plane; + float pRate; + void startgame_callback(); + void license_callback(); + void credits_callback(); + void pkgame_callback(); + + void listenToAcknowledgment(cocos2d::EventCustom *event); + void scheduleAcknowledgement(float dt); + + void listenToPeerInvite(cocos2d::EventCustom *event); + void scheduleInvite(float dt); + + void listenToStartControl(cocos2d::EventCustom *event); +private: + + MenuItemSprite* startgame_item; + MenuItemSprite* license_item; + MenuItemSprite* credits_item; + MenuItemSprite* pk_item; + +}; + +#endif /* defined(__Moon3d__MainMenuScene__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/ParticleManager.cpp b/samples/EarthWarrior3D-CSDK/Classes/ParticleManager.cpp new file mode 100755 index 0000000..ad7a5c5 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/ParticleManager.cpp @@ -0,0 +1,45 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "ParticleManager.h" + +ParticleManager* ParticleManager::m_pInstance=NULL; +ParticleManager::CGarbo ParticleManager::m_garbo; +ParticleManager::ParticleManager() +{ + m_plistMap.clear(); +} + +void ParticleManager::AddPlistData(std::string strPlist,std::string strName) +{ + auto plistData=FileUtils::getInstance()->getValueMapFromFile(strPlist); + std::map::iterator it = m_plistMap.begin(); + m_plistMap.insert(it,std::pair(strName,plistData)); +} + +ValueMap ParticleManager::GetPlistData(std::string strplist) +{ + auto plistData=m_plistMap.find(strplist)->second; + return plistData; +} diff --git a/samples/EarthWarrior3D-CSDK/Classes/ParticleManager.h b/samples/EarthWarrior3D-CSDK/Classes/ParticleManager.h new file mode 100755 index 0000000..3c99425 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/ParticleManager.h @@ -0,0 +1,72 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__ParticleManager__ +#define __Moon3d__ParticleManager__ + +#include "cocos2d.h" + +USING_NS_CC; + +class ParticleManager +{ +public: + + static ParticleManager* getInstance() + { + if ( m_pInstance == nullptr ) + m_pInstance = new ParticleManager(); + return m_pInstance; + } + +private: + + ParticleManager(); + + static ParticleManager* m_pInstance; + + class CGarbo + { + public: + ~CGarbo() + { + if (ParticleManager::m_pInstance!= nullptr) + { + delete ParticleManager::m_pInstance; + } + } + }; + + static CGarbo m_garbo; + +public: + + std::map m_plistMap; + + void AddPlistData(std::string strPlist,std::string strName); + + ValueMap GetPlistData(std::string strplist); +}; + +#endif /* defined(__Moon3d__ParticleManager__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/PeerButton.cpp b/samples/EarthWarrior3D-CSDK/Classes/PeerButton.cpp new file mode 100644 index 0000000..81ecab1 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/PeerButton.cpp @@ -0,0 +1,27 @@ +// +// PeerButton.cpp +// HelloCcf +// +// Created by calf on 14-7-23. +// +// + +#include "PeerButton.h" + +/// +/// PeerButton +/// + +PeerButton* PeerButton::create(const std::string &normalImage, + const std::string& selectedImage , + const std::string& disableImage, + TextureResType texType) +{ + PeerButton *btn = new PeerButton(); + if (btn && btn->init(normalImage,selectedImage,disableImage,texType)) { + btn->autorelease(); + return btn; + } + CC_SAFE_DELETE(btn); + return nullptr; +} diff --git a/samples/EarthWarrior3D-CSDK/Classes/PeerButton.h b/samples/EarthWarrior3D-CSDK/Classes/PeerButton.h new file mode 100644 index 0000000..d747c49 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/PeerButton.h @@ -0,0 +1,30 @@ +// +// PeerButton.h +// HelloCcf +// +// Created by calf on 14-7-23. +// +// + +#ifndef __HelloCcf__PeerButton__ +#define __HelloCcf__PeerButton__ + +#include "cocos2d.h" +#include "ConnectionInterface.h" +#include "editor-support/cocostudio/CocoStudio.h" +#include "cocos/ui/CocosGUI.h" +using namespace cocos2d::ui; + +class PeerButton : public Button +{ +public: + static PeerButton* create(const std::string& normalImage, + const std::string& selectedImage = "", + const std::string& disableImage = "", + TextureResType texType = TextureResType::LOCAL); + tagPEER getPeer(){return _peer;} + void setPeer(tagPEER peer){_peer = peer;} +protected: + tagPEER _peer; +}; +#endif /* defined(__HelloCcf__PeerMenuItem__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/Plane.cpp b/samples/EarthWarrior3D-CSDK/Classes/Plane.cpp new file mode 100755 index 0000000..b14e333 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/Plane.cpp @@ -0,0 +1,59 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "Plane.h" +#include "PublicApi.h" +#include "Sprite3DEffect.h" + + +const float Plane::pXW = 1.1f; +const float Plane::pYW = 5.0f; +const float Plane::pZW = 1.0f; +const float Plane::pXA = 1.0f; +const float Plane::pYA = 10.0f; +const float Plane::pZA = 7.0f; + +bool Plane::init(){ + + pRate = 3.1415926/2; + originX = -15.0f - 90.f; + originY = 159.0f; + originZ = 9.0f; + + _Model = EffectSprite3D::createFromObjFileAndTexture("playerv002.c3b", "playerv002_256.png"); + if(_Model){ + _Model->setScale(55); + GameEntity::UseOutlineEffect(static_cast(_Model), 0.03, Color3B(0,0,0)); + _Model->setRotation3D(Vec3(originX,originY,originZ)); + this->setRotation3D(Vec3(originX, originY, originZ)); + this->addChild(_Model); + this->scheduleUpdate(); + } + return true; +} + +void Plane::update(float dt){ + pRate+=0.01; + _Model->setRotation3D(Vec3(0-pXA*sin(pXW*pRate),0,0-pZA*sin(pZW*pRate))); +} \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/Classes/Plane.h b/samples/EarthWarrior3D-CSDK/Classes/Plane.h new file mode 100755 index 0000000..d3f7d20 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/Plane.h @@ -0,0 +1,51 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__Plane__ +#define __Moon3d__Plane__ + +#include +#include "cocos2d.h" +#include "GameEntity.h" + +class Plane :public GameEntity{ +public: + CREATE_FUNC(Plane); + bool init(); +private: + float pRate; + float originX; + float originY; + float originZ; + const static float pXW; + const static float pYW; + const static float pZW; + const static float pXA; + const static float pYA; + const static float pZA; + + void update(float dt); +}; + +#endif /* defined(__Moon3d__Plane__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/Player.cpp b/samples/EarthWarrior3D-CSDK/Classes/Player.cpp new file mode 100755 index 0000000..0ced2a6 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/Player.cpp @@ -0,0 +1,185 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "Player.h" +#include "Bullets.h" +#include "GameControllers.h" +#include "consts.h" +#include "HelloWorldScene.h" +#include "PublicApi.h" +#include "GameLayer.h" +#include "ParticleManager.h" +#include "Sprite3DEffect.h" + +#define visible_size_macro Director::getInstance()->getVisibleSize() +#define origin_point Director::getInstance()->getVisibleOrigin(); + +const float Player::rollSpeed = 1.5;// recommended 1.5 +const float Player::returnSpeed = 10;// recommended 4 +const float Player::maxRoll = 75; +const float Player::rollReturnThreshold = 1.02; + +bool Player::init() +{ + _Model = EffectSprite3D::createFromObjFileAndTexture("playerv002.c3b", "playerv002_256.png"); + if(_Model) + { + targetAngle = 0; + targetPos = Vec2(0,0); + _trailOffset = Vec2(0,-40); + + _Model->setScale(8); + addChild(_Model); + // _Model->setRotation3D(Vec3(90,0,0)); + _radius = 40; + _HP = 100; + _alive = true; + + auto listener = EventListenerTouchOneByOne::create(); + listener->setSwallowTouches(true); + + listener->onTouchBegan = CC_CALLBACK_2(Player::onTouchBegan, this); + listener->onTouchMoved = CC_CALLBACK_2(Player::onTouchMoved, this); + listener->onTouchEnded = CC_CALLBACK_2(Player::onTouchEnded, this); + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + //scheduleUpdate(); + GameEntity::UseOutlineEffect(static_cast(_Model), 0.02, Color3B(0,0,0)); + + schedule(schedule_selector(Player::shootMissile), 1.5, -1, 0); + schedule(schedule_selector(Player::shoot), 0.075, -1, 0); + + // engine trail + auto part_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("engine2.jpg"); + ValueMap vm=ParticleManager::getInstance()->GetPlistData("engine"); + auto part = ParticleSystemQuad::create(vm); + part->setTextureWithRect(part_frame->getTexture(), part_frame->getRect()); + addChild(part); + part->setPosition(0,-30); + part->setScale(0.6); + //part->setRotation(90); + return true; + } + return false; +} +void Player::update(float dt) +{ + float smoothedAngle =std::min(std::max(targetAngle*(1-dt*returnSpeed*(rollReturnThreshold-fabsf(targetAngle)/maxRoll)),-maxRoll),maxRoll); + setRotation3D(Vec3(fabsf(smoothedAngle)*0.15,smoothedAngle, 0)); + targetAngle = getRotation3D().y; +} +bool Player::onTouchBegan(Touch *touch, Event *event) +{ + + return true; +} +void Player::onTouchMoved(Touch *touch, Event *event) +{ + Vec2 prev = event->getCurrentTarget()->getPosition(); + Vec2 delta =touch->getDelta(); + + setTargetAngle(targetAngle+delta.x*rollSpeed*(rollReturnThreshold-fabsf(targetAngle)/maxRoll)); + + Vec2 shiftPosition = delta+prev; + + setPosition(shiftPosition.getClampPoint(Vec2(PLAYER_LIMIT_LEFT,PLAYER_LIMIT_BOT),Vec2(PLAYER_LIMIT_RIGHT,PLAYER_LIMIT_TOP))); +} +void Player::onTouchEnded(Touch *touch, Event *event) +{ +} + +void Player::shoot(float dt) +{ + + BulletController::spawnBullet(kPlayerBullet, getPosition()+Vec2(-20,20), Vec2(-200,1600)); + BulletController::spawnBullet(kPlayerBullet, getPosition()+Vec2(20,20), Vec2(200,1600)); + BulletController::spawnBullet(kPlayerBullet, getPosition()+Vec2(0,20), Vec2(0,1600)); +} +void Player::setPosition(Vec2 pos) +{ + if (_position.equals(pos)) + return; + + _position = pos; + _transformUpdated = _transformDirty = _inverseDirty = true; + if(_streak) + { + _streak->setPosition(pos+_trailOffset); + } + if(_emissionPart) + { + _emissionPart->setPosition(pos); + } +} +void Player::shootMissile(float dt) +{ + auto left = BulletController::spawnBullet(kPlayerMissiles, getPosition()+Vec2(-50,-20), Vec2(-200,-200)); + left->setRotation(-45); + auto right = BulletController::spawnBullet(kPlayerMissiles, getPosition()+Vec2(50,-20), Vec2(200,-200)); + right->setRotation(45); +} + +void Player::stop() +{ + unschedule(schedule_selector(Player::shoot)); + unschedule(schedule_selector(Player::shootMissile)); +} +void Player::hideWarningLayer(Node* node) +{ + if(node) + node->setVisible(false); +} +bool Player::hurt(float damage){ + float fromHP = _HP; + float toHP = _HP-=damage; + + auto fade = FadeTo::create(0.2, 40); + auto fadeBack = FadeTo::create(0.2, 0); + auto warningLayer = Director::getInstance()->getRunningScene()->getChildByTag(456); + warningLayer->setVisible(true); + warningLayer->runAction(Sequence::create(fade,fadeBack, + CallFunc::create( + CC_CALLBACK_0(Player::hideWarningLayer, this, warningLayer) + ),NULL)); + + auto hpView = ((HelloWorld*)Director::getInstance()->getRunningScene()->getChildByTag(100))->getHPView(); + + auto to = ProgressFromTo::create(0.5, PublicApi::hp2percent(fromHP), PublicApi::hp2percent(toHP)); + hpView->runAction(to); + + if(_HP <= 0 && _alive) + { + die(); + return true; + } + + return false; +} + +void Player::die() +{ + _alive = false; + GameLayer::isDie=true; + NotificationCenter::getInstance()->postNotification("ShowGameOver",NULL); +} \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/Classes/Player.h b/samples/EarthWarrior3D-CSDK/Classes/Player.h new file mode 100755 index 0000000..4dd0257 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/Player.h @@ -0,0 +1,68 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__Player__ +#define __Moon3d__Player__ + +#include "cocos2d.h" +#include "AirCraft.h" + + +USING_NS_CC; + +class Player : public AirCraft +{ +public: + CREATE_FUNC(Player); + bool init(); + virtual bool onTouchBegan(Touch *touch, Event *event); + virtual void onTouchMoved(Touch *touch, Event *event); + virtual void onTouchEnded(Touch *touch, Event *event); + void update(float dt); + + static const float rollSpeed;// recommended 1.5 + static const float returnSpeed;// recommended 4 + static const float maxRoll; + static const float rollReturnThreshold; + void setTargetAngle(float angle){targetAngle = angle;}; + void setTargetPos(Vec2 target){targetPos = target;}; + + void shoot(float dt); + void shootMissile(float dt); + void stop(); + CC_SYNTHESIZE(MotionStreak*, _streak, Trail); + CC_SYNTHESIZE(ParticleSystemQuad*, _emissionPart, EmissionPart); + void setPosition(Vec2 pos); + virtual bool hurt(float damage); + virtual void die(); + void hideWarningLayer(Node* node); +protected: + float targetAngle; + Vec2 targetPos; + Vec2 _trailOffset; + +}; + + +#endif /* defined(__Moon3d__Player__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/PopLayer.cpp b/samples/EarthWarrior3D-CSDK/Classes/PopLayer.cpp new file mode 100644 index 0000000..75fab29 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/PopLayer.cpp @@ -0,0 +1,98 @@ +// +// PopLayer.cpp +// HelloCcf +// +// Created by calf on 14-7-25. +// +// + +#include "PopLayer.h" +#include "ConnectionInterface.h" + +Scene * PopLayer::scene() +{ + Scene * scene = NULL; + do + { + scene = CCScene::create(); + PopLayer * layer = PopLayer::create(); + scene->addChild(layer); + } + while(0); + + return scene; +} + +bool PopLayer::init() +{ + bool bRet = false; + do + { + CC_BREAK_IF(!Layer::init()); + + Size winSize = Director::getInstance()->getWinSize(); + + Sprite * background = Sprite::create("listviewbg.png"); + background->setScale(2); + m_bgSprite = background; + background->setPosition(Vec2(winSize.width/2,winSize.height/2)); + this->addChild(background); + + Size contentSize = background->getContentSize(); + m_size = contentSize; + + auto item1 = MenuItemLabel::create(Label::create("Accept","fonts/Marker Felt.ttf", 20), CC_CALLBACK_1(PopLayer::yesButton, this)); + auto item2 = MenuItemLabel::create(Label::create("Reject","fonts/Marker Felt.ttf", 20), CC_CALLBACK_1(PopLayer::noButton, this)); + + Menu * menu = Menu::create(item1,item2,NULL); + menu->alignItemsHorizontallyWithPadding(50); + menu->setPosition(Vec2(contentSize.width/2,contentSize.height/3)); + + background->addChild(menu); + + this->setTitle(); + this->setContent(); + + bRet = true; + } + while(0); + + return bRet; +} + +void PopLayer::yesButton(Ref *pSender) +{ + ConnectionInterface::SendInviteResponse(true); + + CCLOG("yesButton"); + cocos2d::EventCustom event("OnStartControl"); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); + + this->removeFromParent(); +} + +void PopLayer::noButton(Ref *pSender) +{ + ConnectionInterface::SendInviteResponse(false); + this->removeFromParent(); +} + +void PopLayer::setTitle() +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + auto title = Label::create("Earth Warrior invite", "fonts/Marker Felt.ttf", 24); + title->setPosition(Vec2(m_size.width/2,m_size.height-title->getContentSize().height/2)); + m_bgSprite->addChild(title); +#endif +} + +void PopLayer::setContent() +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + + auto content = Label::create("Accept connection", "fonts/Marker Felt.ttf",24); + content->setPosition(Vec2(m_size.width/2,m_size.height/2)); + content->setHorizontalAlignment(TextHAlignment::LEFT); + m_bgSprite->addChild(content); +#endif +} \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/Classes/PopLayer.h b/samples/EarthWarrior3D-CSDK/Classes/PopLayer.h new file mode 100644 index 0000000..acac1c4 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/PopLayer.h @@ -0,0 +1,32 @@ +// +// PopLayer.h +// HelloCcf +// reference from http://www.zaojiahua.com/popscene.html +// thanks to xiaota +// Created by calf on 14-7-25. +// +// + +#ifndef __HelloCcf__PopLayer__ +#define __HelloCcf__PopLayer__ + +#include "cocos2d.h" + +using namespace cocos2d; + +class PopLayer : public Layer +{ +public: + static Scene * scene(); + bool init(); + CREATE_FUNC(PopLayer); +private: + void yesButton(Ref *pSender); + void noButton(Ref *pSender); + void setTitle(); + void setContent(); + Size m_size; + Sprite * m_bgSprite; +}; + +#endif /* defined(__HelloCcf__PopLayer__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/PublicApi.cpp b/samples/EarthWarrior3D-CSDK/Classes/PublicApi.cpp new file mode 100755 index 0000000..6663eff --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/PublicApi.cpp @@ -0,0 +1,48 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "PublicApi.h" +USING_NS_CC; + +float PublicApi::hp2percent(float hp){ + float percent = 100.0f; + if(hp>=100){ + percent = 100.f; + }else if(83<=hp && hp<=99){ + percent = 100.0/7*6; + }else if(65<=hp && hp<=82){ + percent = 100.0/7*5; + }else if(47<=hp && hp<=64){ + percent = 100.0/7*4; + }else if(29<=hp && hp<=46){ + percent = 100.0/7*3; + }else if(11<=hp && hp<=28){ + percent = 100.0/7*2; + }else if(1<=hp && hp<=10){ + percent = 100.0/7*1; + }else if(hp<=0){ + percent = 0; + } + return percent; +} diff --git a/samples/EarthWarrior3D-CSDK/Classes/PublicApi.h b/samples/EarthWarrior3D-CSDK/Classes/PublicApi.h new file mode 100755 index 0000000..63af7d2 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/PublicApi.h @@ -0,0 +1,39 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__PublicApi__ +#define __Moon3d__PublicApi__ + +#include "cocos2d.h" +#define visible_size_macro Director::getInstance()->getVisibleSize() +#define origin_point Director::getInstance()->getVisibleOrigin(); +class PublicApi +{ +public: + static float hp2percent(float hp); +protected: + +}; + +#endif /* defined(__Moon3d__PublicApi__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/Sprite3DEffect.cpp b/samples/EarthWarrior3D-CSDK/Classes/Sprite3DEffect.cpp new file mode 100755 index 0000000..3b8176d --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/Sprite3DEffect.cpp @@ -0,0 +1,255 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 "Sprite3DEffect.h" +#include "3d/CCMesh.h" + +static int tuple_sort( const std::tuple &tuple1, const std::tuple &tuple2 ) +{ + return std::get<0>(tuple1) < std::get<0>(tuple2); +} + +EffectSprite3D* EffectSprite3D::createFromObjFileAndTexture(const std::string &objFilePath, const std::string &textureFilePath) +{ + auto sprite = new EffectSprite3D(); + if (sprite && sprite->initWithFile(objFilePath)) + { + sprite->autorelease(); + sprite->setTexture(textureFilePath); + return sprite; + } + CC_SAFE_DELETE(sprite); + return nullptr; +} + +EffectSprite3D::EffectSprite3D() +: _defaultEffect(nullptr) +{ + +} + +EffectSprite3D::~EffectSprite3D() +{ + for(auto effect : _effects) + { + CC_SAFE_RELEASE_NULL(std::get<1>(effect)); + } + CC_SAFE_RELEASE(_defaultEffect); +} + +void EffectSprite3D::setEffect3D(Effect3D *effect) +{ + if(_defaultEffect == effect) return; + CC_SAFE_RETAIN(effect); + CC_SAFE_RELEASE(_defaultEffect); + _defaultEffect = effect; +} + +void EffectSprite3D::addEffect(Effect3D* effect, ssize_t order) +{ + if(nullptr == effect) return; + effect->retain(); + + _effects.push_back(std::make_tuple(order,effect,CustomCommand())); + + std::sort(std::begin(_effects), std::end(_effects), tuple_sort); +} + +void EffectSprite3D::eraseEffect(Effect3D* effect) +{ + auto iter = _effects.begin(); + for (; iter != _effects.end(); ++iter) + { + if(std::get<1>(*iter) != effect) continue; + else + { + CC_SAFE_RELEASE_NULL(std::get<1>(*iter)); + _effects.erase(iter); + break; + } + + } + if(iter == _effects.end()) + CCLOGWARN("Cannot find the effect in EffectSprite3D"); +} + +ssize_t EffectSprite3D::getEffectCount() const +{ + return _effects.size(); +} + +Effect3D* EffectSprite3D::getEffect(ssize_t index) const +{ + if(index >= getEffectCount()) return nullptr; + return std::get<1>(*(std::begin(_effects) + index)); +} + +Effect3DOutline* Effect3DOutline::create() +{ + Effect3DOutline* effect = new Effect3DOutline(); + if(effect && effect->init()) + { + effect->autorelease(); + return effect; + } + else + { + CC_SAFE_DELETE(effect); + return nullptr; + } +} + +bool Effect3DOutline::init() +{ + + GLProgram* glprogram = Effect3DOutline::getOrCreateProgram(); + if(nullptr == glprogram) + { + CC_SAFE_DELETE(glprogram); + return false; + } + _glProgramState = GLProgramState::create(glprogram); + if(nullptr == _glProgramState) + { + return false; + } + _glProgramState->retain(); + _glProgramState->setUniformVec3("OutLineColor", _outlineColor); + _glProgramState->setUniformFloat("OutlineWidth", _outlineWidth); + + return true; +} + +const std::string Effect3DOutline::_vertShaderFile = "Shaders3D/OutLine.vert"; +const std::string Effect3DOutline::_fragShaderFile = "Shaders3D/OutLine.frag"; +const std::string Effect3DOutline::_keyInGLProgramCache = "Effect3DLibrary_Outline"; +GLProgram* Effect3DOutline::getOrCreateProgram() +{ + auto program = GLProgramCache::getInstance()->getGLProgram(_keyInGLProgramCache); + if(program == nullptr) + { + program = GLProgram::createWithFilenames(_vertShaderFile, _fragShaderFile); + GLProgramCache::getInstance()->addGLProgram(program, _keyInGLProgramCache); + } + return program; +} + +Effect3DOutline::Effect3DOutline() +: _outlineWidth(1.0f) +, _outlineColor(1, 1, 1) +{ + +} + +Effect3DOutline::~Effect3DOutline() +{ + +} + +void Effect3DOutline::setOutlineColor(const Vec3& color) +{ + if(_outlineColor != color) + { + _outlineColor = color; + _glProgramState->setUniformVec3("OutLineColor", _outlineColor); + } +} + +void Effect3DOutline::setOutlineWidth(float width) +{ + if(_outlineWidth != width) + { + _outlineWidth = width; + _glProgramState->setUniformFloat("OutlineWidth", _outlineWidth); + } +} + +void Effect3DOutline::drawWithSprite(EffectSprite3D* sprite, const Mat4 &transform) +{ + auto mesh = sprite->getMesh(); + int offset = 0; + for (auto i = 0; i < mesh->getMeshVertexAttribCount(); i++) + { + auto meshvertexattrib = mesh->getMeshVertexAttribute(i); + + _glProgramState->setVertexAttribPointer(s_attributeNames[meshvertexattrib.vertexAttrib], meshvertexattrib.size, meshvertexattrib.type, GL_FALSE, mesh->getVertexSizeInBytes(), (void*)offset); + offset += meshvertexattrib.attribSizeBytes; + } + //draw + { + glEnable(GL_CULL_FACE); + glCullFace(GL_FRONT); + glEnable(GL_DEPTH_TEST); + GL::blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + Color4F color(sprite->getDisplayedColor()); + color.a = sprite->getDisplayedOpacity() / 255.0f; + + _glProgramState->setUniformVec4("u_color", Vec4(color.r, color.g, color.b, color.a)); + + auto mesh = sprite->getMesh(); + glBindBuffer(GL_ARRAY_BUFFER, mesh->getVertexBuffer()); + _glProgramState->apply(transform); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mesh->getIndexBuffer()); + glDrawElements((GLenum)mesh->getPrimitiveType(), mesh->getIndexCount(), (GLenum)mesh->getIndexFormat(), (GLvoid*)0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + glBindBuffer(GL_ARRAY_BUFFER, 0); + glDisable(GL_DEPTH_TEST); + glCullFace(GL_BACK); + glDisable(GL_CULL_FACE); + } +} + +void EffectSprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) +{ + for(auto &effect : _effects) + { + if(std::get<0>(effect) >=0) + break; + CustomCommand &cc = std::get<2>(effect); + cc.func = CC_CALLBACK_0(Effect3D::drawWithSprite,std::get<1>(effect),this,transform); + renderer->addCommand(&cc); + + } + + if(!_defaultEffect) + { + Sprite3D::draw(renderer, transform, flags); + } + else + { + _command.init(_globalZOrder); + _command.func = CC_CALLBACK_0(Effect3D::drawWithSprite, _defaultEffect, this, transform); + renderer->addCommand(&_command); + } + + for(auto &effect : _effects) + { + if(std::get<0>(effect) <=0) + continue; + CustomCommand &cc = std::get<2>(effect); + cc.func = CC_CALLBACK_0(Effect3D::drawWithSprite,std::get<1>(effect),this,transform); + renderer->addCommand(&cc); + + } +} diff --git a/samples/EarthWarrior3D-CSDK/Classes/Sprite3DEffect.h b/samples/EarthWarrior3D-CSDK/Classes/Sprite3DEffect.h new file mode 100755 index 0000000..6e76012 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/Sprite3DEffect.h @@ -0,0 +1,98 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 __Moon3d__Sprite3DEffect__ +#define __Moon3d__Sprite3DEffect__ + +#include + +#include "cocos2d.h" + +USING_NS_CC; + +class EffectSprite3D; + +class Effect3D : public Ref +{ +public: + virtual void drawWithSprite(EffectSprite3D* sprite, const Mat4 &transform) = 0; +protected: + Effect3D() : _glProgramState(nullptr) {} + virtual ~Effect3D() + { + CC_SAFE_RELEASE(_glProgramState); + } +protected: + GLProgramState* _glProgramState; +}; + +class Effect3DOutline: public Effect3D +{ +public: + static Effect3DOutline* create(); + + void setOutlineColor(const Vec3& color); + + void setOutlineWidth(float width); + + void drawWithSprite(EffectSprite3D* sprite, const Mat4 &transform); + +protected: + + Effect3DOutline(); + virtual ~Effect3DOutline(); + + bool init(); + + Vec3 _outlineColor; + float _outlineWidth; +public: + static const std::string _vertShaderFile; + static const std::string _fragShaderFile; + static const std::string _keyInGLProgramCache; + static GLProgram* getOrCreateProgram(); + +}; + +class EffectSprite3D : public Sprite3D +{ +public: + static EffectSprite3D* createFromObjFileAndTexture(const std::string& objFilePath, const std::string& textureFilePath); +// static EffectSprite3D* createFromC3bFileAndTexture(const std::string& objFilePath, const std::string& textureFilePath); + void setEffect3D(Effect3D* effect); + void addEffect(Effect3D* effect, ssize_t order); + void eraseEffect(Effect3D* effect); + ssize_t getEffectCount() const; + Effect3D* getEffect(ssize_t index) const; + virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override; +protected: + EffectSprite3D(); + virtual ~EffectSprite3D(); + + std::vector> _effects; + Effect3D* _defaultEffect; + CustomCommand _command; +}; + +#endif /* defined(__Moon3d__Sprite3DEffect__) */ diff --git a/samples/EarthWarrior3D-CSDK/Classes/consts.h b/samples/EarthWarrior3D-CSDK/Classes/consts.h new file mode 100755 index 0000000..2be36ec --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Classes/consts.h @@ -0,0 +1,50 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://github.com/chukong/EarthWarrior3D + + 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 Moon3d_consts_h +#define Moon3d_consts_h + +#define PLAYER_LIMIT_LEFT -240 +#define PLAYER_LIMIT_RIGHT 240 +#define PLAYER_LIMIT_TOP 737 +#define PLAYER_LIMIT_BOT -376 + +const static Rect BOUND_RECT = Rect(-380,PLAYER_LIMIT_BOT-60,760,PLAYER_LIMIT_TOP-PLAYER_LIMIT_BOT+180 ); +const static Rect ENEMY_BOUND_RECT = Rect(-480,PLAYER_LIMIT_BOT-60,960,PLAYER_LIMIT_TOP-PLAYER_LIMIT_BOT+380 ); +#endif + +enum entityTypes +{ + kPlayerBullet, + kPlayerMissiles, + kEnemyBullet, + + kPlayer, + kEnemy, + + kEnemyFodder, + kEnemyFodderL, + kEnemyBigDude, + kEnemyBoss +}; \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/README.md b/samples/EarthWarrior3D-CSDK/README.md new file mode 100644 index 0000000..24946cc --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/README.md @@ -0,0 +1,62 @@ + + +EarthWarrior3D with Intel CCF +====== + +This is an experimental project from Cocos2d-x, featuring 3D models in a 2d game. + +Using Cocos2d-x 3.2 and `Intel® Common Connectivity Framework SDK 3.0 for Android.` + +The code of this project, Cocos2d-x, Sprite3D are all licensed under MIT + +Musics are copyrighted by [Matthew Pablo](http://www.matthewpablo.com/), and licensed under CC-BY 3.0 + +You may not use any art including 2d and 3d from this project for commercial purpose + +How to get the code +----------------------- +1. Download `Cocos Studio` from here [Windows][1] \ [Mac][2] +2. Run Cocos Studio +3. Click New Project +4. Check the box of Generate Cocos2d-x Project +5. Click Browse button on the right of the Engine path and Click Open as cocos2d-x3.2 path is selected +6. Check the box of INTEL@COMMON CONNECTIVITY FRAMEWORK +7. Click Create +8. Now the code is here `NewCocosProject1/ccfSample` + + +How to start a new game +----------------------- + +1. Download the code from [cocos2d download site][3] +2. Run `setup.py` +3. Run the `cocos` script + +Example: + + $ cd cocos2d-x + $ ./setup.py + $ source FILE_TO_SAVE_SYSTEM_VARIABLE + $ cd /NewCocosProject1/ccfSample/EarthWarrior3D-CSDK/proj.android + $ cocos run -p android -j 4 + +Build Requirements +------------------ + +* Mac OS X 10.7+, Xcode 4.6+ +* or Windows 7+, VS 2012+ +* Python 2.7.5 + + +Runtime Requirements +-------------------- + * iOS 5.0+ for iPhone / iPad games + * Android 2.3+ for Android games + * OS X v10.6+ for Mac games + * Windows 7+ for Win games + + +[1]: http://pan.baidu.com/s/1o67HOCE "Cocos Studio For Win" +[2]: http://pan.baidu.com/s/1hqGH6Kk "Cocos Studio For Mac" +[3]: http://www.cocos2d-x.org/download/version#Cocos2d-x + diff --git a/samples/EarthWarrior3D-CSDK/Resources/CloseNormal.png b/samples/EarthWarrior3D-CSDK/Resources/CloseNormal.png new file mode 100644 index 0000000..5657a13 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/CloseNormal.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/CloseSelected.png b/samples/EarthWarrior3D-CSDK/Resources/CloseSelected.png new file mode 100644 index 0000000..e4c82da Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/CloseSelected.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/Flux2.mp3 b/samples/EarthWarrior3D-CSDK/Resources/Flux2.mp3 new file mode 100755 index 0000000..87d5043 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/Flux2.mp3 differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/HelloWorld.png b/samples/EarthWarrior3D-CSDK/Resources/HelloWorld.png new file mode 100644 index 0000000..5fe89fb Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/HelloWorld.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/LICENSE_03.png b/samples/EarthWarrior3D-CSDK/Resources/LICENSE_03.png new file mode 100755 index 0000000..43eb3ec Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/LICENSE_03.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/Orbital Colossus_0.mp3 b/samples/EarthWarrior3D-CSDK/Resources/Orbital Colossus_0.mp3 new file mode 100755 index 0000000..eb7dbb0 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/Orbital Colossus_0.mp3 differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/Particle.plist b/samples/EarthWarrior3D-CSDK/Resources/Particle.plist new file mode 100755 index 0000000..a20a1ef --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/Particle.plist @@ -0,0 +1,113 @@ + + + + + frames + + defaultTexture.png + + frame + {{143,102},{64,64}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{64,64}} + sourceSize + {64,64} + + engine.jpg + + frame + {{209,129},{25,32}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{25,32}} + sourceSize + {25,32} + + engine2.jpg + + frame + {{209,102},{32,25}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{32,25}} + sourceSize + {32,25} + + toonFlare.png + + frame + {{2,2},{139,127}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{139,127}} + sourceSize + {139,127} + + toonFlare2.png + + frame + {{2,131},{125,125}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{125,125}} + sourceSize + {125,125} + + toonGlow.png + + frame + {{129,168},{120,120}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{120,120}} + sourceSize + {120,120} + + toonSmoke.png + + frame + {{143,2},{110,98}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{110,98}} + sourceSize + {110,98} + + + metadata + + format + 2 + realTextureFileName + Particle.png + size + {255,290} + smartupdate + $TexturePacker:SmartUpdate:9a53de2de5048f80cb6f51c5435ac775:0aa9001dca74ea7885e073f13ec2d231:a81245e6b3ba81a9eb758737b44773a1$ + textureFileName + Particle.png + + + diff --git a/samples/EarthWarrior3D-CSDK/Resources/Particle.png b/samples/EarthWarrior3D-CSDK/Resources/Particle.png new file mode 100755 index 0000000..be053ab Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/Particle.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/Shaders3D/OutLine.frag b/samples/EarthWarrior3D-CSDK/Resources/Shaders3D/OutLine.frag new file mode 100755 index 0000000..dd6e60a --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/Shaders3D/OutLine.frag @@ -0,0 +1,7 @@ +uniform vec3 OutLineColor; +uniform vec4 u_color; + +void main(void) +{ + gl_FragColor = vec4(OutLineColor,1.0) * u_color; +} diff --git a/samples/EarthWarrior3D-CSDK/Resources/Shaders3D/OutLine.vert b/samples/EarthWarrior3D-CSDK/Resources/Shaders3D/OutLine.vert new file mode 100755 index 0000000..52ce3a5 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/Shaders3D/OutLine.vert @@ -0,0 +1,13 @@ +attribute vec4 a_position; +attribute vec3 a_normal; +uniform float OutlineWidth; + +void main(void) +{ + vec4 pos = CC_MVPMatrix * a_position; + vec4 normalproj = CC_MVPMatrix * vec4(a_normal, 0); + normalproj = normalize(normalproj); + pos.xy += normalproj.xy * (OutlineWidth * (pos.z * 0.25)); + + gl_Position = pos; +} diff --git a/samples/EarthWarrior3D-CSDK/Resources/Star Chaser (2012).mp3 b/samples/EarthWarrior3D-CSDK/Resources/Star Chaser (2012).mp3 new file mode 100755 index 0000000..a22265d Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/Star Chaser (2012).mp3 differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/Star_Chaser.mp3 b/samples/EarthWarrior3D-CSDK/Resources/Star_Chaser.mp3 new file mode 100755 index 0000000..a22265d Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/Star_Chaser.mp3 differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/backtotopnormal.png b/samples/EarthWarrior3D-CSDK/Resources/backtotopnormal.png new file mode 100644 index 0000000..9f20e33 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/backtotopnormal.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/backtotoppressed.png b/samples/EarthWarrior3D-CSDK/Resources/backtotoppressed.png new file mode 100644 index 0000000..5fc8d41 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/backtotoppressed.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/boom.mp3 b/samples/EarthWarrior3D-CSDK/Resources/boom.mp3 new file mode 100755 index 0000000..23c0bd1 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/boom.mp3 differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/boom2.mp3 b/samples/EarthWarrior3D-CSDK/Resources/boom2.mp3 new file mode 100755 index 0000000..b5e51a7 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/boom2.mp3 differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/boss.c3b b/samples/EarthWarrior3D-CSDK/Resources/boss.c3b new file mode 100755 index 0000000..756c9d0 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/boss.c3b differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/boss.png b/samples/EarthWarrior3D-CSDK/Resources/boss.png new file mode 100755 index 0000000..7073a96 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/boss.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/bossCannon.c3b b/samples/EarthWarrior3D-CSDK/Resources/bossCannon.c3b new file mode 100755 index 0000000..817684b Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/bossCannon.c3b differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/bullets.png b/samples/EarthWarrior3D-CSDK/Resources/bullets.png new file mode 100755 index 0000000..9836bd2 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/bullets.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/coco.png b/samples/EarthWarrior3D-CSDK/Resources/coco.png new file mode 100755 index 0000000..a7e368f Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/coco.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/coconut.c3b b/samples/EarthWarrior3D-CSDK/Resources/coconut.c3b new file mode 100755 index 0000000..de98f4c Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/coconut.c3b differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/credits_03.png b/samples/EarthWarrior3D-CSDK/Resources/credits_03.png new file mode 100755 index 0000000..4cf8e73 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/credits_03.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/daodan_32.png b/samples/EarthWarrior3D-CSDK/Resources/daodan_32.png new file mode 100755 index 0000000..edf1e98 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/daodan_32.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/daodanv001.c3b b/samples/EarthWarrior3D-CSDK/Resources/daodanv001.c3b new file mode 100755 index 0000000..8832c77 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/daodanv001.c3b differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/debris.plist b/samples/EarthWarrior3D-CSDK/Resources/debris.plist new file mode 100755 index 0000000..2a07fde --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/debris.plist @@ -0,0 +1,121 @@ + + + + + angle + 0.0 + angleVariance + 180.0 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + debris + duration + 0.01 + emitterType + 0 + finishColorAlpha + 1.0 + finishColorBlue + 0.3294117748737335 + finishColorGreen + 0.5843137502670288 + finishColorRed + 0.9725490808486938 + finishColorVarianceAlpha + 0.0 + finishColorVarianceBlue + 0.0 + finishColorVarianceGreen + 0.0 + finishColorVarianceRed + 0.0 + finishParticleSize + 0.0 + finishParticleSizeVariance + 0.0 + gravityx + 0.0 + gravityy + 0.0 + maxParticles + 2000 + maxRadius + 0 + maxRadiusVariance + 0.0 + metaData + + yCoordFlippedConverted + 1 + + minRadius + 300 + minRadiusVariance + 0.0 + particleLifespan + 1 + particleLifespanVariance + 0.1 + radialAccelVariance + 0.0 + radialAcceleration + 120 + rotatePerSecond + 360 + rotatePerSecondVariance + 0.0 + rotationEnd + 0.0 + rotationEndVariance + 2507.94091796875 + rotationStart + 0.0 + rotationStartVariance + 0.0 + sourcePositionVariancex + 7.0 + sourcePositionVariancey + 7.0 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 70.0 + speedVariance + 40.0 + startColorAlpha + 1.0 + startColorBlue + 0.3294117748737335 + startColorGreen + 0.5843137502670288 + startColorRed + 0.9725490808486938 + startColorVarianceAlpha + 0.0 + startColorVarianceBlue + 0.0 + startColorVarianceGreen + 0.0 + startColorVarianceRed + 0.0 + startParticleSize + 30.13698577880859 + startParticleSizeVariance + 24.49315071105957 + tangentialAccelVariance + 0.0 + tangentialAcceleration + 0.0 + textureFileName + debris.png + textureImageData + H4sIAAAAAAAAA+2dB3xUZdq+z0wqKUAKHUKAQGgBQk1AICFAKIEAoYUihCQkAVIICaF36U16R4r0JkgVkCqiSFNBxQIioqvr4rqoq67+r8yz83pyJkF2v/3/SDD39/vY45Rz5lzv/d7P856ZzHTqpNXUtMN+WqEKVahCFapQhS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B2w9OKyhsvWL3dZnrn89oqIFUdW+q1cuPKXVYmr3l3davXeNeXXzFrzw9q4tdfXhazbs77C+jnrf3oh6YX3NoRvOLSx2sZlmxw3jdz0+eaemy+8GPTi9i1lt8zZ8q+tKVtvb+u27dz2Jtu37yi/Y8FO887MnV/u6rfr6u7Wu4/sCdizYW/JvXP2afsy9/3lpYEv3djfcf+ZA0EH9rxc9eU1B70Ozj5kOjT60IPDiYdvH4k+cu1oh6NnjjU7dvCVOq9sPV7p+OoTJU4sOOlyctrJ314d8+rDU2mnvj6dcPrumQFnbp3tffadc13PXT7f8fzrr7V97eyF0Auvvt789eMXm148+kbQG4ffbPzmoUuNLh18q9FbBy83vnzoSpMrR64GXz127ZlrJ6+3vH767dZvv/ZO+3fefLfzu9du9Ljx3s1+N2+/F/feF+8Pe//bD0Z+8POtSR86fDj7o+IfLfu4/McbP6nxyd7bjW+fuNP6zqVPoz69dTf27lefjfjsl3vTPnf/fNn9ive3f1H/i+Nftv3y6l/6/uXeV2lf/fz19L96/HXNN9W/eflvIX+79KD3g3vfpn/729/nflfmu63/aPiPMw+7PPz4++Tvf/5h9o9lftz2z6B/Xvip10/3f876xemXFf+q8a9jv3b89cPfkn/77f8BQ84SDBrEAAA= + yCoordFlipped + -1 + + diff --git a/samples/EarthWarrior3D-CSDK/Resources/diji02_v002_128.png b/samples/EarthWarrior3D-CSDK/Resources/diji02_v002_128.png new file mode 100755 index 0000000..1c75b23 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/diji02_v002_128.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/diji1_v002.c3b b/samples/EarthWarrior3D-CSDK/Resources/diji1_v002.c3b new file mode 100755 index 0000000..cf30ac0 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/diji1_v002.c3b differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/dijiyuanv001.c3b b/samples/EarthWarrior3D-CSDK/Resources/dijiyuanv001.c3b new file mode 100644 index 0000000..2180a0a Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/dijiyuanv001.c3b differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/dijiyuanv001.png b/samples/EarthWarrior3D-CSDK/Resources/dijiyuanv001.png new file mode 100755 index 0000000..f8cb9c5 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/dijiyuanv001.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/emission.plist b/samples/EarthWarrior3D-CSDK/Resources/emission.plist new file mode 100755 index 0000000..7eb9b06 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/emission.plist @@ -0,0 +1,117 @@ + + + + + angle + 90 + angleVariance + 0.0 + blendFuncDestination + 771 + blendFuncSource + 1 + configName + emission + duration + -1.0 + emitterType + 0 + finishColorAlpha + 0.5 + finishColorBlue + 0.2 + finishColorGreen + 0.2 + finishColorRed + 0.2 + finishColorVarianceAlpha + 1.0 + finishColorVarianceBlue + 0.0 + finishColorVarianceGreen + 0.0 + finishColorVarianceRed + 0.0 + finishParticleSize + 6 + finishParticleSizeVariance + 5.6301383972168 + gravityx + 0.0 + gravityy + 0.0 + maxParticles + 20.0 + maxRadius + 0 + maxRadiusVariance + 0.0 + metaData + + yCoordFlippedConverted + 1 + + minRadius + 300 + minRadiusVariance + 0.0 + particleLifespan + 0.12046928524971 + particleLifespanVariance + 0.0591566780209541 + radialAccelVariance + 0.0 + radialAcceleration + 0.0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0.0 + rotationEnd + 0.0 + rotationEndVariance + 0.0 + rotationStart + 0.0 + rotationStartVariance + 0.0 + sourcePositionVariancex + 7.0 + sourcePositionVariancey + 0.0 + sourcePositionx + 0.0 + sourcePositiony + 0.0 + speed + 600 + speedVariance + 26.32705497741699 + startColorAlpha + 1.0 + startColorBlue + 0.0 + startColorGreen + 0.681643104553223 + startColorRed + 1.0 + startColorVarianceAlpha + 0.0 + startColorVarianceBlue + 0.0 + startColorVarianceGreen + 0.0 + startColorVarianceRed + 0.0 + startParticleSize + 18.5890407562256 + startParticleSizeVariance + 10 + tangentialAccelVariance + 0.0 + tangentialAcceleration + 0.0 + yCoordFlipped + -1 + + diff --git a/samples/EarthWarrior3D-CSDK/Resources/emissionPart.plist b/samples/EarthWarrior3D-CSDK/Resources/emissionPart.plist new file mode 100755 index 0000000..e95595f --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/emissionPart.plist @@ -0,0 +1,119 @@ + + + + + angle + 90 + angleVariance + 74.1731338500977 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + emissionPart + duration + -1.0 + emitterType + 0 + finishColorAlpha + 0.0 + finishColorBlue + 1 + finishColorGreen + 0.982483446598053 + finishColorRed + 0.0 + finishColorVarianceAlpha + 0.0 + finishColorVarianceBlue + 0.0 + finishColorVarianceGreen + 0.0 + finishColorVarianceRed + 0.0 + finishParticleSize + 0.0 + finishParticleSizeVariance + 0.0 + gravityy + 0.0 + maxParticles + 100 + maxRadius + 0 + maxRadiusVariance + 0.0 + metaData + + yCoordFlippedConverted + 1 + + minRadius + 300 + minRadiusVariance + 0.0 + particleLifespan + 1 + particleLifespanVariance + 0.0 + radialAccelVariance + 0.0 + radialAcceleration + 250 + rotatePerSecond + 360 + rotatePerSecondVariance + 0.0 + rotationEnd + 0.0 + rotationEndVariance + 0.0 + rotationStart + 0.0 + rotationStartVariance + 0.0 + sourcePositionVariancex + 5.0 + sourcePositionVariancey + 5.0 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 225 + speedVariance + 30.0 + startColorAlpha + 1.0 + startColorBlue + 1.0 + startColorGreen + 0.982483446598053 + startColorRed + 0.0 + startColorVarianceAlpha + 0.0 + startColorVarianceBlue + 0.0 + startColorVarianceGreen + 0.0 + startColorVarianceRed + 0.0 + startParticleSize + 2 + startParticleSizeVariance + 5 + tangentialAccelVariance + 0.0 + tangentialAcceleration + 0.0 + textureFileName + emissionPart.png + textureImageData + H4sIAAAAAAAAA+1bB1RURxd+byu9g1RZpINUpVtoKoiKI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13CXxpeu/Zf32rKHgsublkiuWV8qvel7deq37tdrfh/zecD3j+tMbhTd1by685XDr+9uBtw82DmpsuJN5R3p3xj2Te8vvd7xf3dS36ZcHaQ+ePpz+yOTRise+j2ueDHxy5WneM+GzuX84/lH1POL5eWmaVPo/LX7Mrg5NAAA= + yCoordFlipped + -1 + + diff --git a/samples/EarthWarrior3D-CSDK/Resources/engine.plist b/samples/EarthWarrior3D-CSDK/Resources/engine.plist new file mode 100755 index 0000000..cc98bde --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/engine.plist @@ -0,0 +1,121 @@ + + + + + angle + 90 + angleVariance + 0.0 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + engine + duration + -1.0 + emitterType + 0 + finishColorAlpha + 1.0 + finishColorBlue + 1.0 + finishColorGreen + 0.6765730977058411 + finishColorRed + 0.0 + finishColorVarianceAlpha + 0.0 + finishColorVarianceBlue + 0.0 + finishColorVarianceGreen + 0.0 + finishColorVarianceRed + 0.0 + finishParticleSize + 44.0 + finishParticleSizeVariance + 0.0 + gravityx + 0.0 + gravityy + 0.0 + maxParticles + 4.0 + maxRadius + 0 + maxRadiusVariance + 0.0 + metaData + + yCoordFlippedConverted + 1 + + minRadius + 300 + minRadiusVariance + 0.0 + particleLifespan + 0.1 + particleLifespanVariance + 0.02 + radialAccelVariance + 0.0 + radialAcceleration + 0.0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0.0 + rotationEnd + 0.0 + rotationEndVariance + 0.0 + rotationStart + 0.0 + rotationStartVariance + 0.0 + sourcePositionVariancex + 2.0 + sourcePositionVariancey + 0.0 + sourcePositionx + 160.0 + sourcePositiony + 240.0 + speed + 450 + speedVariance + 0.0 + startColorAlpha + 1.0 + startColorBlue + 0.1147350147366524 + startColorGreen + 0.1511431336402893 + startColorRed + 1.0 + startColorVarianceAlpha + 0.0 + startColorVarianceBlue + 0.0 + startColorVarianceGreen + 0.0 + startColorVarianceRed + 0.0 + startParticleSize + 64.0 + startParticleSizeVariance + 5.0 + tangentialAccelVariance + 0.0 + tangentialAcceleration + 0.0 + textureFileName + engine.png + textureImageData + H4sIAAAAAAAAA51XB0AU19a+03dne4WFrfTepBcFKYKAKFVRFFxWirAg1RZ7UIGIsRC7sURFE000ohJj7MYSC7HEGozPqNEkJMZe+O/MgpK85P/f/y7fLoeZe88593SSk4EbANxCBIC/BbOYXyhAUYDgACMATgKcYP5Ee+2DNAYA/pfz7CkcBQTK7rCgm2X3OXYhKOQMQTLAKUaEZS/CskX/BKRbrT+LBgQL3AIEwVggOEpgGAMUozCcC4FAEByAoQgG3qCbM9QXg2+6uWA9YAQiFAMoAiEBQrDAUBTHcRICY8DBCS5K0BAIyUUoApAoIHFAIAxYjhZBUH8U6eaM96CbP2SLwrsTrClwFMcgAASJIxQFOBxA8wCf3wsCwOMxoGnApQGHZkzHnMWYmyBvjdStM8oCmhonLJwRAmdU5ZIIn4MK+YhEiEoliEyGKJRAYY3IrYHMCsgViEyBSRW4VAF4IkDzAZcHKA4rq5ftGPMxd4PXRHEEx1HG6hwc4xKYkMbFfFwuwa2VpI0KV6sJnR7T2RFaBqTGjqu1pzUGnsZAKW1JhTUmkwGRkLkUyUZaj8cZ06FspDA3gPIxgseFzFGJEFPKcRtrXKshDHaEvSPu5II5ueDOrhCkswfH2Y12dhc4uXHtnCidAbO1BUo5EAsBh7SEWe+whQFAEBhJ4ihJ4Hw+KVdgCitgbYMbHDEHV+DoTnj44p7epL8/GRiIBfjjgUF0aKgoLFwSFqqICFdGhMqD+vDdHUlbJS7iQVYwLlnDMPpjGIKirKFwHHC4gC+CnIHWABzcUG9/1D8MD+tPxyZyYuP4g5KF6al0ehqdmS4enmWVM9w6J1uVnalMG6RIilPEhCsDfMR6Dc3n4WweWZyNEGwGQQNxuQD6y9oW8/DihvfjJySJ0ocJh+dJ8ottKmpUVbW6qVMM9XXahjmq+jrbxjmGeQ32jXPcmubaT51oU1aozMkSRfXFDAbAFaJM5Pd4mSQZ15MUkMpIBydZWITtoCG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hm5+nA061ngs7sPhtytu1c+Ll97f3aD3wb8+3R8wnnT14YdOHcxYyL310acanju/zv7l4uufzblZorL65Ou0Zcq78uvt58Q31j7feu32/rCOz48mbMzVM/pP1w9Zbx1v1/Vf7r5e1ZPwp+bL6ju9Ny1+/u3ntx987+NPyn2/fL7794UPez5OcVv7j88vmvkb+e6hzaefu3it+6fm98qHq48Q//Pw4+GvzoxuPSxy+e1D9VPd30LPjZsedZz++8qH1JvVzyyvVV2+vE19e6Sru6/gdwzHodXhYAAA== + yCoordFlipped + -1 + + diff --git a/samples/EarthWarrior3D-CSDK/Resources/explodeEffect.mp3 b/samples/EarthWarrior3D-CSDK/Resources/explodeEffect.mp3 new file mode 100755 index 0000000..6c48679 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/explodeEffect.mp3 differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/flare.plist b/samples/EarthWarrior3D-CSDK/Resources/flare.plist new file mode 100755 index 0000000..95142b5 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/flare.plist @@ -0,0 +1,121 @@ + + + + + angle + 0.0 + angleVariance + 0.0 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + flare + duration + 0.01 + emitterType + 0 + finishColorAlpha + 0.0 + finishColorBlue + 1.0 + finishColorGreen + 1.0 + finishColorRed + 0.9999960064888 + finishColorVarianceAlpha + 1.0 + finishColorVarianceBlue + 0.0 + finishColorVarianceGreen + 0.0 + finishColorVarianceRed + 0.0 + finishParticleSize + 0.0 + finishParticleSizeVariance + 0.0 + gravityx + 0.0 + gravityy + 0.0 + maxParticles + 1316.673828125 + maxRadius + 0 + maxRadiusVariance + 0.0 + metaData + + yCoordFlippedConverted + 1 + + minRadius + 300 + minRadiusVariance + 0.0 + particleLifespan + 0.6 + particleLifespanVariance + 0.158187055587769 + radialAccelVariance + 0.0 + radialAcceleration + 0.0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0.0 + rotationEnd + 0.0 + rotationEndVariance + 0.0 + rotationStart + 0.0 + rotationStartVariance + 65.10166931152344 + sourcePositionVariancex + 0.0 + sourcePositionVariancey + 0.0 + sourcePositionx + 0.0 + sourcePositiony + 0.0 + speed + 0.0 + speedVariance + 0.0 + startColorAlpha + 1.0 + startColorBlue + 0.3294117748737335 + startColorGreen + 0.5843137502670288 + startColorRed + 0.9725490808486938 + startColorVarianceAlpha + 1.0 + startColorVarianceBlue + 0.0 + startColorVarianceGreen + 0.0 + startColorVarianceRed + 0.0 + startParticleSize + 100 + startParticleSizeVariance + 50 + tangentialAccelVariance + 0.0 + tangentialAcceleration + 0.0 + textureFileName + flare.png + textureImageData + H4sIAAAAAAAAA+2dB3xUVdrG70waBEJL6C30joB0pNfQexOVkFBCCSE0QRREFhVYUUREUFFURFCsFLEjVlgERLCL67Lq6rq4rr3MN/+LTzzebyaZhCQzCeDvODczt5x73uc87/O+59xzBwywGlqu2Pcty/KcL+eLisvl+lMJdn3Ol9As53FyvmRVhA23222X81g5X3wVJ06EFX/7Bru+ed0Owa5HqBYnRrLilMLOOYX53nIDJ2FhYXbJilOElcKMl8J6X7mBE0p4eHgGVrJqJ18cFOx7yYs2KUz3lRvtkR0+8Xd8YeOY81j5s52xcUREhCcyMjJgPvF3DjipMOHF7APBrkuwcSKfA06Eleza2KlzsstN+XnPOcGKif9g30OwcEIbwAXig+xyiq9zmudVG4dKO+f0vs6mXQpykU2xZVRUlF3Yzo32yMtz59a9Z7cO1Bu+5T7OJT9k8gn3X6xYMU90dHSucqzzGiZvBRsvqlt26iDscy/Brn9+FekJ6RIV9ZfcbANTv3ANk2OCqXtzEgPLB2Wm5QrLmJnqr/stWbKkJyYmxt7Oy75u+iP4i+uaeAlWH3XG9oHcB3UuVapUBrcUVqzILvI5cXFxtt3yg1N96RdKXuM0qzopVgsUK+yrejuxYmKkoOYKTN3AfYITlZzGxmdbD64Lp9FH0Ul54f8CKdnhFtWfNqTOznYr6Fgx7QM2KlSo4ClTpoy9HQz7mPwCVsqWLWvjxYyT8r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nc7vDeIxcdefZo56MvvNnjzZePJRw78NbAt44cH3H87RPjTpx8O/ntz96Z/s7X78579+f3lrwf8f6KD0p9sO7DKh9u/qjBRw+fbH3ymY97fHzw78P+/t4nSZ988Y/Z//jl1LJ/xvxz3afVP33gsxafPf15r88P/+vif536Iu2Ln79c/u/S/779q/pfPfGfLv85eHr06VNfp3/t+e+qbyp+c///Wv5v37eDv/3wuxnf/fz9ih8q/rD1x7Y/vvLTqJ8+/Xn+L1G/rP+1wa97f+v32/ueGR5PWmJ6oi0FiAjckyZZ1n/vt6yYMZYVe9iyokuc0cP2P9cZDW+diUb8bJ/RzPa/1pa1pYtljXjesvossayNaBDvdhlvQRoN72K5L7wwo/z+b/akC1ucOVdxr6qM+MHj+aaqZUXttaxf0z2en+/weH6911vZdyzr+VlndDj/+jexrMi/dO/fosWBYZdPtBz//g/xLTIKXiEBAA== + yCoordFlipped + -1 + + diff --git a/samples/EarthWarrior3D-CSDK/Resources/fonts/Marker Felt.ttf b/samples/EarthWarrior3D-CSDK/Resources/fonts/Marker Felt.ttf new file mode 100755 index 0000000..3752ef3 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/fonts/Marker Felt.ttf differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/gameover.plist b/samples/EarthWarrior3D-CSDK/Resources/gameover.plist new file mode 100755 index 0000000..77c1282 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/gameover.plist @@ -0,0 +1,113 @@ + + + + + frames + + H_Frame.png + + frame + {{2,380},{640,90}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{640,90}} + sourceSize + {640,90} + + V_Frame.png + + frame + {{2,2},{40,960}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{40,960}} + sourceSize + {40,960} + + flash.png + + frame + {{644,336},{110,103}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{110,103}} + sourceSize + {110,103} + + gameover_backtomenu.png + + frame + {{460,103},{232,93}} + offset + {-1,1} + rotated + + sourceColorRect + {{0,0},{232,93}} + sourceSize + {234,95} + + gameover_playagain.png + + frame + {{555,103},{231,93}} + offset + {5,1} + rotated + + sourceColorRect + {{13,0},{231,93}} + sourceSize + {247,95} + + gameover_score.png + + frame + {{644,44},{250,57}} + offset + {4,0} + rotated + + sourceColorRect + {{9,2},{250,57}} + sourceSize + {260,61} + + gameover_score_bk.png + + frame + {{2,44},{456,334}} + offset + {6,-2} + rotated + + sourceColorRect + {{18,22},{456,334}} + sourceSize + {480,374} + + + metadata + + format + 2 + realTextureFileName + gameover.png + size + {964,472} + smartupdate + $TexturePacker:SmartUpdate:11f2668da9d0917be2363861ecec2d64:e8003d57058ca2add3fb600b1ef3b73c:18314cdd2091d1ee52f21fb1c615ddab$ + textureFileName + gameover.png + + + diff --git a/samples/EarthWarrior3D-CSDK/Resources/gameover.png b/samples/EarthWarrior3D-CSDK/Resources/gameover.png new file mode 100755 index 0000000..9aa5cd0 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/gameover.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/gameover_score_num.fnt b/samples/EarthWarrior3D-CSDK/Resources/gameover_score_num.fnt new file mode 100755 index 0000000..7685924 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/gameover_score_num.fnt @@ -0,0 +1,14 @@ +info face="Arial" size=32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 outline=0 +common lineHeight=32 base=26 scaleW=256 scaleH=256 pages=1 packed=0 alphaChnl=1 redChnl=0 greenChnl=0 blueChnl=0 +page id=0 file="gameover_score_num_0.png" +chars count=10 +char id=48 x=0 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=49 x=35 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=50 x=70 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=51 x=105 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=52 x=140 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=53 x=175 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=54 x=210 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=55 x=0 y=38 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=56 x=35 y=38 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=57 x=70 y=38 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 diff --git a/samples/EarthWarrior3D-CSDK/Resources/gameover_score_num_0.png b/samples/EarthWarrior3D-CSDK/Resources/gameover_score_num_0.png new file mode 100755 index 0000000..f4e0dc0 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/gameover_score_num_0.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/glow.plist b/samples/EarthWarrior3D-CSDK/Resources/glow.plist new file mode 100755 index 0000000..80149db --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/glow.plist @@ -0,0 +1,121 @@ + + + + + angle + 0.0 + angleVariance + 0.0 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + glow + duration + 0.01 + emitterType + 0 + finishColorAlpha + 0.0 + finishColorBlue + 0.3294117748737335 + finishColorGreen + 0.5843137502670288 + finishColorRed + 0.9725490808486938 + finishColorVarianceAlpha + 0.0 + finishColorVarianceBlue + 0.0 + finishColorVarianceGreen + 0.0 + finishColorVarianceRed + 0.0 + finishParticleSize + 218.75341796875 + finishParticleSizeVariance + 0.0 + gravityx + 0.0 + gravityy + 0.0 + maxParticles + 144.3172149658203 + maxRadius + 0 + maxRadiusVariance + 0.0 + metaData + + yCoordFlippedConverted + 1 + + minRadius + 300 + minRadiusVariance + 0.0 + particleLifespan + 0.4 + particleLifespanVariance + 0.1 + radialAccelVariance + 0.0 + radialAcceleration + 0.0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0.0 + rotationEnd + 0.0 + rotationEndVariance + 319.0068359375 + rotationStart + 0.0 + rotationStartVariance + 29.20376586914062 + sourcePositionVariancex + 0.0 + sourcePositionVariancey + 0.0 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 0.0 + speedVariance + 0.0 + startColorAlpha + 1.0 + startColorBlue + 0.3294117748737335 + startColorGreen + 0.5843137502670288 + startColorRed + 0.9725490808486938 + startColorVarianceAlpha + 0.0 + startColorVarianceBlue + 0.0 + startColorVarianceGreen + 0.0 + startColorVarianceRed + 0.0 + startParticleSize + 116.0 + startParticleSizeVariance + 73.08219146728516 + tangentialAccelVariance + 0.0 + tangentialAcceleration + 0.0 + textureFileName + glow.png + textureImageData + H4sIAAAAAAAAA+2dB3wU1drGZzedJJQkhA6h19BL6L2D9CotJAFCCSEkdAUUUcoFpBcRQQQCCIh0EKlSpUlRmiAiIKggUgTE78k8N+89zG6W3SUQ9OO9v7uebDazM//zzPO+58yZoXFjrZCmLdmrvYpX8Spexat4Fa/inxAmm5HSe/fPC9s87Y+UPo6XLpIL7CvmlvEC2P6/Be40HPOTIW++Ym4Zz8jW0fh/CPx5I00u4CnNyclIWbzOMU9pZg7HS4XXMv4FwF9ywob4x6G2LY9kYeJiEcmyWXPStFMaqpVIXsKWSJ2Ifx/tZyecFCs3JVwtwu3JwDv8EzacY/5y0n52GatIhY+QdLcjDKjVTnFa5C8V7WchbBCtygev9uC1h7/0lxO0XxLOTkO2SjhZwNoDXD1rnKOdspAdwivO8FREnp6eXnaHh4eHndgd0nZKCdtRyIakZoOwJVVvb29fPXwSA++kSiLsx24Q9lOZv3jUDkE2WATDBmGwAklSJd7UqVOnSQy0+Y4hpBf4W/nRQN6A3TJv2tb2C+NstU/thGzDhIUwIatgGenSpfP39/fz80ubNi3fSftkqB/Gj/i8dIoqftsiFzNJcdROQLbhEmIRhAAgJAxQQpWEAwIC0usRoId/Eo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cib9a8uqWa3WuHfn59Z8vX4++/vDG6F/S/fLBrwV+XfNbtd8O3mx78/KtmFt//z7+dqbbi/8o/ceOO03vnL/b5+7De2PvZ7q/5M+QP/c8aPPgysOBjzwezfyr4F+bHjd8fPbvPn///X9z/R6JvrUAAA== + yCoordFlipped + -1 + + diff --git a/samples/EarthWarrior3D-CSDK/Resources/groundLevel.jpg b/samples/EarthWarrior3D-CSDK/Resources/groundLevel.jpg new file mode 100755 index 0000000..8c84ed4 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/groundLevel.jpg differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/hit.mp3 b/samples/EarthWarrior3D-CSDK/Resources/hit.mp3 new file mode 100755 index 0000000..da48311 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/hit.mp3 differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/listviewbg.png b/samples/EarthWarrior3D-CSDK/Resources/listviewbg.png new file mode 100644 index 0000000..ddbe14b Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/listviewbg.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/loadingAndHP.plist b/samples/EarthWarrior3D-CSDK/Resources/loadingAndHP.plist new file mode 100755 index 0000000..d1bd8b9 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/loadingAndHP.plist @@ -0,0 +1,126 @@ + + + + + frames + + fog.png + + frame + {{644,391},{10,570}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{10,570}} + sourceSize + {10,570} + + hp.png + + frame + {{851,2},{60,205}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{60,205}} + sourceSize + {60,205} + + hp_above.png + + frame + {{644,2},{60,205}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{60,205}} + sourceSize + {60,205} + + hp_empty.png + + frame + {{656,480},{116,317}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{116,317}} + sourceSize + {116,317} + + loading_bk.png + + frame + {{2,2},{640,963}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{640,963}} + sourceSize + {640,963} + + loading_progress_bk.png + + frame + {{850,209},{694,72}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{694,72}} + sourceSize + {694,72} + + loading_progress_thumb.png + + frame + {{656,391},{136,87}} + offset + {0,33} + rotated + + sourceColorRect + {{0,9},{136,87}} + sourceSize + {136,171} + + right_top_ui.png + + frame + {{644,64},{204,325}} + offset + {0,3} + rotated + + sourceColorRect + {{0,0},{204,325}} + sourceSize + {204,331} + + + metadata + + format + 2 + realTextureFileName + loadingAndHP.png + size + {924,967} + smartupdate + $TexturePacker:SmartUpdate:8bfd7f3339041af832a641e3dff393bc:19bdda24356f17c17fe67fedafee3eed:c7075d6d293b33f3dbac134af37823d9$ + textureFileName + loadingAndHP.png + + + diff --git a/samples/EarthWarrior3D-CSDK/Resources/loadingAndHP.png b/samples/EarthWarrior3D-CSDK/Resources/loadingAndHP.png new file mode 100755 index 0000000..9f8fb0e Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/loadingAndHP.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/menuEmission.plist b/samples/EarthWarrior3D-CSDK/Resources/menuEmission.plist new file mode 100755 index 0000000..4b176b5 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/menuEmission.plist @@ -0,0 +1,121 @@ + + + + + angle + 40 + angleVariance + 0.0 + blendFuncDestination + 1 + blendFuncSource + 771 + configName + Untitled 1 + duration + -1.0 + emitterType + 0 + finishColorAlpha + 0.0 + finishColorBlue + 0.0 + finishColorGreen + 0.0 + finishColorRed + 0.0 + finishColorVarianceAlpha + 0.0 + finishColorVarianceBlue + 0.0 + finishColorVarianceGreen + 0.0 + finishColorVarianceRed + 0.0 + finishParticleSize + 0.0 + finishParticleSizeVariance + 0.0 + gravityx + 0.0 + gravityy + 0.0 + maxParticles + 10.54152393341064 + maxRadius + 0 + maxRadiusVariance + 0.0 + metaData + + yCoordFlippedConverted + 1 + + minRadius + 300 + minRadiusVariance + 0.0 + particleLifespan + 1 + particleLifespanVariance + 0.0 + radialAccelVariance + 0.0 + radialAcceleration + 0.0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0.0 + rotationEnd + 0.0 + rotationEndVariance + 0.0 + rotationStart + 0.0 + rotationStartVariance + 0.0 + sourcePositionVariancex + 0.0 + sourcePositionVariancey + 0.0 + sourcePositionx + 160.0 + sourcePositiony + 240.0 + speed + 50 + speedVariance + 0.0 + startColorAlpha + 0.5 + startColorBlue + 0.8382235169410706 + startColorGreen + 0.5797151327133179 + startColorRed + 0.4444800615310669 + startColorVarianceAlpha + 0.5052975416183472 + startColorVarianceBlue + 0.0 + startColorVarianceGreen + 0.0 + startColorVarianceRed + 0.0 + startParticleSize + 64.0 + startParticleSizeVariance + 5.0 + tangentialAccelVariance + 0.0 + tangentialAcceleration + 0.0 + textureFileName + defaultTexture.png + textureImageData + H4sIAAAAAAAAA+1bB1RURxd+byu9g1RZpINUpVtoKoiKIqJYorisdESqLRINkihGjSHEFo0EC/ZoRCRWLMRoFHuPEIMlNizY4/5z3fvic7MrmJic84vr+Tjj7My997tt5i1L796UE0UFqlD/wUsqldJvgv/CJrTr35KrjBunGfyn/nib/FvIldsMmvXJWzOYejv8X8OZzYsnB74c5N9X5pO36od/wl8Jb3m+DD8BQtgMmHXyfpH3xVvxw9/h3wLe8nxVCFQRaiyoI9hzzDoVBf546354U/4t5M3mzPDUINAk0CLQVgItXKPB8ou8L17rh3+TvxLu8rwZzgxf4KVDoEugR6BPYEBgKAcDfE8P1+rgXsYfjC8U+eFv+6Al/BXkOzvminhrof16yMuIwJjAhMCUwIzAnMACYY5zprjGGPcYoAwdlKnID/K58Eb10Bz/FsRcRY63LsaR4WyGHC0JrAisCWwIbOVgg+9Z4VoL3Mv4Qh9ls/2g8k9zoYX8FXFnYq6OOarD4m2CMbVETsDPgcCJoD2BK4EbgTvCDefa4xoH3GONMsxRJuMHHdSpzsoFhT74J/ylf815ee4QB23MUUM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+Okzj8/mfiadOWrmoVnesxbNFsxOn33y866fr5ijO2f8nEtf9P6iolhUPL34/pfDv9xf0rFk8VdqX+V8VTe319zKeTbzZs97Nj9x/okFwQvWLTRfOG3hw6/jvz66KHDR2sUWi4sWP/km6ZvTS3osqSi1Ky35VvBt7reXy2LKapb6Li1fZrqsaNkfy9OX162IWrGn3Ke8fKX5ylmrOKtyVl1bPXR17ZrQNZVrXdYuWWe0rmg9tT5n/e/fjfju5IaIDdUbfTeu/d72+4Wb9DdNr6ArxlU0bk7cXFcZW3lkS88t1VUBVZt+cP1h+VarrQu2GW6btV1te8F26Y7xO5p2Zuy8sSth16Xq4dXndg/afXxPvz2H9kbs/XFf9327a4JqdvzY+cet+/33b/nJ96fNB7wPVBz0OrjpZ6+fNx3yPlRx2OdwZa1fbdWRTke2H+16dNex0GP7jocfP3Ciz4kjJwecPH1q6Km60/Gnr55JPXPnbO7Zp+c+Os8/P/2CzoWSX8x/Kb3oeHFdnXfdtvrQ+oO/9v/13CXxpeu/Zf32rKHgsublkiuWV8qvel7deq37tdrfh/zecD3j+tMbhTd1by685XDr+9uBtw82DmpsuJN5R3p3xj2Te8vvd7xf3dS36ZcHaQ+ePpz+yOTRise+j2ueDHxy5WneM+GzuX84/lH1POL5eWmaVPo/LX7Mrg5NAAA= + yCoordFlipped + -1 + + diff --git a/samples/EarthWarrior3D-CSDK/Resources/menu_scene.plist b/samples/EarthWarrior3D-CSDK/Resources/menu_scene.plist new file mode 100755 index 0000000..1b99254 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/menu_scene.plist @@ -0,0 +1,74 @@ + + + + + frames + + credits.png + + frame + {{436,645},{215,90}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{215,90}} + sourceSize + {215,90} + + license.png + + frame + {{219,645},{215,90}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{215,90}} + sourceSize + {215,90} + + mainmenu_BG.png + + frame + {{2,2},{641,964}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{641,964}} + sourceSize + {641,964} + + start_game.png + + frame + {{2,645},{215,90}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{215,90}} + sourceSize + {215,90} + + + metadata + + format + 2 + realTextureFileName + menu_scene.png + size + {968,737} + smartupdate + $TexturePacker:SmartUpdate:db555b7f132f8136b7898992ccf55fb8:1cac3d4496c65b08a797fffbdefaa627:f7a06ab55076f34b936dd5f32b31eb72$ + textureFileName + menu_scene.png + + + diff --git a/samples/EarthWarrior3D-CSDK/Resources/menu_scene.png b/samples/EarthWarrior3D-CSDK/Resources/menu_scene.png new file mode 100755 index 0000000..4c22fce Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/menu_scene.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/missileFlare.plist b/samples/EarthWarrior3D-CSDK/Resources/missileFlare.plist new file mode 100755 index 0000000..4180c9b --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/missileFlare.plist @@ -0,0 +1,121 @@ + + + + + angle + 0.0 + angleVariance + 0.0 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + missileFlare + duration + -1 + emitterType + 0 + finishColorAlpha + 1.0 + finishColorBlue + 0.4078431725502014 + finishColorGreen + 0.658823549747467 + finishColorRed + 0.9647059440612793 + finishColorVarianceAlpha + 1.0 + finishColorVarianceBlue + 0.0 + finishColorVarianceGreen + 0.0 + finishColorVarianceRed + 0.0 + finishParticleSize + 14.76712322235107 + finishParticleSizeVariance + 35.52054595947266 + gravityx + 0.0 + gravityy + 0.0 + maxParticles + 5.0 + maxRadius + 0 + maxRadiusVariance + 0.0 + metaData + + yCoordFlippedConverted + 1 + + minRadius + 300 + minRadiusVariance + 0.0 + particleLifespan + 0.3673266470432281 + particleLifespanVariance + 0.0 + radialAccelVariance + 0.0 + radialAcceleration + 0.0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0.0 + rotationEnd + 0.0 + rotationEndVariance + 0.0 + rotationStart + 0.0 + rotationStartVariance + 65.10166931152344 + sourcePositionVariancex + 0.0 + sourcePositionVariancey + 0.0 + sourcePositionx + 0.0 + sourcePositiony + 0.0 + speed + 0.0 + speedVariance + 0.0 + startColorAlpha + 1.0 + startColorBlue + 0.4011987745761871 + startColorGreen + 0.6524861454963684 + startColorRed + 0.9845572113990784 + startColorVarianceAlpha + 1.0 + startColorVarianceBlue + 0.0 + startColorVarianceGreen + 0.0 + startColorVarianceRed + 0.0 + startParticleSize + 26.98630142211914 + startParticleSizeVariance + 23.47945213317871 + tangentialAccelVariance + 0.0 + tangentialAcceleration + 0.0 + textureFileName + missileFlare.png + textureImageData + H4sIAAAAAAAAA+2dB3xUVdrG70waBEJL6C30joB0pNfQexOVkFBCCSE0QRREFhVYUUREUFFURFCsFLEjVlgERLCL67Lq6rq4rr3MN/+LTzzebyaZhCQzCeDvODczt5x73uc87/O+59xzBwywGlqu2Pcty/KcL+eLisvl+lMJdn3Ol9As53FyvmRVhA23222X81g5X3wVJ06EFX/7Bru+ed0Owa5HqBYnRrLilMLOOYX53nIDJ2FhYXbJilOElcKMl8J6X7mBE0p4eHgGVrJqJ18cFOx7yYs2KUz3lRvtkR0+8Xd8YeOY81j5s52xcUREhCcyMjJgPvF3DjipMOHF7APBrkuwcSKfA06Eleza2KlzsstN+XnPOcGKif9g30OwcEIbwAXig+xyiq9zmudVG4dKO+f0vs6mXQpykU2xZVRUlF3Yzo32yMtz59a9Z7cO1Bu+5T7OJT9k8gn3X6xYMU90dHSucqzzGiZvBRsvqlt26iDscy/Brn9+FekJ6RIV9ZfcbANTv3ANk2OCqXtzEgPLB2Wm5QrLmJnqr/stWbKkJyYmxt7Oy75u+iP4i+uaeAlWH3XG9oHcB3UuVapUBrcUVqzILvI5cXFxtt3yg1N96RdKXuM0qzopVgsUK+yrejuxYmKkoOYKTN3AfYITlZzGxmdbD64Lp9FH0Ul54f8CKdnhFtWfNqTOznYr6Fgx7QM2KlSo4ClTpoy9HQz7mPwCVsqWLWvjxYyT8rM+4tlAuZV94GLak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56MvvNnjzZePJRw78NbAt44cH3H87RPjTpx8O/ntz96Z/s7X78579+f3lrwf8f6KD0p9sO7DKh9u/qjBRw+fbH3ymY97fHzw78P+/t4nSZ988Y/Z//jl1LJ/xvxz3afVP33gsxafPf15r88P/+vif536Iu2Ln79c/u/S/779q/pfPfGfLv85eHr06VNfp3/t+e+qbyp+c///Wv5v37eDv/3wuxnf/fz9ih8q/rD1x7Y/vvLTqJ8+/Xn+L1G/rP+1wa97f+v32/ueGR5PWmJ6oi0FiAjckyZZ1n/vt6yYMZYVe9iyokuc0cP2P9cZDW+diUb8bJ/RzPa/1pa1pYtljXjesvossayNaBDvdhlvQRoN72K5L7wwo/z+b/akC1ucOVdxr6qM+MHj+aaqZUXttaxf0z2en+/weH6911vZdyzr+VlndDj/+jexrMi/dO/fosWBYZdPtBz//g/xLTIKXiEBAA== + yCoordFlipped + -1 + + diff --git a/samples/EarthWarrior3D-CSDK/Resources/muzzle.png b/samples/EarthWarrior3D-CSDK/Resources/muzzle.png new file mode 100755 index 0000000..9d6b3b3 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/muzzle.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/num.fnt b/samples/EarthWarrior3D-CSDK/Resources/num.fnt new file mode 100755 index 0000000..6d530b4 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/num.fnt @@ -0,0 +1,15 @@ +info face="Arial" size=32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 outline=0 +common lineHeight=32 base=26 scaleW=256 scaleH=256 pages=1 packed=0 alphaChnl=1 redChnl=0 greenChnl=0 blueChnl=0 +page id=0 file="num_0.png" +chars count=11 +char id=37 x=0 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=48 x=25 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=49 x=50 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=50 x=75 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=51 x=100 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=52 x=125 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=53 x=150 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=54 x=175 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=55 x=200 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=56 x=225 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=57 x=0 y=35 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 diff --git a/samples/EarthWarrior3D-CSDK/Resources/num_0.png b/samples/EarthWarrior3D-CSDK/Resources/num_0.png new file mode 100755 index 0000000..38437a1 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/num_0.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/pkstart.png b/samples/EarthWarrior3D-CSDK/Resources/pkstart.png new file mode 100755 index 0000000..eca33c0 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/pkstart.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/player_bullet_explosion.png b/samples/EarthWarrior3D-CSDK/Resources/player_bullet_explosion.png new file mode 100755 index 0000000..d0a97e3 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/player_bullet_explosion.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/playerv002.c3b b/samples/EarthWarrior3D-CSDK/Resources/playerv002.c3b new file mode 100755 index 0000000..a40959d Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/playerv002.c3b differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/playerv002_256.png b/samples/EarthWarrior3D-CSDK/Resources/playerv002_256.png new file mode 100755 index 0000000..dfe9057 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/playerv002_256.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/potion2.png b/samples/EarthWarrior3D-CSDK/Resources/potion2.png new file mode 100755 index 0000000..8e095bb Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/potion2.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/score_right_top.png b/samples/EarthWarrior3D-CSDK/Resources/score_right_top.png new file mode 100755 index 0000000..c203616 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/score_right_top.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/streak.png b/samples/EarthWarrior3D-CSDK/Resources/streak.png new file mode 100755 index 0000000..9bd8182 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/Resources/streak.png differ diff --git a/samples/EarthWarrior3D-CSDK/Resources/toonSmoke.plist b/samples/EarthWarrior3D-CSDK/Resources/toonSmoke.plist new file mode 100755 index 0000000..8c02891 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/toonSmoke.plist @@ -0,0 +1,121 @@ + + + + + angle + 0.0 + angleVariance + 180.0 + blendFuncDestination + 771 + blendFuncSource + 1 + configName + toonSmoke + duration + 0.01 + emitterType + 0 + finishColorAlpha + 1.0 + finishColorBlue + 0.1490601301193237 + finishColorGreen + 0.1490625441074371 + finishColorRed + 0.1490580141544342 + finishColorVarianceAlpha + 0.0 + finishColorVarianceBlue + 0.0 + finishColorVarianceGreen + 0.0 + finishColorVarianceRed + 0.0 + finishParticleSize + 0.0 + finishParticleSizeVariance + 0.0 + gravityx + 0.0 + gravityy + 0.0 + maxParticles + 1486.301391601562 + maxRadius + 0.0 + maxRadiusVariance + 0.0 + metaData + + yCoordFlippedConverted + 1 + + minRadius + 94.9539794921875 + minRadiusVariance + 0.0 + particleLifespan + 1.0 + particleLifespanVariance + 0.2 + radialAccelVariance + 0.0 + radialAcceleration + 110 + rotatePerSecond + 0.0 + rotatePerSecondVariance + 0.0 + rotationEnd + 0.0 + rotationEndVariance + 0.0 + rotationStart + 0.0 + rotationStartVariance + 0.0 + sourcePositionVariancex + 0.0 + sourcePositionVariancey + 0.0 + sourcePositionx + 0.0 + sourcePositiony + 0.0 + speed + 123.1806488037109 + speedVariance + 30.0 + startColorAlpha + 1.0 + startColorBlue + 0.3294117748737335 + startColorGreen + 0.5843137502670288 + startColorRed + 0.9725490808486938 + startColorVarianceAlpha + 0.0 + startColorVarianceBlue + 0.0 + startColorVarianceGreen + 0.0 + startColorVarianceRed + 0.0 + startParticleSize + 64.0 + startParticleSizeVariance + 17.50684928894043 + tangentialAccelVariance + 0.0 + tangentialAcceleration + 0.0 + textureFileName + toonSmoke.png + textureImageData + H4sIAAAAAAAAA+1dCVxO2Rs+92vf0CJrSWlRsoTKXlqUUNqQNZVKi7TYd4bB2EmLnbHvO4NClGXsO2MypsHwNxljSbj/89y+k2+a0qKV7/U77u1+dz3Pec95z/u855zu3YkpIRtHNWzYkBQl6enpCalp06akXbt2pE2bNv9Kbdu2FbbNmzcn5ubmwnlmZmZCwnX43cLCgpiYmBBra2vSvn174W99fX2Hli1bHqbHzlpaWqa1bt06tVWrVkLCPj2WSn87Q/9ONjQ09KTnCtfiHrg37oF7N2rUSHgmEt4B5+EcbBs3bkzofYS/scX7t2jRQjiOY+zdJb8Fx5s0aSLcH8/DdXgGjuE6PAPHJa/BObgvrinrVJa4sW/U1dXN/S6a1yHAguJwhj4/iZ6XRRNPr+Pp3zw9zlO8hC0SjuE3nEPTW1yDa4ExfU4U7ol7U/yF50lx+zLckKBb+A4DAwMnikUK/a4U+vtb4GBlZcV36NCB79KlC+/h4cEPHjyYHz58OD9hwgT+u+++46dNm8ZPnDiRj4qK4v38/HgvLy/eyclJuAbX0vsCzyx635M0nTI2NvbG9yBfmzVrVihueE+m+wXhBn3G+38LuCHPWP1Fv28AzeNjNO+yGVYODg78oEGD+Hnz5vFJSUn8r7/+yr98+ZJ/+/Yt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09+jfn+fMe0PtT9iHzV4tOmxxeMjTxyfXPqz758ZTyOeZj+b/j/1/y17bvJ87182f53P7J2Z8SLyBf/3Dy/rvNzwT6t/Trxye3X/ddjr7Dez3tZ5uzHLOiv1Xa93j7JHvld4H/eh8YfDH10+3uPDeD7CN9JXMAXQQxANGULI3xsIUetDiOYlQpSr5djDgnA5NjzJ6S0UsJ9jMwtiSch6G0K8kglxmkRIImwQuq9BE0wjTxsiol06lsQSNaSlRc69VKlVKfeW51/qEKJwmJAPkTyfvZznP6yjL3ubkOThOXY4pJs5IfLf2XWzsDjnMSqA5JH/A082Cp8utgAA + yCoordFlipped + -1 + + diff --git a/samples/EarthWarrior3D-CSDK/Resources/vanishingPoint.plist b/samples/EarthWarrior3D-CSDK/Resources/vanishingPoint.plist new file mode 100755 index 0000000..bcb231c --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/Resources/vanishingPoint.plist @@ -0,0 +1,121 @@ + + + + + angle + 156.7198181152344 + angleVariance + 228.5445098876953 + blendFuncDestination + 771 + blendFuncSource + 1 + configName + Untitled 1 + duration + -1.0 + emitterType + 1 + finishColorAlpha + 1.0 + finishColorBlue + 1.0 + finishColorGreen + 0.9914394021034241 + finishColorRed + 0.0 + finishColorVarianceAlpha + 0.0 + finishColorVarianceBlue + 0.0 + finishColorVarianceGreen + 0.0 + finishColorVarianceRed + 0.0 + finishParticleSize + 0.0 + finishParticleSizeVariance + 0.0 + gravityx + 0.0 + gravityy + 0.0 + maxParticles + 317.8510437011719 + maxRadius + 400 + maxRadiusVariance + 302.2260437011719 + metaData + + yCoordFlippedConverted + 1 + + minRadius + 0 + minRadiusVariance + 0.0 + particleLifespan + 1.5 + particleLifespanVariance + 0.61215752363205 + radialAccelVariance + 0.0 + radialAcceleration + 0.0 + rotatePerSecond + 0.0 + rotatePerSecondVariance + 0.0 + rotationEnd + 0.0 + rotationEndVariance + 0.0 + rotationStart + 0.0 + rotationStartVariance + 0.0 + sourcePositionVariancex + 300 + sourcePositionVariancey + 200 + sourcePositionx + 160.0 + sourcePositiony + 240.0 + speed + 86.95419311523438 + speedVariance + 56.72089004516602 + startColorAlpha + 1.0 + startColorBlue + 1.0 + startColorGreen + 0.9555045962333679 + startColorRed + 0.0 + startColorVarianceAlpha + 0.0 + startColorVarianceBlue + 0.0 + startColorVarianceGreen + 0.0 + startColorVarianceRed + 0.0 + startParticleSize + 6 + startParticleSizeVariance + 3 + tangentialAccelVariance + 0.0 + tangentialAcceleration + 0.0 + textureFileName + defaultTexture.png + textureImageData + H4sIAAAAAAAAA+1bB1RURxd+byu9g1RZpINUpVtoKoiKIqJYorisdESqLRINkihGjSHEFo0EC/ZoRCRWLMRoFHuPEIMlNizY4/5z3fvic7MrmJic84vr+Tjj7My997tt5i1L796UE0UFqlD/wUsqldJvgv/CJrTr35KrjBunGfyn/nib/FvIldsMmvXJWzOYejv8X8OZzYsnB74c5N9X5pO36od/wl8Jb3m+DD8BQtgMmHXyfpH3xVvxw9/h3wLe8nxVCFQRaiyoI9hzzDoVBf546354U/4t5M3mzPDUINAk0CLQVgItXKPB8ou8L17rh3+TvxLu8rwZzgxf4KVDoEugR6BPYEBgKAcDfE8P1+rgXsYfjC8U+eFv+6Al/BXkOzvminhrof16yMuIwJjAhMCUwIzAnMACYY5zprjGGPcYoAwdlKnID/K58Eb10Bz/FsRcRY63LsaR4WyGHC0JrAisCWwIbOVgg+9Z4VoL3Mv4Qh9ls/2g8k9zoYX8FXFnYq6OOarD4m2CMbVETsDPgcCJoD2BK4EbgTvCDefa4xoH3GONMsxRJuMHHdSpzsoFhT74J/ylf815ee4QB23MUUMWbxHG0wE5AT9PAi8CXwJ/ggA5+ON7XrjWDfc6oCwRyw+GqFMbbVDmg2ZzQBn/Zrgz+a7NirkZxgpsdSRwQR7eyK0LQRBBKEF3gjCCcEQYzoXimi64xxtluKBMG9RhxsoFxgdqf8cHivi3kDuT78YYF6hbe4wZ2OxD0JkgmKAHQQRBJEEUQTRBDMFARAzOReGaCNwTjDJ8UGZ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XR17ZrQNZVrXdYuWWe0rmg9tT5n/e/fjfju5IaIDdUbfTeu/d72+4Wb9DdNr6ArxlU0bk7cXFcZW3lkS88t1VUBVZt+cP1h+VarrQu2GW6btV1te8F26Y7xO5p2Zuy8sSth16Xq4dXndg/afXxPvz2H9kbs/XFf9327a4JqdvzY+cet+/33b/nJ96fNB7wPVBz0OrjpZ6+fNx3yPlRx2OdwZa1fbdWRTke2H+16dNex0GP7jocfP3Ciz4kjJwecPH1q6Km60/Gnr55JPXPnbO7Zp+c+Os8/P/2CzoWSX8x/Kb3oeHFdnXfdtvrQ+oO/9v/13CXxpeu/Zf32rKHgsublkiuWV8qvel7deq37tdrfh/zecD3j+tMbhTd1by685XDr+9uBtw82DmpsuJN5R3p3xj2Te8vvd7xf3dS36ZcHaQ+ePpz+yOTRise+j2ueDHxy5WneM+GzuX84/lH1POL5eWmaVPo/LX7Mrg5NAAA= + yCoordFlipped + -1 + + diff --git a/samples/EarthWarrior3D-CSDK/proj.android/.classpath b/samples/EarthWarrior3D-CSDK/proj.android/.classpath new file mode 100755 index 0000000..5176974 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/samples/EarthWarrior3D-CSDK/proj.android/.project b/samples/EarthWarrior3D-CSDK/proj.android/.project new file mode 100755 index 0000000..639d4c2 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/.project @@ -0,0 +1,65 @@ + + + Moon3D + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + Classes + 2 + COCOS2DX/projects/Moon3D/Classes + + + cocos2dx + 2 + COCOS2DX/cocos2dx + + + extensions + 2 + COCOS2DX/extensions + + + scripting + 2 + COCOS2DX/scripting + + + diff --git a/samples/EarthWarrior3D-CSDK/proj.android/.settings/org.eclipse.jdt.core.prefs b/samples/EarthWarrior3D-CSDK/proj.android/.settings/org.eclipse.jdt.core.prefs new file mode 100755 index 0000000..b080d2d --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/samples/EarthWarrior3D-CSDK/proj.android/AndroidManifest.xml b/samples/EarthWarrior3D-CSDK/proj.android/AndroidManifest.xml new file mode 100755 index 0000000..8a7c875 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/AndroidManifest.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/EarthWarrior3D-CSDK/proj.android/README.md b/samples/EarthWarrior3D-CSDK/proj.android/README.md new file mode 100755 index 0000000..53cb259 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/README.md @@ -0,0 +1,87 @@ +## Prerequisites: + +* Android NDK +* Android SDK **OR** Eclipse ADT Bundle +* Android AVD target installed + +## Building project + +There are two ways of building Android projects. + +1. Eclipse +2. Command Line + +### Import Project in Eclipse + +#### Features: + +1. Complete workflow from Eclipse, including: + * Build C++. + * Clean C++. + * Build and Run whole project. + * Logcat view. + * Debug Java code. + * Javascript editor. + * Project management. +2. True C++ editing, including: + * Code completion. + * Jump to definition. + * Refactoring tools etc. + * Quick open C++ files. + + +#### Setup Eclipse Environment (only once) + + +**NOTE:** This step needs to be done only once to setup the Eclipse environment for cocos2d-x projects. Skip this section if you've done this before. + +1. Download Eclipse ADT bundle from [Google ADT homepage](http://developer.android.com/sdk/index.html) + + **OR** + + Install Eclipse with Java. Add ADT and CDT plugins. + +2. Only for Windows + 1. Install [Cygwin](http://www.cygwin.com/) with make (select make package from the list during the install). + 2. Add `Cygwin\bin` directory to system PATH variable. + 3. Add this line `none /cygdrive cygdrive binary,noacl,posix=0,user 0 0` to `Cygwin\etc\fstab` file. + +3. Set up Variables: + 1. Path Variable `COCOS2DX`: + * Eclipse->Preferences->General->Workspace->**Linked Resources** + * Click **New** button to add a Path Variable `COCOS2DX` pointing to the root cocos2d-x directory. + ![Example](https://lh5.googleusercontent.com/-oPpk9kg3e5w/UUOYlq8n7aI/AAAAAAAAsdQ/zLA4eghBH9U/s400/cocos2d-x-eclipse-vars.png) + + 2. C/C++ Environment Variable `NDK_ROOT`: + * Eclipse->Preferences->C/C++->Build->**Environment**. + * Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. + ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) + * Only for Windows: Add new variables **CYGWIN** with value `nodosfilewarning` and **SHELLOPTS** with value `igncr` + +4. Import libcocos2dx library project: + 1. File->New->Project->Android Project From Existing Code. + 2. Click **Browse** button and open `cocos2d-x/cocos2dx/platform/android/java` directory. + 3. Click **Finish** to add project. + +#### Adding and running from Eclipse + +![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) + +1. File->New->Project->Android Project From Existing Code +2. **Browse** to your project directory. eg: `cocos2d-x/cocos2dx/samples/Cpp/TestCpp/proj.android/` +3. Add the project +4. Click **Run** or **Debug** to compile C++ followed by Java and to run on connected device or emulator. + + +### Running project from Command Line + + $ cd cocos2d-x/samples/Cpp/TestCpp/proj.android/ + $ export NDK_ROOT=/path/to/ndk + $ ./build_native.sh + $ ant debug install + +If the last command results in sdk.dir missing error then do: + + $ android list target + $ android update project -p . -t (id from step 6) + $ android update project -p cocos2d/cocos/2d/platform/android/java/ -t (id from step 6) diff --git a/samples/EarthWarrior3D-CSDK/proj.android/ant.properties b/samples/EarthWarrior3D-CSDK/proj.android/ant.properties new file mode 100755 index 0000000..b0971e8 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/ant.properties @@ -0,0 +1,17 @@ +# This file is used to override default values used by the Ant build system. +# +# This file must be checked into Version Control Systems, as it is +# integral to the build system of your project. + +# This file is only used by the Ant script. + +# You can use this to override default values such as +# 'source.dir' for the location of your java source folder and +# 'out.dir' for the location of your output folder. + +# You can also use it define how the release builds are signed by declaring +# the following properties: +# 'key.store' for the location of your keystore and +# 'key.alias' for the name of the key to use. +# The password will be asked during the build when you use the 'release' target. + diff --git a/samples/EarthWarrior3D-CSDK/proj.android/build-cfg.json b/samples/EarthWarrior3D-CSDK/proj.android/build-cfg.json new file mode 100755 index 0000000..611f232 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/build-cfg.json @@ -0,0 +1,13 @@ +{ + "ndk_module_path" :[ + "../cocos2d", + "../cocos2d/cocos", + "../cocos2d/external" + ], + "copy_resources": [ + { + "from": "../Resources", + "to": "" + } + ] +} diff --git a/samples/EarthWarrior3D-CSDK/proj.android/build.xml b/samples/EarthWarrior3D-CSDK/proj.android/build.xml new file mode 100755 index 0000000..d172fd6 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/build.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/EarthWarrior3D-CSDK/proj.android/build_native.py b/samples/EarthWarrior3D-CSDK/proj.android/build_native.py new file mode 100755 index 0000000..15fc691 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/build_native.py @@ -0,0 +1,166 @@ +#!/usr/bin/python +# build_native.py +# Build native codes + + +import sys +import os, os.path +import shutil +from optparse import OptionParser + +def get_num_of_cpu(): + ''' The build process can be accelerated by running multiple concurrent job processes using the -j-option. + ''' + try: + platform = sys.platform + if platform == 'win32': + if 'NUMBER_OF_PROCESSORS' in os.environ: + return int(os.environ['NUMBER_OF_PROCESSORS']) + else: + return 1 + else: + from numpy.distutils import cpuinfo + return cpuinfo.cpu._getNCPUs() + except Exception: + print "Can't know cpuinfo, use default 1 cpu" + return 1 + +def check_environment_variables_sdk(): + ''' Checking the environment ANDROID_SDK_ROOT, which will be used for building + ''' + + try: + SDK_ROOT = os.environ['ANDROID_SDK_ROOT'] + except Exception: + print "ANDROID_SDK_ROOT not defined. Please define ANDROID_SDK_ROOT in your environment" + sys.exit(1) + + return SDK_ROOT + +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 do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode): + + 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) + + num_of_cpu = get_num_of_cpu() + + if ndk_build_param == None: + command = '%s -j%d -C %s %s' % (ndk_path, num_of_cpu, app_android_root, ndk_module_path) + else: + command = '%s -j%d -C %s %s %s' % (ndk_path, num_of_cpu, app_android_root, ' '.join(str(e) for e in ndk_build_param), ndk_module_path) + if os.system(command) != 0: + raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!") + elif android_platform is not None: + sdk_tool_path = os.path.join(sdk_root, "tools/android") + cocoslib_path = os.path.join(cocos_root, "cocos/platform/android/java") + command = '%s update lib-project -t %s -p %s' % (sdk_tool_path,android_platform,cocoslib_path) + if os.system(command) != 0: + raise Exception("update cocos lib-project [ " + cocoslib_path + " ] fails!") + command = '%s update project -t %s -p %s -s' % (sdk_tool_path,android_platform,app_android_root) + if os.system(command) != 0: + raise Exception("update project [ " + app_android_root + " ] fails!") + buildfile_path = os.path.join(app_android_root, "build.xml") + command = 'ant clean %s -f %s -Dsdk.dir=%s' % (build_mode,buildfile_path,sdk_root) + 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(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 + 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) + +def build(ndk_build_param,android_platform,build_mode): + + ndk_root = check_environment_variables() + sdk_root = None + select_toolchain_version() + + current_dir = os.path.dirname(os.path.realpath(__file__)) + cocos_root = os.path.join(current_dir, "../cocos2d") + + app_android_root = current_dir + copy_resources(app_android_root) + + if android_platform is not None: + sdk_root = check_environment_variables_sdk() + if android_platform.isdigit(): + android_platform = 'android-'+android_platform + else: + print 'please use vaild android platform' + exit(1) + + if build_mode is None: + build_mode = 'debug' + elif build_mode != 'release': + build_mode = 'debug' + + do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode) + +# -------------- main -------------- +if __name__ == '__main__': + + parser = OptionParser() + parser.add_option("-n", "--ndk", dest="ndk_build_param", help='parameter for ndk-build', action="append") + parser.add_option("-p", "--platform", dest="android_platform", + help='parameter for android-update.Without the parameter,the script just build dynamic library for project. Valid android-platform are:[10|11|12|13|14|15|16|17|18|19]') + parser.add_option("-b", "--build", dest="build_mode", + help='the build mode for java project,debug[default] or release.Get more information,please refer to http://developer.android.com/tools/building/building-cmdline.html') + (opts, args) = parser.parse_args() + + build(opts.ndk_build_param,opts.android_platform,opts.build_mode) diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/Android.mk b/samples/EarthWarrior3D-CSDK/proj.android/jni/Android.mk new file mode 100644 index 0000000..892243d --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/jni/Android.mk @@ -0,0 +1,85 @@ +LOCAL_PATH := $(call my-dir) + +CCF_PATH := intel_ccf +include $(CLEAR_VARS) +LOCAL_MODULE := AFE +LOCAL_SRC_FILES := $(CCF_PATH)/$(TARGET_ARCH_ABI)/libAFE.so +include $(PREBUILT_SHARED_LIBRARY) + +include $(CLEAR_VARS) +LOCAL_MODULE := STC +LOCAL_SRC_FILES := $(CCF_PATH)/$(TARGET_ARCH_ABI)/libSTC.so +include $(PREBUILT_SHARED_LIBRARY) + +include $(CLEAR_VARS) +LOCAL_MODULE := stcapi +LOCAL_SRC_FILES := $(CCF_PATH)/$(TARGET_ARCH_ABI)/libstcapi.so +include $(PREBUILT_SHARED_LIBRARY) + +include $(CLEAR_VARS) +LOCAL_MODULE := stcjnimediator +LOCAL_SRC_FILES := $(CCF_PATH)/$(TARGET_ARCH_ABI)/libstcjnimediator.so +include $(PREBUILT_SHARED_LIBRARY) + +include $(CLEAR_VARS) + +LOCAL_SHARED_LIBRARIES += AFE +LOCAL_SHARED_LIBRARIES += STC +LOCAL_SHARED_LIBRARIES += stcapi +LOCAL_SHARED_LIBRARIES += stcjnimediator + +LOCAL_MODULE := cocos2dcpp_shared + +LOCAL_MODULE_FILENAME := libcocos2dcpp + +LOCAL_SRC_FILES := hellocpp/main.cpp \ + ../../Classes/AppDelegate.cpp \ + ../../Classes/HelloWorldScene.cpp \ + ../../Classes/AirCraft.cpp \ + ../../Classes/GameEntity.cpp \ + ../../Classes/GameLayer.cpp \ + ../../Classes/Player.cpp \ + ../../Classes/PublicApi.cpp \ + ../../Classes/Enemies.cpp \ + ../../Classes/Bullets.cpp \ + ../../Classes/Effects.cpp \ + ../../Classes/Explosion.cpp \ + ../../Classes/GameControllers.cpp \ + ../../Classes/LoadingScene.cpp \ + ../../Classes/MainMenuScene.cpp \ + ../../Classes/GameOverLayer.cpp \ + ../../Classes/ParticleManager.cpp \ + ../../Classes/Plane.cpp \ + ../../Classes/Sprite3DEffect.cpp \ + ../../Classes/LicenseLayer.cpp \ + ../../Classes/ConnectionInterface.cpp \ + ../../Classes/PopLayer.cpp \ + ../../Classes/CCFLayer.cpp \ + ../../Classes/CCFPlayer.cpp \ + ../../Classes/FriendControlScene.cpp \ + ../../Classes/PeerButton.cpp + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes + +LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static +LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static + +# LOCAL_WHOLE_STATIC_LIBRARIES += box2d_static +# LOCAL_WHOLE_STATIC_LIBRARIES += cocosbuilder_static +# LOCAL_WHOLE_STATIC_LIBRARIES += spine_static + LOCAL_WHOLE_STATIC_LIBRARIES += cocostudio_static +# LOCAL_WHOLE_STATIC_LIBRARIES += cocos_network_static +# LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static + + +include $(BUILD_SHARED_LIBRARY) + +$(call import-module,.) +$(call import-module,audio/android) + +# $(call import-module,Box2D) +# $(call import-module,editor-support/cocosbuilder) +# $(call import-module,editor-support/spine) + $(call import-module,editor-support/cocostudio) +# $(call import-module,network) +# $(call import-module,extensions) diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/Application.mk b/samples/EarthWarrior3D-CSDK/proj.android/jni/Application.mk new file mode 100755 index 0000000..e733844 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/jni/Application.mk @@ -0,0 +1,4 @@ +APP_STL := gnustl_static +APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -DCOCOS2D_DEBUG=1 -std=c++11 -fsigned-char +APP_ABI :=armeabi armeabi-v7a x86 +APP_PLATFORM := 14 \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/hellocpp/main.cpp b/samples/EarthWarrior3D-CSDK/proj.android/jni/hellocpp/main.cpp new file mode 100755 index 0000000..c536bb2 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/jni/hellocpp/main.cpp @@ -0,0 +1,100 @@ +#include "AppDelegate.h" +#include "cocos2d.h" +#include "platform/android/jni/JniHelper.h" +#include +#include +#include "ConnectionInterface.h" + +#define LOG_TAG "main" +#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__) + +using namespace cocos2d; + +void cocos_android_app_init (JNIEnv* env, jobject thiz) { + LOGD("cocos_android_app_init"); + AppDelegate *pAppDelegate = new AppDelegate(); +} + + +extern "C" { + void Java_com_intel_csdk_wrapper_JNIMediator_nativePeerAdd(JNIEnv* env, jobject thiz, jobject obj_peer){ + LOGD("Java_com_intel_csdk_wrapper_JNIMediator_nativePeerAdd"); + + jclass peer_cls = env->GetObjectClass(obj_peer); + + jfieldID nameFieldID = env->GetFieldID(peer_cls,"_sessionName","Ljava/lang/String;"); + jfieldID idFieldID = env->GetFieldID(peer_cls,"_sessionId","Ljava/lang/String;"); + jfieldID idAviabileID = env->GetFieldID(peer_cls,"_availability","Z"); + jfieldID idCloudID = env->GetFieldID(peer_cls,"_availability_cloud","Z"); + jfieldID idProximityID = env->GetFieldID(peer_cls,"_availability_proximity","Z"); + + jstring sessionName = (jstring)env->GetObjectField(obj_peer , nameFieldID); + jstring sessionId = (jstring)env->GetObjectField(obj_peer , idFieldID); + + const char * c_name = env->GetStringUTFChars(sessionName ,NULL);//ת char * + const char * c_id = env->GetStringUTFChars(sessionId ,NULL);//ת char * + + tagPEER jniPeer; + jniPeer._sessionName = c_name; + jniPeer._sessionId = c_id; + jniPeer._availability = env->GetObjectField(obj_peer, idAviabileID); + jniPeer._availability_cloud = env->GetObjectField(obj_peer, idCloudID); + jniPeer._availability_proximity = env->GetObjectField(obj_peer, idProximityID); + jniPeer.add = true; + + ConnectionInterface::OnPeerUpdate(jniPeer); + + env->ReleaseStringUTFChars(sessionName, c_name); //ͷ + env->ReleaseStringUTFChars(sessionId, c_id); //ͷ + } + + void Java_com_intel_csdk_wrapper_JNIMediator_nativePeerRemove(JNIEnv* env, jobject thiz, jobject obj_peer){ + LOGD("Java_com_intel_csdk_wrapper_JNIMediator_nativePeerRemove"); + + jclass peer_cls = env->GetObjectClass(obj_peer); + + jfieldID nameFieldID = env->GetFieldID(peer_cls,"_sessionName","Ljava/lang/String;"); //get sessionName + jfieldID idFieldID = env->GetFieldID(peer_cls,"_sessionId","Ljava/lang/String;"); //get sessionId + + jstring sessionName = (jstring)env->GetObjectField(obj_peer , nameFieldID); + jstring sessionId = (jstring)env->GetObjectField(obj_peer , idFieldID); + + const char * c_name = env->GetStringUTFChars(sessionName ,NULL);//ת char * + const char * c_id = env->GetStringUTFChars(sessionId ,NULL);//ת char * + + tagPEER jniPeer; + jniPeer._sessionName = c_name; + jniPeer._sessionId = c_id; + jniPeer.add = false; + + ConnectionInterface::OnPeerUpdate(jniPeer); + + env->ReleaseStringUTFChars(sessionName, c_name); //ͷ + env->ReleaseStringUTFChars(sessionId, c_id); //ͷ + } + + void Java_com_intel_csdk_wrapper_JNIMediator_nativeInvite(JNIEnv* env, jobject thiz, jstring peerID){ + const char *cId = env->GetStringUTFChars(peerID, NULL); + LOGD("Java_com_intel_csdk_wrapper_JNIMediator_nativeInvite sessionName:%s", cId); + ConnectionInterface::OnReciveInvite(cId); + env->ReleaseStringUTFChars(peerID, cId); + } + + void Java_com_intel_csdk_wrapper_JNIMediator_nativeReceiveMsg(JNIEnv* env, jobject thiz, jstring msg){ + const char *cMsg = env->GetStringUTFChars(msg, NULL); + LOGD("Java_com_intel_csdk_wrapper_JNIMediator_nativeReceiveMsg :%s", cMsg); + ConnectionInterface::OnReceiveMessage(cMsg); + env->ReleaseStringUTFChars(msg, cMsg); + + } + + void Java_com_intel_csdk_wrapper_JNIMediator_nativeInviteAcknowledgment(JNIEnv* env, jobject thiz){ + LOGD("Java_com_intel_csdk_wrapper_JNIMediator_nativeInviteAcknowledgment"); + ConnectionInterface::OnAcknowledgment(); + } + + void Java_com_intel_csdk_wrapper_JNIMediator_nativeDisconnect(JNIEnv* env, jobject thiz){ + LOGD("Java_com_intel_csdk_wrapper_JNIMediator_nativeDisconnect"); + ConnectionInterface::OnDisconnect(); + } +} diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi-v7a/libAFE.so b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi-v7a/libAFE.so new file mode 100644 index 0000000..1f9cb02 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi-v7a/libAFE.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi-v7a/libSTC.so b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi-v7a/libSTC.so new file mode 100644 index 0000000..d54a7f4 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi-v7a/libSTC.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi-v7a/libstcapi.so b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi-v7a/libstcapi.so new file mode 100644 index 0000000..a931e74 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi-v7a/libstcapi.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi-v7a/libstcjnimediator.so b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi-v7a/libstcjnimediator.so new file mode 100644 index 0000000..e720a92 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi-v7a/libstcjnimediator.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi/libAFE.so b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi/libAFE.so new file mode 100644 index 0000000..d97d3bf Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi/libAFE.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi/libSTC.so b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi/libSTC.so new file mode 100644 index 0000000..32f9aab Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi/libSTC.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi/libstcapi.so b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi/libstcapi.so new file mode 100644 index 0000000..90efa95 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi/libstcapi.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi/libstcjnimediator.so b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi/libstcjnimediator.so new file mode 100644 index 0000000..6d6defc Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/armeabi/libstcjnimediator.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/x86/libAFE.so b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/x86/libAFE.so new file mode 100644 index 0000000..48d5d32 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/x86/libAFE.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/x86/libSTC.so b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/x86/libSTC.so new file mode 100644 index 0000000..609ec26 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/x86/libSTC.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/x86/libstcapi.so b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/x86/libstcapi.so new file mode 100644 index 0000000..6eb116e Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/x86/libstcapi.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/x86/libstcjnimediator.so b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/x86/libstcjnimediator.so new file mode 100644 index 0000000..a14a5cd Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/jni/intel_ccf/x86/libstcjnimediator.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/libs/android-support-v4.jar b/samples/EarthWarrior3D-CSDK/proj.android/libs/android-support-v4.jar new file mode 100755 index 0000000..9056828 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/libs/android-support-v4.jar differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi-v7a/libAFE.so b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi-v7a/libAFE.so new file mode 100755 index 0000000..1f9cb02 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi-v7a/libAFE.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi-v7a/libSTC.so b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi-v7a/libSTC.so new file mode 100755 index 0000000..d54a7f4 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi-v7a/libSTC.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi-v7a/libstcapi.so b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi-v7a/libstcapi.so new file mode 100755 index 0000000..a931e74 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi-v7a/libstcapi.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi-v7a/libstcjnimediator.so b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi-v7a/libstcjnimediator.so new file mode 100755 index 0000000..e720a92 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi-v7a/libstcjnimediator.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi/libAFE.so b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi/libAFE.so new file mode 100755 index 0000000..d97d3bf Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi/libAFE.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi/libSTC.so b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi/libSTC.so new file mode 100755 index 0000000..32f9aab Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi/libSTC.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi/libstcapi.so b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi/libstcapi.so new file mode 100755 index 0000000..90efa95 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi/libstcapi.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi/libstcjnimediator.so b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi/libstcjnimediator.so new file mode 100755 index 0000000..6d6defc Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/libs/armeabi/libstcjnimediator.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/libs/stclibcc.jar b/samples/EarthWarrior3D-CSDK/proj.android/libs/stclibcc.jar new file mode 100755 index 0000000..4883b4b Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/libs/stclibcc.jar differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/libs/x86/libAFE.so b/samples/EarthWarrior3D-CSDK/proj.android/libs/x86/libAFE.so new file mode 100755 index 0000000..48d5d32 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/libs/x86/libAFE.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/libs/x86/libSTC.so b/samples/EarthWarrior3D-CSDK/proj.android/libs/x86/libSTC.so new file mode 100755 index 0000000..609ec26 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/libs/x86/libSTC.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/libs/x86/libstcapi.so b/samples/EarthWarrior3D-CSDK/proj.android/libs/x86/libstcapi.so new file mode 100755 index 0000000..6eb116e Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/libs/x86/libstcapi.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/libs/x86/libstcjnimediator.so b/samples/EarthWarrior3D-CSDK/proj.android/libs/x86/libstcjnimediator.so new file mode 100755 index 0000000..a14a5cd Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/libs/x86/libstcjnimediator.so differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/local.properties b/samples/EarthWarrior3D-CSDK/proj.android/local.properties new file mode 100755 index 0000000..0deca8f --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/local.properties @@ -0,0 +1,10 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. + +# location of the SDK. This is only used by Ant +# For customization when using a Version Control System, please read the +# header note. +sdk.dir=/Users/huabingxu/work/android_libs/adt-bundle-mac-x86_64-20131030/sdk diff --git a/samples/EarthWarrior3D-CSDK/proj.android/proguard-project.txt b/samples/EarthWarrior3D-CSDK/proj.android/proguard-project.txt new file mode 100755 index 0000000..f2fe155 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/samples/EarthWarrior3D-CSDK/proj.android/project.properties b/samples/EarthWarrior3D-CSDK/proj.android/project.properties new file mode 100755 index 0000000..8e14bb7 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/project.properties @@ -0,0 +1,13 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-19 + +android.library.reference.1=../cocos2d/cocos/platform/android/java diff --git a/samples/EarthWarrior3D-CSDK/proj.android/res/drawable-hdpi/icon.png b/samples/EarthWarrior3D-CSDK/proj.android/res/drawable-hdpi/icon.png new file mode 100755 index 0000000..8aa4767 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/res/drawable-hdpi/icon.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/res/drawable-ldpi/icon.png b/samples/EarthWarrior3D-CSDK/proj.android/res/drawable-ldpi/icon.png new file mode 100755 index 0000000..17ce11a Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/res/drawable-ldpi/icon.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/res/drawable-mdpi/icon.png b/samples/EarthWarrior3D-CSDK/proj.android/res/drawable-mdpi/icon.png new file mode 100755 index 0000000..3780aac Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.android/res/drawable-mdpi/icon.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.android/res/layout/unbox_layout.xml b/samples/EarthWarrior3D-CSDK/proj.android/res/layout/unbox_layout.xml new file mode 100755 index 0000000..89a0cf6 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/res/layout/unbox_layout.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/EarthWarrior3D-CSDK/proj.android/res/values/strings.xml b/samples/EarthWarrior3D-CSDK/proj.android/res/values/strings.xml new file mode 100755 index 0000000..e4e524f --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/res/values/strings.xml @@ -0,0 +1,4 @@ + + + Moon3D + diff --git a/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/listeners/JNIListener.java b/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/listeners/JNIListener.java new file mode 100755 index 0000000..349b119 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/listeners/JNIListener.java @@ -0,0 +1,56 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package com.intel.csdk.listeners; + +import com.intel.csdk.wrapper.Peer; + +public interface JNIListener { + + public enum JNIStatus{ + INITIALIZED(0), + DISCOVERED(1), + CONNECTED(2), + DISCONNECTED(3); + + private int i; + JNIStatus(int i){ + this.i = i; + } + + public int getJNIStatus(){ + return this.i; + } + }; + + public void onPeerUpdated(Peer peer); + public void onP2PConnectionStatus(Peer peer, long value); + public void receiveP2PMessage(String msg); + public void onP2PConnectionRequest(Peer peer, long handle); + public void onJNIStatusUpdate(JNIStatus status); +} diff --git a/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/listeners/P2PEventListener.java b/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/listeners/P2PEventListener.java new file mode 100755 index 0000000..e6058dc --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/listeners/P2PEventListener.java @@ -0,0 +1,35 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package com.intel.csdk.listeners; + +public interface P2PEventListener { + + public void P2PMessageUpdate(String msg); + public void disconnectP2P(); +} diff --git a/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/wrapper/Connection.java b/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/wrapper/Connection.java new file mode 100755 index 0000000..a216b3e --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/wrapper/Connection.java @@ -0,0 +1,69 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package com.intel.csdk.wrapper; + +import java.util.UUID; + +public class Connection { + private JNIMediator mJNI; + + public Connection(Initialization init) { + if(init == null) + return; + + mJNI = init.getJNIReference(); + } + + public void requestP2PConnection(String sessionId){ + mJNI.nativePeerInvitation(sessionId); + } + + public void notifyP2PRequestACK(Peer peer, long handle, boolean value){ + if(peer == null) + return; + mJNI.nativeInviteStatus(UUID.fromString(peer.getSessionId()), handle, value); + } + + public void disconnectP2PConnection(Peer peer){ + if(peer == null) + return; + mJNI.nativeDisconnectPeer(UUID.fromString(peer.getSessionId())); + } + + public void sendP2PMessage(String msg){ + mJNI.nativeSendMsg(msg); + } + + public void notifyRegisterCommunication(){ + mJNI.nativeRegisterCommunication(); + } + public void notifyRegisterDiscovery(){ + mJNI.nativeRegisterDiscovery(); + } +} diff --git a/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/wrapper/Initialization.java b/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/wrapper/Initialization.java new file mode 100755 index 0000000..3ecb6bc --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/wrapper/Initialization.java @@ -0,0 +1,56 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package com.intel.csdk.wrapper; + +import android.content.Context; + +import com.intel.csdk.listeners.JNIListener; + +public class Initialization { + + private JNIMediator mJNI = null; + + public enum InitilizationStatus{ + SUCCESS, + FAILED, + NOT_INITIALIZED + }; + + public Initialization(Context context, JNIListener listen){ + mJNI = new JNIMediator(context, listen); + } + + public void initialize(String appId, String clientId, String clientSecret, String userName, String deviceName, byte [] avatar){ + mJNI.startSTCPlatform(appId, clientId, clientSecret, userName, deviceName, avatar); + } + + JNIMediator getJNIReference(){ + return mJNI; + } +} diff --git a/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/wrapper/JNIMediator.java b/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/wrapper/JNIMediator.java new file mode 100755 index 0000000..13556ee --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/src/com/intel/csdk/wrapper/JNIMediator.java @@ -0,0 +1,242 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package com.intel.csdk.wrapper; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import android.content.Context; +import android.content.SharedPreferences; +import android.util.Log; +import android.widget.Toast; + +import com.intel.csdk.listeners.JNIListener; +import com.intel.csdk.listeners.JNIListener.JNIStatus; +import com.intel.csdk.wrapper.Initialization.InitilizationStatus; +import com.intel.stc.csdk.STCPlatform; + +public class JNIMediator extends STCPlatform{ + + private Context mContext; + private JNIListener mListener = null; + private static final String LOGC = "Helloccf"; + private String mAppId = null; + private String mClientId = null; + private String mClientSecret = null; + private String mUserName = null; + private String mDeviceName = null; + private byte [] mAvatar = null; + private SharedPreferences mPreference = null; + public static List mPeerList = new ArrayList(); + + static { + System.loadLibrary("AFE"); + System.loadLibrary("STC"); + System.loadLibrary("stcapi"); + System.loadLibrary("stcjnimediator"); + } + + public native long nativeInit(String path, String app_id, String client_id,String client_secret); + public native long nativeIdentity(String userName, String deviceName, byte[] avatar,int size); + public native long nativeRegisterCommunication(); + public native long nativePeerInvitation(String peerID); + public native long nativeInviteStatus(UUID peerID,long handle, boolean value); + public native long nativeSendMsg(String msg); + public native long nativeDisconnectPeer(UUID peerID); + public native long nativeDestroyConnection(); + public native long nativeRegisterDiscovery(); + + public native void nativePeerAdd(Peer peer); + public native void nativePeerRemove(Peer peer); + public native void nativeInvite(String peerID); + public native void nativeReceiveMsg(String msg); + public native void nativeInviteAcknowledgment(); + public native void nativeDisconnect(); + + public JNIMediator(Context context, JNIListener listen){ + mContext = context; + mListener = listen; + if(mContext!=null) + mPreference = mContext.getSharedPreferences("Helloccf", Context.MODE_PRIVATE); + } + + void startSTCPlatform(String appId, String clientId,String clientSecret, String userName, String deviceName, byte [] avatar){ + mAppId = appId; + mClientId = clientId; + mClientSecret = clientSecret; + mUserName = userName; + mDeviceName = deviceName; + mAvatar = avatar; + this.start(); + Log.i(LOGC, "Starting STCPlatform to initialize the application with CSDK."); + } + public void onLocalPeerUpdates(UUID peerID, String userName, String deviceName, byte [] avatar, boolean isAvailableCloud, boolean isAvailableProximity){ + Log.i(LOGC, "sessionName: "+userName+ "sessionId: "+" availability: "+isAvailableCloud); + final Peer peer = new Peer(userName, avatar, userName, null, isAvailableCloud, isAvailableCloud, isAvailableProximity); + + if(peer.getAvailability()){ + add(peer); + }else{ + remove(peer); + } + } + + public void onPeerDiscovery(String peerID, String userName, String deviceName, byte [] avatar,Object [] appList, boolean isAvailable, boolean isAvailableCloud, boolean isAvailableProximity){ + if(peerID.length() == 0) return; + + Log.i(LOGC, "sessionName: "+userName+ "sessionId: "+" availability: "+isAvailable+ "appList size: "+appList.length); + UUID[] _appList = new UUID[appList.length]; + for(int i=0; i getPeerList(){ + synchronized (mPeerList) { + return mPeerList; + } + } + + public void onInvitationReceived(String peerID, long handle){ + Log.i(LOGC, "JNI onInviteReceived called peerID: "+peerID+" handle: "+handle); + Peer peer = queryPeer(peerID); + if(peer == null) + return; + + Log.i(LOGC, "JNI onInviteReceived called by "+ mListener); + if(mListener!=null){ + Log.i(LOGC, "JNI onInviteReceived called by "+peer.getName()); + mListener.onP2PConnectionRequest(peer, handle); + nativeInvite(peerID); + } + } + + private Peer queryPeer(String peerID){ + Peer peer = null; + for(int i=0; i{ + private String _sessionName; + private byte[] _avatar; + private String _sessionId; + private UUID[] _appList; + private boolean _availability; + private boolean _availability_cloud; + private boolean _availability_proximity; + + Peer(String sessionName, byte[] avatar, String sessionId, UUID[] appList, boolean availability, boolean isAvailableCloud, boolean isAvailableProximity) { + _sessionName = sessionName; + _avatar = avatar; + _sessionId = sessionId; + _appList = appList; + _availability = availability; + _availability_cloud = isAvailableCloud; + _availability_proximity = isAvailableProximity; + } + + Peer(String sessionName, String sessionId, boolean availability, boolean isAvailableCloud, boolean isAvailableProximity) { + _sessionName = sessionName; + _avatar = null; + _sessionId = sessionId; + _appList = null; + _availability = availability; + _availability_cloud = isAvailableCloud; + _availability_proximity = isAvailableProximity; + } + + public String getName() { + return _sessionName; + } + public byte[] getAvatar() { + return _avatar; + } + public String getSessionId() { + return _sessionId; + } + public UUID[] getAppList() { + return _appList; + } + @Override + public int compareTo(Peer o) { + return getSessionId().compareTo(o.getSessionId()); + } + public boolean getAvailability() { + return _availability; + } + public boolean isAvailableCloud(){ + return _availability_cloud; + } + public boolean isAvailableProximity(){ + return _availability_proximity; + } +} diff --git a/samples/EarthWarrior3D-CSDK/proj.android/src/org/cocos2dx/cpp/AppActivity.java b/samples/EarthWarrior3D-CSDK/proj.android/src/org/cocos2dx/cpp/AppActivity.java new file mode 100644 index 0000000..5997710 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/src/org/cocos2dx/cpp/AppActivity.java @@ -0,0 +1,355 @@ +/**************************************************************************** +Copyright (c) 2008-2010 Ricardo Quesada +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2011 Zynga Inc. +Copyright (c) 2013-2014 Chukong Technologies Inc. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ +package org.cocos2dx.cpp; + +import java.io.ByteArrayOutputStream; + +import org.cocos2dx.lib.Cocos2dxActivity; +import org.cocos2dx.lib.Cocos2dxGLSurfaceView; + +import android.annotation.SuppressLint; +import android.app.AlertDialog; +import android.app.Dialog; +import android.app.ProgressDialog; +import android.content.ComponentName; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.ServiceConnection; +import android.content.SharedPreferences; +import android.content.SharedPreferences.Editor; +import android.content.res.Configuration; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.Bitmap.CompressFormat; +import android.os.Bundle; +import android.os.Handler; +import android.os.IBinder; +import android.os.Message; +import android.util.Base64; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.EditText; +import android.widget.Toast; + +import com.Cocos2dx.Moon3d.R; +import com.intel.csdk.listeners.P2PEventListener; +import com.intel.csdk.wrapper.Peer; + +@SuppressLint("HandlerLeak") +public class AppActivity extends Cocos2dxActivity implements P2PEventListener { + private String mServiceIntent = "org.cocos2dx.cpp.ApplicationService"; + private Handler mHandler = new MyHandler(); + private boolean isBound; + private static final String LOGC = "Helloccf"; + private ApplicationServiceConnection mConnection = new ApplicationServiceConnection(); + private ApplicationService mService; + private SharedPreferences mPreference; + public static AppActivity sAppActivity = null; + private Dialog inviteDialog = null; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + mPreference = getSharedPreferences(LOGC, Context.MODE_PRIVATE); + startService(new Intent(mServiceIntent)); + + mPreference = getSharedPreferences("Helloccf", Context.MODE_PRIVATE); + sAppActivity = this; + } + + public Cocos2dxGLSurfaceView onCreateView() { + Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this); + glSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8); + return glSurfaceView; + } + + @Override + protected void onResume() { + Log.i(LOGC, "resuming"); + doBindService(); + super.onResume(); + } + + + @Override + protected void onPause() { + Log.i(LOGC, "pausing"); + doUnbindService(); + super.onPause(); + } + + /* private method to do the binding */ + private void doBindService() { + if(!isBound) + { + Log.i(LOGC, "binding service"); + Intent servIntent = new Intent(mServiceIntent); + isBound = bindService(servIntent, mConnection, 0); + if( !isBound ) + Log.i(LOGC, "service did not bind."); + } + } + + /* private method to do the unbinding */ + private void doUnbindService() { + if(isBound) + { + Log.i(LOGC, "unbinding service "); + isBound = false; + unbindService(mConnection); + } + } + + /*** + * Must be called by the 'starting activity'. Can be called more than once, but + * should not be called anytime after 'shutdown' has been called. + */ + protected void doStartService() { + Log.i(LOGC, "starting service"); + Intent servIntent = new Intent(mServiceIntent); + startService(servIntent); + } + + /*** + * Called to indicate that the application is finally existing. + */ + protected void doStopService() { + Log.i(LOGC, "shutting down"); + Intent servIntent = new Intent(mServiceIntent); + + mConnection.serviceExited(); + doUnbindService(); + stopService(servIntent); + } + + @Override + public void onBackPressed() + { + Log.i(LOGC, "back pressed"); + /*if(discoveryNodeFrag!=null){ + discoveryNodeFrag.removeAllDiscoveryNode(); + }*/ + finish(); + doStopService(); + super.onBackPressed(); + } + + //To save the users details in preference file. + private void setPreferences(String userName, String deviceName, String avatar){ + Editor edit = mPreference.edit(); + edit.putString("UserName", userName); + edit.putString("DeviceName", deviceName); + edit.putString("Avatar", avatar); + edit.commit(); + mService.setUserDetails(); + Log.i(LOGC, "Shared preference saved "); + } + + //Display dialog to input userName and Device Name from local user to complete unboxing process. + private void completeUnboxing(){ + Log.i(LOGC, "Identity set up started "); + + final AlertDialog.Builder alert = new AlertDialog.Builder(this); + alert.setTitle("Input your details:"); + alert.setCancelable(false); + + LayoutInflater inflater = (LayoutInflater)this.getApplicationContext() + .getSystemService(Context.LAYOUT_INFLATER_SERVICE); + View parent = inflater.inflate(R.layout.unbox_layout, null); + final EditText userName = (EditText)parent.findViewById(R.id.userName); + userName.setText(android.os.Build.MANUFACTURER+" "+android.os.Build.MODEL); + final EditText deviceName = (EditText)parent.findViewById(R.id.deviceName); + deviceName.setText("Android "+ (isTablet(this)?"Tablet" : "Phone")); + alert.setView(parent); + + alert.setPositiveButton("Save", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int whichButton) { + String user = userName.getText().toString().trim(); + String device = deviceName.getText().toString().trim(); + + Bitmap bitmap = BitmapFactory.decodeResource(AppActivity.this.getResources(), R.drawable.icon); + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + bitmap.compress(CompressFormat.PNG, 0, bos); + byte [] avatar = bos.toByteArray(); + String saveAvatar = Base64.encodeToString(avatar, Base64.DEFAULT); + + Log.i(LOGC, "User Input completed -----> "); + + setPreferences(user!=null && !user.equals("")?user:android.os.Build.MANUFACTURER+android.os.Build.MODEL,device!=null && !device.equals("")?device:"Android",saveAvatar); + } + }); + alert.show(); + } + + //Validating device is a Tablet or Phone. + private boolean isTablet(Context context) { + return (context.getResources().getConfiguration().screenLayout + & Configuration.SCREENLAYOUT_SIZE_MASK) + >= Configuration.SCREENLAYOUT_SIZE_LARGE; + } + + /* ServiceConnection implementation to bind Service and Activity class*/ + public class ApplicationServiceConnection implements ServiceConnection + { + boolean serviceStopped = false; + + public void onServiceConnected(ComponentName className, IBinder binder) + { + synchronized(this) { + Log.i(LOGC, "service connected."); + if(mService == null){ + mService = (ApplicationService)((ApplicationService.LocalBinder)binder).getService(); + mService.setHandler(mHandler); + mService.intializeJNIPlatform(); + + mService.setChatListener(AppActivity.this); + } + } + } + + public void onServiceDisconnected(ComponentName className) + { + Log.i(LOGC, "service disconnected."); + mService.stopSelf(); + } + + public void serviceExited() + { + synchronized(this) { + serviceStopped = true; + } + } + } + + /** + * This handler class is used to handle Activity events. + * + */ + private class MyHandler extends Handler{ + @Override + public void handleMessage(Message msg) { + //if(msg.what !=4) FriendViewByCCF.getInstance().hideWindow(); + + super.handleMessage(msg); + + switch(msg.what){ + + case 0: + //Set your identity. + completeUnboxing(); + break; + case 1: + //Invite received + inviteAlert(); + break; + case 2: + //Send invitation + inviteDialog = ProgressDialog.show(AppActivity.this, "", "Waiting for connection"); + break; + case 3: + //Sent invitation acknowledgment. + if(inviteDialog!=null && inviteDialog.isShowing()){ + inviteDialog.dismiss(); + } + + break; + case 5: + //Invitation rejected or timeout + if(inviteDialog!=null && inviteDialog.isShowing()){ + inviteDialog.dismiss(); + if(msg.arg1 == 0){ + Toast.makeText(AppActivity.this, "Invitation timeout!!", Toast.LENGTH_SHORT).show(); + }else{ + Toast.makeText(AppActivity.this, "Invitation rejected!!", Toast.LENGTH_SHORT).show(); + } + } + break; + } + + } + } + + //Invitation dialog to receive input from user + private void inviteAlert(){ + final AlertDialog.Builder builder = new AlertDialog.Builder(this); + + mHandler.post(new Runnable() { + + public void run() { + + builder.setPositiveButton("Accept", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + mService.sendInviteResponse(true); + } + }); + builder.setNegativeButton("Ignore", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + mService.sendInviteResponse(false); + } + }); + + builder.setTitle("Earth Warrior invite"); + builder.setMessage("Accept connection from "+mService.getInviterDetails()+" ?"); + builder.setCancelable(false); + builder.show(); + } + }); + } + + @Override + public void P2PMessageUpdate(String msg) { + } + + @Override + public void disconnectP2P() { + } + + public static void invitePeer(Peer peer) { + Log.i(LOGC, "invitePeer in AppActivity"); + AppActivity.sAppActivity.mService.invitePeer(peer); + } + + public static void sendInviteResponse(boolean value) { + Log.i(LOGC, "invitePeer in sendInviteResponse"); + AppActivity.sAppActivity.mService.sendInviteResponse(value); + } + + public static void remoteDisconnectJni() { + Log.i(LOGC, "invitePeer in remoteDisconnectJni"); + AppActivity.sAppActivity.mService.disconnectConnection(); + } + + public static void sendMessage(String msg) { + AppActivity.sAppActivity.mService.sendMsg2JNI(msg); + } + + public static void friendControl(String type) { + AppActivity.sAppActivity.mService.sendMsg2JNI(type); + } +} diff --git a/samples/EarthWarrior3D-CSDK/proj.android/src/org/cocos2dx/cpp/ApplicationService.java b/samples/EarthWarrior3D-CSDK/proj.android/src/org/cocos2dx/cpp/ApplicationService.java new file mode 100755 index 0000000..2044faa --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.android/src/org/cocos2dx/cpp/ApplicationService.java @@ -0,0 +1,274 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package org.cocos2dx.cpp; + +import java.util.UUID; + +import android.app.Service; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.os.Binder; +import android.os.Handler; +import android.os.IBinder; +import android.os.Message; +import android.util.Base64; +import android.util.Log; + +import com.intel.csdk.listeners.P2PEventListener; +import com.intel.csdk.listeners.JNIListener; +import com.intel.csdk.wrapper.Connection; +import com.intel.csdk.wrapper.Initialization; +import com.intel.csdk.wrapper.Peer; + +/** + * This is a service class which will listen to wrapper classes like Initialization, Discovery, + * and Connection module. + * This service is responsible for following functionalities: + *

Initializing the application. + *

To register the discovery process and will discover other sessions. + *

To register the connection process to communicate with other sessions. + *

sending and receiving Invitation. + *

Sending and receiving messages. + *

+ * + */ +public class ApplicationService extends Service implements JNIListener{ + + private LocalBinder mBinder = new LocalBinder(); + private Handler mHandler; + private static final String LOGC = "Helloccf"; + private Initialization mInitialize = null; + SharedPreferences mPreference; + private Connection mConnect = null; + /** + * Binder class used to bind the service with Activity. + * + */ + public class LocalBinder extends Binder { + ApplicationService getService() { + // Return this instance of LocalService so clients can call public methods + return ApplicationService.this; + } + } + + /*Service life cycle callback, on binding the service.*/ + @Override + public IBinder onBind(Intent intent) { + + return mBinder; + } + + /*This method will set the Hanlder passed through Activity.*/ + public void setHandler(Handler handle){ + mHandler = handle; + } + + //To validate the user details saved in preference file. + private boolean validatePreferences(){ + if(mPreference.contains("UserName") && mPreference.contains("DeviceName")){ + return true; + } + return false; + } + + /** + * This method will pass the user details to Initialization wrapper. + */ + public void setUserDetails(){ + String userName = mPreference.getString("UserName", "No Data available"); + String deviceName = mPreference.getString("DeviceName", "No Data available"); + String temp = mPreference.getString("Avatar", "No Data available"); + byte[] avatar = Base64.decode(temp, Base64.DEFAULT); + mInitialize.initialize("7A1B397B-B576-44C4-943F-1BEF4F490C07", "WqODOHahg3xw6WVB0BbTMi9yazTkBoQH", "i8wP2TGxoVjINdX7", userName, deviceName, avatar); + } + + //To receive identity details from user by passing the event to activity, + private void receiveInputFromUser(Initialization init){ + mPreference = getSharedPreferences(LOGC, Context.MODE_PRIVATE); + + if(validatePreferences()){ + setUserDetails(); + }else{ + Message msg = Message.obtain(); + msg.what = 0; + mHandler.sendMessage(msg); + Log.i(LOGC, "Showing dialog to receive input from user."); + } + } + + /** + * This method is used to initialize the Initialization wrapper + */ + public void intializeJNIPlatform(){ + if(mInitialize == null){ + mInitialize = new Initialization(getApplicationContext(),ApplicationService.this); + receiveInputFromUser(mInitialize); + } + } + + @Override + public void onPeerUpdated(Peer peer) { + + Log.i(LOGC, "onPeerUpdated: "+peer.getName()); + final UUID app_id = UUID.fromString("7A1B397B-B576-44C4-943F-1BEF4F490C07"); + for(UUID hasapp : peer.getAppList()){ + if(hasapp.compareTo(app_id)==0){ + if(peer.getAvailability()){ + //mPeerAdapter.add(peer); + }else{ + //mPeerAdapter.remove(peer); + } + break; + } + } + Message msg = Message.obtain(); + msg.what = 4; + mHandler.sendMessage(msg); + } + + public void invitePeer(Peer peer){ + Log.i(LOGC, "Inviting Peer: "+peer.getName()); + mConnect.requestP2PConnection(peer.getSessionId()); + Message msg = Message.obtain(); + msg.what = 2; + mHandler.sendMessage(msg); + mInviteHandler = new InviteHandler(peer, -1); + } + + @Override + public void onP2PConnectionStatus(Peer peer, long value) { + + if(peer!=null) + Log.i(LOGC, "peer: "+peer.getName()+" Connection status: "+value); + + switch((int)value){ + + case 10: + //Invitation timeout + Message msg10 = Message.obtain(); + msg10.what = 5; + msg10.arg1 = 0; + mHandler.sendMessage(msg10); + break; + case 12: + //Invitation accepted. + Message msg12 = Message.obtain(); + msg12.what = 3; + mHandler.sendMessage(msg12); + break; + case 13: + //Invitation rejected + Message msg13 = Message.obtain(); + msg13.what = 5; + msg13.arg1 = 1; + mHandler.sendMessage(msg13); + break; + case 14: + //Invitation completed. + Message msg14 = Message.obtain(); + msg14.what = 3; + mHandler.sendMessage(msg14); + break; + case 25: + //Invitation disconnected + if(mP2PListener!=null){ + mP2PListener.disconnectP2P(); + } + break; + + } + + } + + @Override + public void receiveP2PMessage(String msg) { + Log.i(LOGC, "peer Msg: "+ msg); + if(mP2PListener!=null){ + mP2PListener.P2PMessageUpdate(msg); + } + } + + @Override + public void onP2PConnectionRequest(Peer peer, long handle) { + mInviteHandler = new InviteHandler(peer, handle); + } + + private InviteHandler mInviteHandler; + private class InviteHandler{ + private Peer mPeer; + private long mHandle; + public InviteHandler(Peer peer, long handle) { + mPeer = peer; + mHandle = handle; + } + public long getConnectionHandle(){ + return mHandle; + } + public Peer getPeer(){ + return mPeer; + } + } + + public String getInviterDetails(){ + return mInviteHandler.getPeer().getName(); + } + + public void sendInviteResponse(boolean value){ + mConnect.notifyP2PRequestACK(mInviteHandler.getPeer(), mInviteHandler.getConnectionHandle(), value); + } + + @Override + public void onJNIStatusUpdate(JNIStatus status) { + + if(status.equals(JNIStatus.INITIALIZED)){ + mConnect = new Connection(mInitialize); + mConnect.notifyRegisterCommunication(); + mConnect.notifyRegisterDiscovery(); + } + + } + + private P2PEventListener mP2PListener; + public void setChatListener(P2PEventListener listener){ + mP2PListener = listener; + } + + public void sendMsg2JNI(String msg){ + if(mConnect!=null){ + mConnect.sendP2PMessage(msg); + } + } + + public void disconnectConnection(){ + if(mConnect!=null && mInviteHandler!=null){ + mConnect.disconnectP2PConnection(mInviteHandler.getPeer()); + } + } +} diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/EarthWarrior3D.xcodeproj/project.pbxproj b/samples/EarthWarrior3D-CSDK/proj.ios_mac/EarthWarrior3D.xcodeproj/project.pbxproj new file mode 100755 index 0000000..94f7a77 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.ios_mac/EarthWarrior3D.xcodeproj/project.pbxproj @@ -0,0 +1,1539 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1AC6FB1F180E996B004C840B /* libbox2d Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FAFF180E9839004C840B /* libbox2d Mac.a */; }; + 1AC6FB20180E996B004C840B /* libchipmunk Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FAFD180E9839004C840B /* libchipmunk Mac.a */; }; + 1AC6FB21180E996B004C840B /* libcocos2dx Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FAF9180E9839004C840B /* libcocos2dx Mac.a */; }; + 1AC6FB22180E996B004C840B /* libcocos2dx-extensions Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FAFB180E9839004C840B /* libcocos2dx-extensions Mac.a */; }; + 1AC6FB23180E996B004C840B /* libCocosDenshion Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB01180E9839004C840B /* libCocosDenshion Mac.a */; }; + 1AC6FB2E180E99EB004C840B /* libbox2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB0D180E9839004C840B /* libbox2d iOS.a */; }; + 1AC6FB2F180E99EB004C840B /* libchipmunk iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB0B180E9839004C840B /* libchipmunk iOS.a */; }; + 1AC6FB30180E99EB004C840B /* libcocos2dx iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB07180E9839004C840B /* libcocos2dx iOS.a */; }; + 1AC6FB31180E99EB004C840B /* libcocos2dx-extensions iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB09180E9839004C840B /* libcocos2dx-extensions iOS.a */; }; + 1AC6FB32180E99EB004C840B /* libCocosDenshion iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB0F180E9839004C840B /* libCocosDenshion iOS.a */; }; + 1AFAF8B716D35DE700DB1158 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFAF8B316D35DE700DB1158 /* AppDelegate.cpp */; }; + 1AFAF8B816D35DE700DB1158 /* HelloWorldScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFAF8B516D35DE700DB1158 /* HelloWorldScene.cpp */; }; + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; + 503AE0F817EB97AB00D1A890 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 503AE0F617EB97AB00D1A890 /* Icon.icns */; }; + 503AE10017EB989F00D1A890 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503AE0FB17EB989F00D1A890 /* AppController.mm */; }; + 503AE10117EB989F00D1A890 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 503AE0FC17EB989F00D1A890 /* main.m */; }; + 503AE10217EB989F00D1A890 /* RootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503AE0FF17EB989F00D1A890 /* RootViewController.mm */; }; + 503AE10517EB98FF00D1A890 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 503AE10317EB98FF00D1A890 /* main.cpp */; }; + 503AE11217EB99EE00D1A890 /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 503AE11117EB99EE00D1A890 /* libcurl.dylib */; }; + 503AE11B17EB9C5A00D1A890 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 503AE11A17EB9C5A00D1A890 /* IOKit.framework */; }; + 5087E75717EB910900C73F5D /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFAF8B316D35DE700DB1158 /* AppDelegate.cpp */; }; + 5087E75817EB910900C73F5D /* HelloWorldScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFAF8B516D35DE700DB1158 /* HelloWorldScene.cpp */; }; + 5087E76317EB910900C73F5D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 5087E76517EB910900C73F5D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; + 5087E76717EB910900C73F5D /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB412928DE900B8313A /* libz.dylib */; }; + 5087E76817EB910900C73F5D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF1C47EA1293683800B63C5D /* QuartzCore.framework */; }; + 5087E76917EB910900C73F5D /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620B132DFF330009C878 /* OpenAL.framework */; }; + 5087E76A17EB910900C73F5D /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620D132DFF430009C878 /* AVFoundation.framework */; }; + 5087E76B17EB910900C73F5D /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620F132DFF4E0009C878 /* AudioToolbox.framework */; }; + 5087E77D17EB970100C73F5D /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77217EB970100C73F5D /* Default-568h@2x.png */; }; + 5087E77E17EB970100C73F5D /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77317EB970100C73F5D /* Default.png */; }; + 5087E77F17EB970100C73F5D /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77417EB970100C73F5D /* Default@2x.png */; }; + 5087E78017EB970100C73F5D /* Icon-114.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77517EB970100C73F5D /* Icon-114.png */; }; + 5087E78117EB970100C73F5D /* Icon-120.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77617EB970100C73F5D /* Icon-120.png */; }; + 5087E78217EB970100C73F5D /* Icon-144.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77717EB970100C73F5D /* Icon-144.png */; }; + 5087E78317EB970100C73F5D /* Icon-152.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77817EB970100C73F5D /* Icon-152.png */; }; + 5087E78417EB970100C73F5D /* Icon-57.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77917EB970100C73F5D /* Icon-57.png */; }; + 5087E78517EB970100C73F5D /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77A17EB970100C73F5D /* Icon-72.png */; }; + 5087E78617EB970100C73F5D /* Icon-76.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77B17EB970100C73F5D /* Icon-76.png */; }; + 5087E78917EB974C00C73F5D /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5087E78817EB974C00C73F5D /* AppKit.framework */; }; + 5087E78B17EB975400C73F5D /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5087E78A17EB975400C73F5D /* OpenGL.framework */; }; + 50EF629617ECD46A001EB2F8 /* Icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF629217ECD46A001EB2F8 /* Icon-40.png */; }; + 50EF629717ECD46A001EB2F8 /* Icon-58.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF629317ECD46A001EB2F8 /* Icon-58.png */; }; + 50EF629817ECD46A001EB2F8 /* Icon-80.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF629417ECD46A001EB2F8 /* Icon-80.png */; }; + 50EF629917ECD46A001EB2F8 /* Icon-100.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF629517ECD46A001EB2F8 /* Icon-100.png */; }; + 50EF62A217ECD613001EB2F8 /* Icon-29.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF62A017ECD613001EB2F8 /* Icon-29.png */; }; + 50EF62A317ECD613001EB2F8 /* Icon-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF62A117ECD613001EB2F8 /* Icon-50.png */; }; + 76B5F2F2195C47BC00C15B36 /* boss.c3b in Resources */ = {isa = PBXBuildFile; fileRef = 76B5F2EB195C47BC00C15B36 /* boss.c3b */; }; + 76B5F2F3195C47BC00C15B36 /* bossCannon.c3b in Resources */ = {isa = PBXBuildFile; fileRef = 76B5F2EC195C47BC00C15B36 /* bossCannon.c3b */; }; + 76B5F2F4195C47BC00C15B36 /* coconut.c3b in Resources */ = {isa = PBXBuildFile; fileRef = 76B5F2ED195C47BC00C15B36 /* coconut.c3b */; }; + 76B5F2F5195C47BC00C15B36 /* daodanv001.c3b in Resources */ = {isa = PBXBuildFile; fileRef = 76B5F2EE195C47BC00C15B36 /* daodanv001.c3b */; }; + 76B5F2F6195C47BC00C15B36 /* diji1_v002.c3b in Resources */ = {isa = PBXBuildFile; fileRef = 76B5F2EF195C47BC00C15B36 /* diji1_v002.c3b */; }; + 76B5F2F7195C47BC00C15B36 /* dijiyuanv001.c3b in Resources */ = {isa = PBXBuildFile; fileRef = 76B5F2F0195C47BC00C15B36 /* dijiyuanv001.c3b */; }; + 76B5F2F8195C47BC00C15B36 /* playerv002.c3b in Resources */ = {isa = PBXBuildFile; fileRef = 76B5F2F1195C47BC00C15B36 /* playerv002.c3b */; }; + AB2EA97A196BF8F2005FC902 /* boss.c3b in Resources */ = {isa = PBXBuildFile; fileRef = 76B5F2EB195C47BC00C15B36 /* boss.c3b */; }; + AB2EA97B196BF8F2005FC902 /* bossCannon.c3b in Resources */ = {isa = PBXBuildFile; fileRef = 76B5F2EC195C47BC00C15B36 /* bossCannon.c3b */; }; + AB2EA97C196BF8F2005FC902 /* coconut.c3b in Resources */ = {isa = PBXBuildFile; fileRef = 76B5F2ED195C47BC00C15B36 /* coconut.c3b */; }; + AB2EA97D196BF8F2005FC902 /* daodanv001.c3b in Resources */ = {isa = PBXBuildFile; fileRef = 76B5F2EE195C47BC00C15B36 /* daodanv001.c3b */; }; + AB2EA97E196BF8F2005FC902 /* diji1_v002.c3b in Resources */ = {isa = PBXBuildFile; fileRef = 76B5F2EF195C47BC00C15B36 /* diji1_v002.c3b */; }; + AB2EA97F196BF8F2005FC902 /* dijiyuanv001.c3b in Resources */ = {isa = PBXBuildFile; fileRef = 76B5F2F0195C47BC00C15B36 /* dijiyuanv001.c3b */; }; + AB2EA980196BF8F2005FC902 /* playerv002.c3b in Resources */ = {isa = PBXBuildFile; fileRef = 76B5F2F1195C47BC00C15B36 /* playerv002.c3b */; }; + AC1904AD198B72BF00A2307E /* backtotopnormal.png in Resources */ = {isa = PBXBuildFile; fileRef = AC1904A7198B72BF00A2307E /* backtotopnormal.png */; }; + AC1904AE198B72BF00A2307E /* backtotopnormal.png in Resources */ = {isa = PBXBuildFile; fileRef = AC1904A7198B72BF00A2307E /* backtotopnormal.png */; }; + AC1904AF198B72BF00A2307E /* backtotoppressed.png in Resources */ = {isa = PBXBuildFile; fileRef = AC1904A8198B72BF00A2307E /* backtotoppressed.png */; }; + AC1904B0198B72BF00A2307E /* backtotoppressed.png in Resources */ = {isa = PBXBuildFile; fileRef = AC1904A8198B72BF00A2307E /* backtotoppressed.png */; }; + AC1904B1198B72BF00A2307E /* listviewbg.png in Resources */ = {isa = PBXBuildFile; fileRef = AC1904A9198B72BF00A2307E /* listviewbg.png */; }; + AC1904B2198B72BF00A2307E /* listviewbg.png in Resources */ = {isa = PBXBuildFile; fileRef = AC1904A9198B72BF00A2307E /* listviewbg.png */; }; + AC1904B3198B72BF00A2307E /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = AC1904AA198B72BF00A2307E /* CloseNormal.png */; }; + AC1904B4198B72BF00A2307E /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = AC1904AA198B72BF00A2307E /* CloseNormal.png */; }; + AC1904B5198B72BF00A2307E /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = AC1904AB198B72BF00A2307E /* CloseSelected.png */; }; + AC1904B6198B72BF00A2307E /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = AC1904AB198B72BF00A2307E /* CloseSelected.png */; }; + AC1904B7198B72BF00A2307E /* HelloWorld.png in Resources */ = {isa = PBXBuildFile; fileRef = AC1904AC198B72BF00A2307E /* HelloWorld.png */; }; + AC1904B8198B72BF00A2307E /* HelloWorld.png in Resources */ = {isa = PBXBuildFile; fileRef = AC1904AC198B72BF00A2307E /* HelloWorld.png */; }; + AC1904C5198B733900A2307E /* FriendControlScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC1904C1198B733900A2307E /* FriendControlScene.cpp */; }; + AC1904C6198B733900A2307E /* FriendControlScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC1904C1198B733900A2307E /* FriendControlScene.cpp */; }; + AC1904C8198B736B00A2307E /* potion2.png in Resources */ = {isa = PBXBuildFile; fileRef = AC1904C7198B736B00A2307E /* potion2.png */; }; + AC1904C9198B736B00A2307E /* potion2.png in Resources */ = {isa = PBXBuildFile; fileRef = AC1904C7198B736B00A2307E /* potion2.png */; }; + AC1904CC198B75D400A2307E /* CCFPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC1904CA198B75D400A2307E /* CCFPlayer.cpp */; }; + AC1904CD198B75D400A2307E /* CCFPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC1904CA198B75D400A2307E /* CCFPlayer.cpp */; }; + AC1904D0198B78F800A2307E /* ConnectionInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC1904CE198B78F800A2307E /* ConnectionInterface.cpp */; }; + AC1904D1198B78F800A2307E /* ConnectionInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC1904CE198B78F800A2307E /* ConnectionInterface.cpp */; }; + AC1904D4198B7A9200A2307E /* CCFLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC1904D2198B7A9200A2307E /* CCFLayer.cpp */; }; + AC1904D5198B7A9200A2307E /* CCFLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC1904D2198B7A9200A2307E /* CCFLayer.cpp */; }; + AC1904D8198B7B4B00A2307E /* PeerButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC1904D6198B7B4B00A2307E /* PeerButton.cpp */; }; + AC1904D9198B7B4B00A2307E /* PeerButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC1904D6198B7B4B00A2307E /* PeerButton.cpp */; }; + AC1904DC198B7BC800A2307E /* PopLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC1904DA198B7BC800A2307E /* PopLayer.cpp */; }; + AC1904DD198B7BC800A2307E /* PopLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC1904DA198B7BC800A2307E /* PopLayer.cpp */; }; + AC2852911994684D00A2A767 /* pkstart.png in Resources */ = {isa = PBXBuildFile; fileRef = AC2852901994684D00A2A767 /* pkstart.png */; }; + B21386761925C30000A2C310 /* Sprite3DEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B21386741925C30000A2C310 /* Sprite3DEffect.cpp */; }; + B21386771925C30000A2C310 /* Sprite3DEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B21386741925C30000A2C310 /* Sprite3DEffect.cpp */; }; + B213867B1925C60E00A2C310 /* Shaders3D in Resources */ = {isa = PBXBuildFile; fileRef = B213867A1925C60E00A2C310 /* Shaders3D */; }; + B213867C1925C60E00A2C310 /* Shaders3D in Resources */ = {isa = PBXBuildFile; fileRef = B213867A1925C60E00A2C310 /* Shaders3D */; }; + BB0C48A9190910CE0015152C /* AirCraft.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4882190910CE0015152C /* AirCraft.cpp */; }; + BB0C48AA190910CE0015152C /* AirCraft.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4882190910CE0015152C /* AirCraft.cpp */; }; + BB0C48AB190910CE0015152C /* Bullets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4884190910CE0015152C /* Bullets.cpp */; }; + BB0C48AC190910CE0015152C /* Bullets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4884190910CE0015152C /* Bullets.cpp */; }; + BB0C48AD190910CE0015152C /* Effects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4887190910CE0015152C /* Effects.cpp */; }; + BB0C48AE190910CE0015152C /* Effects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4887190910CE0015152C /* Effects.cpp */; }; + BB0C48AF190910CE0015152C /* Enemies.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4889190910CE0015152C /* Enemies.cpp */; }; + BB0C48B0190910CE0015152C /* Enemies.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4889190910CE0015152C /* Enemies.cpp */; }; + BB0C48B1190910CE0015152C /* Explosion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C488B190910CE0015152C /* Explosion.cpp */; }; + BB0C48B2190910CE0015152C /* Explosion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C488B190910CE0015152C /* Explosion.cpp */; }; + BB0C48B3190910CE0015152C /* GameControllers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C488D190910CE0015152C /* GameControllers.cpp */; }; + BB0C48B4190910CE0015152C /* GameControllers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C488D190910CE0015152C /* GameControllers.cpp */; }; + BB0C48B5190910CE0015152C /* GameEntity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C488F190910CE0015152C /* GameEntity.cpp */; }; + BB0C48B6190910CE0015152C /* GameEntity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C488F190910CE0015152C /* GameEntity.cpp */; }; + BB0C48B7190910CE0015152C /* GameLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4891190910CE0015152C /* GameLayer.cpp */; }; + BB0C48B8190910CE0015152C /* GameLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4891190910CE0015152C /* GameLayer.cpp */; }; + BB0C48B9190910CE0015152C /* GameOverLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4893190910CE0015152C /* GameOverLayer.cpp */; }; + BB0C48BA190910CE0015152C /* GameOverLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4893190910CE0015152C /* GameOverLayer.cpp */; }; + BB0C48BB190910CE0015152C /* LicenseLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4895190910CE0015152C /* LicenseLayer.cpp */; }; + BB0C48BC190910CE0015152C /* LicenseLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4895190910CE0015152C /* LicenseLayer.cpp */; }; + BB0C48BD190910CE0015152C /* LoadingScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4897190910CE0015152C /* LoadingScene.cpp */; }; + BB0C48BE190910CE0015152C /* LoadingScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4897190910CE0015152C /* LoadingScene.cpp */; }; + BB0C48BF190910CE0015152C /* MainMenuScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4899190910CE0015152C /* MainMenuScene.cpp */; }; + BB0C48C0190910CE0015152C /* MainMenuScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4899190910CE0015152C /* MainMenuScene.cpp */; }; + BB0C48C1190910CE0015152C /* ParticleManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C489B190910CE0015152C /* ParticleManager.cpp */; }; + BB0C48C2190910CE0015152C /* ParticleManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C489B190910CE0015152C /* ParticleManager.cpp */; }; + BB0C48C3190910CE0015152C /* Plane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C489D190910CE0015152C /* Plane.cpp */; }; + BB0C48C4190910CE0015152C /* Plane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C489D190910CE0015152C /* Plane.cpp */; }; + BB0C48C5190910CE0015152C /* Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C489F190910CE0015152C /* Player.cpp */; }; + BB0C48C6190910CE0015152C /* Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C489F190910CE0015152C /* Player.cpp */; }; + BB0C48C7190910CE0015152C /* PublicApi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C48A1190910CE0015152C /* PublicApi.cpp */; }; + BB0C48C8190910CE0015152C /* PublicApi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C48A1190910CE0015152C /* PublicApi.cpp */; }; + BB0C4901190910E70015152C /* boom.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CB190910E60015152C /* boom.mp3 */; }; + BB0C4902190910E70015152C /* boom.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CB190910E60015152C /* boom.mp3 */; }; + BB0C4903190910E70015152C /* boom2.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CC190910E60015152C /* boom2.mp3 */; }; + BB0C4904190910E70015152C /* boom2.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CC190910E60015152C /* boom2.mp3 */; }; + BB0C4905190910E70015152C /* boss.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CD190910E60015152C /* boss.obj */; }; + BB0C4906190910E70015152C /* boss.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CD190910E60015152C /* boss.obj */; }; + BB0C4907190910E70015152C /* boss.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CE190910E60015152C /* boss.png */; }; + BB0C4908190910E70015152C /* boss.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CE190910E60015152C /* boss.png */; }; + BB0C4909190910E70015152C /* bossCannon.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CF190910E60015152C /* bossCannon.obj */; }; + BB0C490A190910E70015152C /* bossCannon.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CF190910E60015152C /* bossCannon.obj */; }; + BB0C490B190910E70015152C /* bullets.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D0190910E60015152C /* bullets.png */; }; + BB0C490C190910E70015152C /* bullets.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D0190910E60015152C /* bullets.png */; }; + BB0C490D190910E70015152C /* coco.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D1190910E60015152C /* coco.png */; }; + BB0C490E190910E70015152C /* coco.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D1190910E60015152C /* coco.png */; }; + BB0C490F190910E70015152C /* coconut.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D2190910E60015152C /* coconut.obj */; }; + BB0C4910190910E70015152C /* coconut.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D2190910E60015152C /* coconut.obj */; }; + BB0C4911190910E70015152C /* credits_03.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D3190910E60015152C /* credits_03.png */; }; + BB0C4912190910E70015152C /* credits_03.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D3190910E60015152C /* credits_03.png */; }; + BB0C4913190910E70015152C /* daodan_32.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D4190910E60015152C /* daodan_32.png */; }; + BB0C4914190910E70015152C /* daodan_32.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D4190910E60015152C /* daodan_32.png */; }; + BB0C4915190910E70015152C /* daodanv001.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D5190910E60015152C /* daodanv001.obj */; }; + BB0C4916190910E70015152C /* daodanv001.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D5190910E60015152C /* daodanv001.obj */; }; + BB0C4917190910E70015152C /* debris.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D6190910E60015152C /* debris.plist */; }; + BB0C4918190910E70015152C /* debris.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D6190910E60015152C /* debris.plist */; }; + BB0C4919190910E70015152C /* diji1_v001.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D7190910E60015152C /* diji1_v001.obj */; }; + BB0C491A190910E70015152C /* diji1_v001.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D7190910E60015152C /* diji1_v001.obj */; }; + BB0C491B190910E70015152C /* diji1_v002.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D8190910E60015152C /* diji1_v002.obj */; }; + BB0C491C190910E70015152C /* diji1_v002.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D8190910E60015152C /* diji1_v002.obj */; }; + BB0C491D190910E70015152C /* diji02_v002_128.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D9190910E60015152C /* diji02_v002_128.png */; }; + BB0C491E190910E70015152C /* diji02_v002_128.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D9190910E60015152C /* diji02_v002_128.png */; }; + BB0C491F190910E70015152C /* dijiyuanv001.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DA190910E60015152C /* dijiyuanv001.obj */; }; + BB0C4920190910E70015152C /* dijiyuanv001.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DA190910E60015152C /* dijiyuanv001.obj */; }; + BB0C4921190910E70015152C /* dijiyuanv001.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DB190910E60015152C /* dijiyuanv001.png */; }; + BB0C4922190910E70015152C /* dijiyuanv001.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DB190910E60015152C /* dijiyuanv001.png */; }; + BB0C4923190910E70015152C /* emission.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DC190910E60015152C /* emission.plist */; }; + BB0C4924190910E70015152C /* emission.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DC190910E60015152C /* emission.plist */; }; + BB0C4925190910E70015152C /* emissionPart.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DD190910E60015152C /* emissionPart.plist */; }; + BB0C4926190910E70015152C /* emissionPart.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DD190910E60015152C /* emissionPart.plist */; }; + BB0C4927190910E70015152C /* engine.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DE190910E60015152C /* engine.plist */; }; + BB0C4928190910E70015152C /* engine.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DE190910E60015152C /* engine.plist */; }; + BB0C4929190910E70015152C /* explodeEffect.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DF190910E60015152C /* explodeEffect.mp3 */; }; + BB0C492A190910E70015152C /* explodeEffect.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DF190910E60015152C /* explodeEffect.mp3 */; }; + BB0C492B190910E70015152C /* flare.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E0190910E60015152C /* flare.plist */; }; + BB0C492C190910E70015152C /* flare.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E0190910E60015152C /* flare.plist */; }; + BB0C492D190910E70015152C /* Flux2.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E1190910E60015152C /* Flux2.mp3 */; }; + BB0C492E190910E70015152C /* Flux2.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E1190910E60015152C /* Flux2.mp3 */; }; + BB0C492F190910E70015152C /* Marker Felt.ttf in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E3190910E60015152C /* Marker Felt.ttf */; }; + BB0C4930190910E70015152C /* Marker Felt.ttf in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E3190910E60015152C /* Marker Felt.ttf */; }; + BB0C4931190910E70015152C /* gameover_score_num_0.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E4190910E60015152C /* gameover_score_num_0.png */; }; + BB0C4932190910E70015152C /* gameover_score_num_0.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E4190910E60015152C /* gameover_score_num_0.png */; }; + BB0C4933190910E70015152C /* gameover_score_num.fnt in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E5190910E60015152C /* gameover_score_num.fnt */; }; + BB0C4934190910E70015152C /* gameover_score_num.fnt in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E5190910E60015152C /* gameover_score_num.fnt */; }; + BB0C4935190910E70015152C /* gameover.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E6190910E60015152C /* gameover.plist */; }; + BB0C4936190910E70015152C /* gameover.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E6190910E60015152C /* gameover.plist */; }; + BB0C4937190910E70015152C /* gameover.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E7190910E60015152C /* gameover.png */; }; + BB0C4938190910E70015152C /* gameover.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E7190910E60015152C /* gameover.png */; }; + BB0C4939190910E70015152C /* glow.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E8190910E60015152C /* glow.plist */; }; + BB0C493A190910E70015152C /* glow.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E8190910E60015152C /* glow.plist */; }; + BB0C493B190910E70015152C /* groundLevel.jpg in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E9190910E60015152C /* groundLevel.jpg */; }; + BB0C493C190910E70015152C /* groundLevel.jpg in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E9190910E60015152C /* groundLevel.jpg */; }; + BB0C493D190910E70015152C /* hit.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EA190910E60015152C /* hit.mp3 */; }; + BB0C493E190910E70015152C /* hit.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EA190910E60015152C /* hit.mp3 */; }; + BB0C493F190910E70015152C /* LICENSE_03.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EB190910E60015152C /* LICENSE_03.png */; }; + BB0C4940190910E70015152C /* LICENSE_03.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EB190910E60015152C /* LICENSE_03.png */; }; + BB0C4941190910E70015152C /* loadingAndHP.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EC190910E60015152C /* loadingAndHP.plist */; }; + BB0C4942190910E70015152C /* loadingAndHP.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EC190910E60015152C /* loadingAndHP.plist */; }; + BB0C4943190910E70015152C /* loadingAndHP.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48ED190910E60015152C /* loadingAndHP.png */; }; + BB0C4944190910E70015152C /* loadingAndHP.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48ED190910E60015152C /* loadingAndHP.png */; }; + BB0C4945190910E70015152C /* menu_scene.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EE190910E60015152C /* menu_scene.plist */; }; + BB0C4946190910E70015152C /* menu_scene.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EE190910E60015152C /* menu_scene.plist */; }; + BB0C4947190910E70015152C /* menu_scene.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EF190910E60015152C /* menu_scene.png */; }; + BB0C4948190910E70015152C /* menu_scene.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EF190910E60015152C /* menu_scene.png */; }; + BB0C4949190910E70015152C /* menuEmission.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F0190910E60015152C /* menuEmission.plist */; }; + BB0C494A190910E70015152C /* menuEmission.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F0190910E60015152C /* menuEmission.plist */; }; + BB0C494B190910E70015152C /* missileFlare.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F1190910E60015152C /* missileFlare.plist */; }; + BB0C494C190910E70015152C /* missileFlare.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F1190910E60015152C /* missileFlare.plist */; }; + BB0C494D190910E70015152C /* muzzle.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F2190910E60015152C /* muzzle.png */; }; + BB0C494E190910E70015152C /* muzzle.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F2190910E60015152C /* muzzle.png */; }; + BB0C494F190910E70015152C /* num_0.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F3190910E60015152C /* num_0.png */; }; + BB0C4950190910E70015152C /* num_0.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F3190910E60015152C /* num_0.png */; }; + BB0C4951190910E70015152C /* num.fnt in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F4190910E60015152C /* num.fnt */; }; + BB0C4952190910E70015152C /* num.fnt in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F4190910E60015152C /* num.fnt */; }; + BB0C4953190910E70015152C /* Orbital Colossus_0.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F5190910E60015152C /* Orbital Colossus_0.mp3 */; }; + BB0C4954190910E70015152C /* Orbital Colossus_0.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F5190910E60015152C /* Orbital Colossus_0.mp3 */; }; + BB0C4955190910E70015152C /* Particle.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F6190910E60015152C /* Particle.plist */; }; + BB0C4956190910E70015152C /* Particle.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F6190910E60015152C /* Particle.plist */; }; + BB0C4957190910E70015152C /* Particle.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F7190910E60015152C /* Particle.png */; }; + BB0C4958190910E70015152C /* Particle.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F7190910E60015152C /* Particle.png */; }; + BB0C4959190910E70015152C /* player_bullet_explosion.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F8190910E60015152C /* player_bullet_explosion.png */; }; + BB0C495A190910E70015152C /* player_bullet_explosion.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F8190910E60015152C /* player_bullet_explosion.png */; }; + BB0C495B190910E70015152C /* playerv002_256.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F9190910E60015152C /* playerv002_256.png */; }; + BB0C495C190910E70015152C /* playerv002_256.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F9190910E60015152C /* playerv002_256.png */; }; + BB0C495D190910E70015152C /* playerv002.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FA190910E60015152C /* playerv002.obj */; }; + BB0C495E190910E70015152C /* playerv002.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FA190910E60015152C /* playerv002.obj */; }; + BB0C495F190910E70015152C /* score_right_top.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FB190910E60015152C /* score_right_top.png */; }; + BB0C4960190910E70015152C /* score_right_top.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FB190910E60015152C /* score_right_top.png */; }; + BB0C4961190910E70015152C /* Star Chaser (2012).mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FC190910E60015152C /* Star Chaser (2012).mp3 */; }; + BB0C4962190910E70015152C /* Star Chaser (2012).mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FC190910E60015152C /* Star Chaser (2012).mp3 */; }; + BB0C4963190910E70015152C /* Star_Chaser.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FD190910E60015152C /* Star_Chaser.mp3 */; }; + BB0C4964190910E70015152C /* Star_Chaser.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FD190910E60015152C /* Star_Chaser.mp3 */; }; + BB0C4965190910E70015152C /* streak.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FE190910E60015152C /* streak.png */; }; + BB0C4966190910E70015152C /* streak.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FE190910E60015152C /* streak.png */; }; + BB0C4967190910E70015152C /* toonSmoke.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FF190910E60015152C /* toonSmoke.plist */; }; + BB0C4968190910E70015152C /* toonSmoke.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FF190910E60015152C /* toonSmoke.plist */; }; + BB0C4969190910E70015152C /* vanishingPoint.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C4900190910E70015152C /* vanishingPoint.plist */; }; + BB0C496A190910E70015152C /* vanishingPoint.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C4900190910E70015152C /* vanishingPoint.plist */; }; + BF171245129291EC00B8313A /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB012928DE900B8313A /* OpenGLES.framework */; }; + BF1712471292920000B8313A /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB412928DE900B8313A /* libz.dylib */; }; + BF1C47F01293687400B63C5D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF1C47EA1293683800B63C5D /* QuartzCore.framework */; }; + D44C620C132DFF330009C878 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620B132DFF330009C878 /* OpenAL.framework */; }; + D44C620E132DFF430009C878 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620D132DFF430009C878 /* AVFoundation.framework */; }; + D44C6210132DFF4E0009C878 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620F132DFF4E0009C878 /* AudioToolbox.framework */; }; + D6B0611B1803AB670077942B /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6B0611A1803AB670077942B /* CoreMotion.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 1AC6FAF8180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 1551A33F158F2AB200E66CFE; + remoteInfo = "cocos2dx Mac"; + }; + 1AC6FAFA180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2FD617814595006731B9; + remoteInfo = "cocos2dx-extensions Mac"; + }; + 1AC6FAFC180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2CB81780BD04006731B9; + remoteInfo = "chipmunk Mac"; + }; + 1AC6FAFE180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2D9B1780BDF7006731B9; + remoteInfo = "box2d Mac"; + }; + 1AC6FB00180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2ED617814268006731B9; + remoteInfo = "CocosDenshion Mac"; + }; + 1AC6FB06180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4D641783777C0073F6A7; + remoteInfo = "cocos2dx iOS"; + }; + 1AC6FB08180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4EFC1783867C0073F6A7; + remoteInfo = "cocos2dx-extensions iOS"; + }; + 1AC6FB0A180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4F3B178387670073F6A7; + remoteInfo = "chipmunk iOS"; + }; + 1AC6FB0C180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4F9E1783876B0073F6A7; + remoteInfo = "box2d iOS"; + }; + 1AC6FB0E180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4FB4178387730073F6A7; + remoteInfo = "CocosDenshion iOS"; + }; + 1AC6FB15180E9959004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 1551A33E158F2AB200E66CFE; + remoteInfo = "cocos2dx Mac"; + }; + 1AC6FB17180E9959004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2FC117814595006731B9; + remoteInfo = "cocos2dx-extensions Mac"; + }; + 1AC6FB19180E9959004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2B781780BD04006731B9; + remoteInfo = "chipmunk Mac"; + }; + 1AC6FB1B180E9959004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2E9817814268006731B9; + remoteInfo = "CocosDenshion Mac"; + }; + 1AC6FB1D180E9963004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2D5D1780BDF7006731B9; + remoteInfo = "box2d Mac"; + }; + 1AC6FB24180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4C241783777C0073F6A7; + remoteInfo = "cocos2dx iOS"; + }; + 1AC6FB26180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4E111783867C0073F6A7; + remoteInfo = "cocos2dx-extensions iOS"; + }; + 1AC6FB28180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4EFD178387670073F6A7; + remoteInfo = "chipmunk iOS"; + }; + 1AC6FB2A180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4F3C1783876B0073F6A7; + remoteInfo = "box2d iOS"; + }; + 1AC6FB2C180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4F9F178387730073F6A7; + remoteInfo = "CocosDenshion iOS"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../cocos2d/build/cocos2d_libs.xcodeproj; sourceTree = ""; }; + 1ACB3243164770DE00914215 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../../cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = ""; }; + 1AFAF8B316D35DE700DB1158 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AppDelegate.cpp; path = ../Classes/AppDelegate.cpp; sourceTree = ""; }; + 1AFAF8B416D35DE700DB1158 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ../Classes/AppDelegate.h; sourceTree = ""; }; + 1AFAF8B516D35DE700DB1158 /* HelloWorldScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HelloWorldScene.cpp; path = ../Classes/HelloWorldScene.cpp; sourceTree = ""; }; + 1AFAF8B616D35DE700DB1158 /* HelloWorldScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HelloWorldScene.h; path = ../Classes/HelloWorldScene.h; sourceTree = ""; }; + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1D6058910D05DD3D006BFB54 /* EarthWarrior3D iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "EarthWarrior3D iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 503AE0F617EB97AB00D1A890 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = ""; }; + 503AE0F717EB97AB00D1A890 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 503AE0FA17EB989F00D1A890 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = ios/AppController.h; sourceTree = SOURCE_ROOT; }; + 503AE0FB17EB989F00D1A890 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppController.mm; path = ios/AppController.mm; sourceTree = SOURCE_ROOT; }; + 503AE0FC17EB989F00D1A890 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ios/main.m; sourceTree = SOURCE_ROOT; }; + 503AE0FD17EB989F00D1A890 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = ios/Prefix.pch; sourceTree = SOURCE_ROOT; }; + 503AE0FE17EB989F00D1A890 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RootViewController.h; path = ios/RootViewController.h; sourceTree = SOURCE_ROOT; }; + 503AE0FF17EB989F00D1A890 /* RootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RootViewController.mm; path = ios/RootViewController.mm; sourceTree = SOURCE_ROOT; }; + 503AE10317EB98FF00D1A890 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = mac/main.cpp; sourceTree = ""; }; + 503AE10417EB98FF00D1A890 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = mac/Prefix.pch; sourceTree = ""; }; + 503AE11117EB99EE00D1A890 /* libcurl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcurl.dylib; path = usr/lib/libcurl.dylib; sourceTree = SDKROOT; }; + 503AE11A17EB9C5A00D1A890 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; + 5087E76F17EB910900C73F5D /* EarthWarrior3D Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "EarthWarrior3D Mac.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5087E77217EB970100C73F5D /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 5087E77317EB970100C73F5D /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 5087E77417EB970100C73F5D /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 5087E77517EB970100C73F5D /* Icon-114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-114.png"; sourceTree = ""; }; + 5087E77617EB970100C73F5D /* Icon-120.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-120.png"; sourceTree = ""; }; + 5087E77717EB970100C73F5D /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-144.png"; sourceTree = ""; }; + 5087E77817EB970100C73F5D /* Icon-152.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-152.png"; sourceTree = ""; }; + 5087E77917EB970100C73F5D /* Icon-57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-57.png"; sourceTree = ""; }; + 5087E77A17EB970100C73F5D /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; + 5087E77B17EB970100C73F5D /* Icon-76.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-76.png"; sourceTree = ""; }; + 5087E77C17EB970100C73F5D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5087E78817EB974C00C73F5D /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 5087E78A17EB975400C73F5D /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + 50EF629217ECD46A001EB2F8 /* Icon-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-40.png"; sourceTree = ""; }; + 50EF629317ECD46A001EB2F8 /* Icon-58.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-58.png"; sourceTree = ""; }; + 50EF629417ECD46A001EB2F8 /* Icon-80.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-80.png"; sourceTree = ""; }; + 50EF629517ECD46A001EB2F8 /* Icon-100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-100.png"; sourceTree = ""; }; + 50EF62A017ECD613001EB2F8 /* Icon-29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-29.png"; sourceTree = ""; }; + 50EF62A117ECD613001EB2F8 /* Icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-50.png"; sourceTree = ""; }; + 76B5F2EB195C47BC00C15B36 /* boss.c3b */ = {isa = PBXFileReference; lastKnownFileType = file; path = boss.c3b; sourceTree = ""; }; + 76B5F2EC195C47BC00C15B36 /* bossCannon.c3b */ = {isa = PBXFileReference; lastKnownFileType = file; path = bossCannon.c3b; sourceTree = ""; }; + 76B5F2ED195C47BC00C15B36 /* coconut.c3b */ = {isa = PBXFileReference; lastKnownFileType = file; path = coconut.c3b; sourceTree = ""; }; + 76B5F2EE195C47BC00C15B36 /* daodanv001.c3b */ = {isa = PBXFileReference; lastKnownFileType = file; path = daodanv001.c3b; sourceTree = ""; }; + 76B5F2EF195C47BC00C15B36 /* diji1_v002.c3b */ = {isa = PBXFileReference; lastKnownFileType = file; path = diji1_v002.c3b; sourceTree = ""; }; + 76B5F2F0195C47BC00C15B36 /* dijiyuanv001.c3b */ = {isa = PBXFileReference; lastKnownFileType = file; path = dijiyuanv001.c3b; sourceTree = ""; }; + 76B5F2F1195C47BC00C15B36 /* playerv002.c3b */ = {isa = PBXFileReference; lastKnownFileType = file; path = playerv002.c3b; sourceTree = ""; }; + AC1904A7198B72BF00A2307E /* backtotopnormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = backtotopnormal.png; sourceTree = ""; }; + AC1904A8198B72BF00A2307E /* backtotoppressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = backtotoppressed.png; sourceTree = ""; }; + AC1904A9198B72BF00A2307E /* listviewbg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = listviewbg.png; sourceTree = ""; }; + AC1904AA198B72BF00A2307E /* CloseNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CloseNormal.png; sourceTree = ""; }; + AC1904AB198B72BF00A2307E /* CloseSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CloseSelected.png; sourceTree = ""; }; + AC1904AC198B72BF00A2307E /* HelloWorld.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = HelloWorld.png; sourceTree = ""; }; + AC1904C1198B733900A2307E /* FriendControlScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FriendControlScene.cpp; path = ../Classes/FriendControlScene.cpp; sourceTree = ""; }; + AC1904C2198B733900A2307E /* FriendControlScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FriendControlScene.h; path = ../Classes/FriendControlScene.h; sourceTree = ""; }; + AC1904C7198B736B00A2307E /* potion2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = potion2.png; sourceTree = ""; }; + AC1904CA198B75D400A2307E /* CCFPlayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCFPlayer.cpp; path = ../Classes/CCFPlayer.cpp; sourceTree = ""; }; + AC1904CB198B75D400A2307E /* CCFPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCFPlayer.h; path = ../Classes/CCFPlayer.h; sourceTree = ""; }; + AC1904CE198B78F800A2307E /* ConnectionInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConnectionInterface.cpp; path = ../Classes/ConnectionInterface.cpp; sourceTree = ""; }; + AC1904CF198B78F800A2307E /* ConnectionInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConnectionInterface.h; path = ../Classes/ConnectionInterface.h; sourceTree = ""; }; + AC1904D2198B7A9200A2307E /* CCFLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCFLayer.cpp; path = ../Classes/CCFLayer.cpp; sourceTree = ""; }; + AC1904D3198B7A9200A2307E /* CCFLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCFLayer.h; path = ../Classes/CCFLayer.h; sourceTree = ""; }; + AC1904D6198B7B4B00A2307E /* PeerButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PeerButton.cpp; path = ../Classes/PeerButton.cpp; sourceTree = ""; }; + AC1904D7198B7B4B00A2307E /* PeerButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PeerButton.h; path = ../Classes/PeerButton.h; sourceTree = ""; }; + AC1904DA198B7BC800A2307E /* PopLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PopLayer.cpp; path = ../Classes/PopLayer.cpp; sourceTree = ""; }; + AC1904DB198B7BC800A2307E /* PopLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PopLayer.h; path = ../Classes/PopLayer.h; sourceTree = ""; }; + AC2852901994684D00A2A767 /* pkstart.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pkstart.png; sourceTree = ""; }; + B21386741925C30000A2C310 /* Sprite3DEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Sprite3DEffect.cpp; path = ../Classes/Sprite3DEffect.cpp; sourceTree = ""; }; + B21386751925C30000A2C310 /* Sprite3DEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sprite3DEffect.h; path = ../Classes/Sprite3DEffect.h; sourceTree = ""; }; + B213867A1925C60E00A2C310 /* Shaders3D */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Shaders3D; sourceTree = ""; }; + BB0C4882190910CE0015152C /* AirCraft.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirCraft.cpp; path = ../Classes/AirCraft.cpp; sourceTree = ""; }; + BB0C4883190910CE0015152C /* AirCraft.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirCraft.h; path = ../Classes/AirCraft.h; sourceTree = ""; }; + BB0C4884190910CE0015152C /* Bullets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Bullets.cpp; path = ../Classes/Bullets.cpp; sourceTree = ""; }; + BB0C4885190910CE0015152C /* Bullets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Bullets.h; path = ../Classes/Bullets.h; sourceTree = ""; }; + BB0C4886190910CE0015152C /* consts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = consts.h; path = ../Classes/consts.h; sourceTree = ""; }; + BB0C4887190910CE0015152C /* Effects.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Effects.cpp; path = ../Classes/Effects.cpp; sourceTree = ""; }; + BB0C4888190910CE0015152C /* Effects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Effects.h; path = ../Classes/Effects.h; sourceTree = ""; }; + BB0C4889190910CE0015152C /* Enemies.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Enemies.cpp; path = ../Classes/Enemies.cpp; sourceTree = ""; }; + BB0C488A190910CE0015152C /* Enemies.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Enemies.h; path = ../Classes/Enemies.h; sourceTree = ""; }; + BB0C488B190910CE0015152C /* Explosion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Explosion.cpp; path = ../Classes/Explosion.cpp; sourceTree = ""; }; + BB0C488C190910CE0015152C /* Explosion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Explosion.h; path = ../Classes/Explosion.h; sourceTree = ""; }; + BB0C488D190910CE0015152C /* GameControllers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameControllers.cpp; path = ../Classes/GameControllers.cpp; sourceTree = ""; }; + BB0C488E190910CE0015152C /* GameControllers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameControllers.h; path = ../Classes/GameControllers.h; sourceTree = ""; }; + BB0C488F190910CE0015152C /* GameEntity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameEntity.cpp; path = ../Classes/GameEntity.cpp; sourceTree = ""; }; + BB0C4890190910CE0015152C /* GameEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameEntity.h; path = ../Classes/GameEntity.h; sourceTree = ""; }; + BB0C4891190910CE0015152C /* GameLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameLayer.cpp; path = ../Classes/GameLayer.cpp; sourceTree = ""; }; + BB0C4892190910CE0015152C /* GameLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameLayer.h; path = ../Classes/GameLayer.h; sourceTree = ""; }; + BB0C4893190910CE0015152C /* GameOverLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameOverLayer.cpp; path = ../Classes/GameOverLayer.cpp; sourceTree = ""; }; + BB0C4894190910CE0015152C /* GameOverLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameOverLayer.h; path = ../Classes/GameOverLayer.h; sourceTree = ""; }; + BB0C4895190910CE0015152C /* LicenseLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LicenseLayer.cpp; path = ../Classes/LicenseLayer.cpp; sourceTree = ""; }; + BB0C4896190910CE0015152C /* LicenseLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LicenseLayer.h; path = ../Classes/LicenseLayer.h; sourceTree = ""; }; + BB0C4897190910CE0015152C /* LoadingScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LoadingScene.cpp; path = ../Classes/LoadingScene.cpp; sourceTree = ""; }; + BB0C4898190910CE0015152C /* LoadingScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LoadingScene.h; path = ../Classes/LoadingScene.h; sourceTree = ""; }; + BB0C4899190910CE0015152C /* MainMenuScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MainMenuScene.cpp; path = ../Classes/MainMenuScene.cpp; sourceTree = ""; }; + BB0C489A190910CE0015152C /* MainMenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuScene.h; path = ../Classes/MainMenuScene.h; sourceTree = ""; }; + BB0C489B190910CE0015152C /* ParticleManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParticleManager.cpp; path = ../Classes/ParticleManager.cpp; sourceTree = ""; }; + BB0C489C190910CE0015152C /* ParticleManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParticleManager.h; path = ../Classes/ParticleManager.h; sourceTree = ""; }; + BB0C489D190910CE0015152C /* Plane.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Plane.cpp; path = ../Classes/Plane.cpp; sourceTree = ""; }; + BB0C489E190910CE0015152C /* Plane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Plane.h; path = ../Classes/Plane.h; sourceTree = ""; }; + BB0C489F190910CE0015152C /* Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../Classes/Player.cpp; sourceTree = ""; }; + BB0C48A0190910CE0015152C /* Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../Classes/Player.h; sourceTree = ""; }; + BB0C48A1190910CE0015152C /* PublicApi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PublicApi.cpp; path = ../Classes/PublicApi.cpp; sourceTree = ""; }; + BB0C48A2190910CE0015152C /* PublicApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PublicApi.h; path = ../Classes/PublicApi.h; sourceTree = ""; }; + BB0C48CB190910E60015152C /* boom.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = boom.mp3; sourceTree = ""; }; + BB0C48CC190910E60015152C /* boom2.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = boom2.mp3; sourceTree = ""; }; + BB0C48CD190910E60015152C /* boss.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = boss.obj; sourceTree = ""; }; + BB0C48CE190910E60015152C /* boss.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = boss.png; sourceTree = ""; }; + BB0C48CF190910E60015152C /* bossCannon.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = bossCannon.obj; sourceTree = ""; }; + BB0C48D0190910E60015152C /* bullets.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bullets.png; sourceTree = ""; }; + BB0C48D1190910E60015152C /* coco.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = coco.png; sourceTree = ""; }; + BB0C48D2190910E60015152C /* coconut.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = coconut.obj; sourceTree = ""; }; + BB0C48D3190910E60015152C /* credits_03.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = credits_03.png; sourceTree = ""; }; + BB0C48D4190910E60015152C /* daodan_32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = daodan_32.png; sourceTree = ""; }; + BB0C48D5190910E60015152C /* daodanv001.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = daodanv001.obj; sourceTree = ""; }; + BB0C48D6190910E60015152C /* debris.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = debris.plist; sourceTree = ""; }; + BB0C48D7190910E60015152C /* diji1_v001.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = diji1_v001.obj; sourceTree = ""; }; + BB0C48D8190910E60015152C /* diji1_v002.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = diji1_v002.obj; sourceTree = ""; }; + BB0C48D9190910E60015152C /* diji02_v002_128.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = diji02_v002_128.png; sourceTree = ""; }; + BB0C48DA190910E60015152C /* dijiyuanv001.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dijiyuanv001.obj; sourceTree = ""; }; + BB0C48DB190910E60015152C /* dijiyuanv001.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dijiyuanv001.png; sourceTree = ""; }; + BB0C48DC190910E60015152C /* emission.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = emission.plist; sourceTree = ""; }; + BB0C48DD190910E60015152C /* emissionPart.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = emissionPart.plist; sourceTree = ""; }; + BB0C48DE190910E60015152C /* engine.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = engine.plist; sourceTree = ""; }; + BB0C48DF190910E60015152C /* explodeEffect.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = explodeEffect.mp3; sourceTree = ""; }; + BB0C48E0190910E60015152C /* flare.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = flare.plist; sourceTree = ""; }; + BB0C48E1190910E60015152C /* Flux2.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = Flux2.mp3; sourceTree = ""; }; + BB0C48E3190910E60015152C /* Marker Felt.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Marker Felt.ttf"; sourceTree = ""; }; + BB0C48E4190910E60015152C /* gameover_score_num_0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = gameover_score_num_0.png; sourceTree = ""; }; + BB0C48E5190910E60015152C /* gameover_score_num.fnt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gameover_score_num.fnt; sourceTree = ""; }; + BB0C48E6190910E60015152C /* gameover.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = gameover.plist; sourceTree = ""; }; + BB0C48E7190910E60015152C /* gameover.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = gameover.png; sourceTree = ""; }; + BB0C48E8190910E60015152C /* glow.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = glow.plist; sourceTree = ""; }; + BB0C48E9190910E60015152C /* groundLevel.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = groundLevel.jpg; sourceTree = ""; }; + BB0C48EA190910E60015152C /* hit.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = hit.mp3; sourceTree = ""; }; + BB0C48EB190910E60015152C /* LICENSE_03.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = LICENSE_03.png; sourceTree = ""; }; + BB0C48EC190910E60015152C /* loadingAndHP.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = loadingAndHP.plist; sourceTree = ""; }; + BB0C48ED190910E60015152C /* loadingAndHP.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = loadingAndHP.png; sourceTree = ""; }; + BB0C48EE190910E60015152C /* menu_scene.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = menu_scene.plist; sourceTree = ""; }; + BB0C48EF190910E60015152C /* menu_scene.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_scene.png; sourceTree = ""; }; + BB0C48F0190910E60015152C /* menuEmission.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = menuEmission.plist; sourceTree = ""; }; + BB0C48F1190910E60015152C /* missileFlare.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = missileFlare.plist; sourceTree = ""; }; + BB0C48F2190910E60015152C /* muzzle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = muzzle.png; sourceTree = ""; }; + BB0C48F3190910E60015152C /* num_0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = num_0.png; sourceTree = ""; }; + BB0C48F4190910E60015152C /* num.fnt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = num.fnt; sourceTree = ""; }; + BB0C48F5190910E60015152C /* Orbital Colossus_0.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "Orbital Colossus_0.mp3"; sourceTree = ""; }; + BB0C48F6190910E60015152C /* Particle.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Particle.plist; sourceTree = ""; }; + BB0C48F7190910E60015152C /* Particle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Particle.png; sourceTree = ""; }; + BB0C48F8190910E60015152C /* player_bullet_explosion.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = player_bullet_explosion.png; sourceTree = ""; }; + BB0C48F9190910E60015152C /* playerv002_256.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = playerv002_256.png; sourceTree = ""; }; + BB0C48FA190910E60015152C /* playerv002.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = playerv002.obj; sourceTree = ""; }; + BB0C48FB190910E60015152C /* score_right_top.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = score_right_top.png; sourceTree = ""; }; + BB0C48FC190910E60015152C /* Star Chaser (2012).mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "Star Chaser (2012).mp3"; sourceTree = ""; }; + BB0C48FD190910E60015152C /* Star_Chaser.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = Star_Chaser.mp3; sourceTree = ""; }; + BB0C48FE190910E60015152C /* streak.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = streak.png; sourceTree = ""; }; + BB0C48FF190910E60015152C /* toonSmoke.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = toonSmoke.plist; sourceTree = ""; }; + BB0C4900190910E70015152C /* vanishingPoint.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = vanishingPoint.plist; sourceTree = ""; }; + BF170DB012928DE900B8313A /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + BF170DB412928DE900B8313A /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + BF1C47EA1293683800B63C5D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + D44C620B132DFF330009C878 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + D44C620D132DFF430009C878 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + D44C620F132DFF4E0009C878 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + D6B0611A1803AB670077942B /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1AC6FB2E180E99EB004C840B /* libbox2d iOS.a in Frameworks */, + 1AC6FB2F180E99EB004C840B /* libchipmunk iOS.a in Frameworks */, + 1AC6FB30180E99EB004C840B /* libcocos2dx iOS.a in Frameworks */, + 1AC6FB31180E99EB004C840B /* libcocos2dx-extensions iOS.a in Frameworks */, + 1AC6FB32180E99EB004C840B /* libCocosDenshion iOS.a in Frameworks */, + D6B0611B1803AB670077942B /* CoreMotion.framework in Frameworks */, + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, + BF171245129291EC00B8313A /* OpenGLES.framework in Frameworks */, + BF1712471292920000B8313A /* libz.dylib in Frameworks */, + BF1C47F01293687400B63C5D /* QuartzCore.framework in Frameworks */, + D44C620C132DFF330009C878 /* OpenAL.framework in Frameworks */, + D44C620E132DFF430009C878 /* AVFoundation.framework in Frameworks */, + D44C6210132DFF4E0009C878 /* AudioToolbox.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5087E75C17EB910900C73F5D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1AC6FB1F180E996B004C840B /* libbox2d Mac.a in Frameworks */, + 1AC6FB20180E996B004C840B /* libchipmunk Mac.a in Frameworks */, + 1AC6FB21180E996B004C840B /* libcocos2dx Mac.a in Frameworks */, + 1AC6FB22180E996B004C840B /* libcocos2dx-extensions Mac.a in Frameworks */, + 1AC6FB23180E996B004C840B /* libCocosDenshion Mac.a in Frameworks */, + 503AE11217EB99EE00D1A890 /* libcurl.dylib in Frameworks */, + 5087E76717EB910900C73F5D /* libz.dylib in Frameworks */, + 503AE11B17EB9C5A00D1A890 /* IOKit.framework in Frameworks */, + 5087E78B17EB975400C73F5D /* OpenGL.framework in Frameworks */, + 5087E78917EB974C00C73F5D /* AppKit.framework in Frameworks */, + 5087E76317EB910900C73F5D /* Foundation.framework in Frameworks */, + 5087E76517EB910900C73F5D /* CoreGraphics.framework in Frameworks */, + 5087E76817EB910900C73F5D /* QuartzCore.framework in Frameworks */, + 5087E76917EB910900C73F5D /* OpenAL.framework in Frameworks */, + 5087E76A17EB910900C73F5D /* AVFoundation.framework in Frameworks */, + 5087E76B17EB910900C73F5D /* AudioToolbox.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* ios */ = { + isa = PBXGroup; + children = ( + 5087E77117EB970100C73F5D /* Icons */, + 503AE0FA17EB989F00D1A890 /* AppController.h */, + 503AE0FB17EB989F00D1A890 /* AppController.mm */, + 503AE0FC17EB989F00D1A890 /* main.m */, + 503AE0FD17EB989F00D1A890 /* Prefix.pch */, + 503AE0FE17EB989F00D1A890 /* RootViewController.h */, + 503AE0FF17EB989F00D1A890 /* RootViewController.mm */, + ); + name = ios; + path = Classes; + sourceTree = ""; + }; + 15AA9C4015B7EC450033D6C2 /* Classes */ = { + isa = PBXGroup; + children = ( + AC1904D2198B7A9200A2307E /* CCFLayer.cpp */, + AC1904D3198B7A9200A2307E /* CCFLayer.h */, + AC1904DA198B7BC800A2307E /* PopLayer.cpp */, + AC1904DB198B7BC800A2307E /* PopLayer.h */, + AC1904D6198B7B4B00A2307E /* PeerButton.cpp */, + AC1904D7198B7B4B00A2307E /* PeerButton.h */, + AC1904CA198B75D400A2307E /* CCFPlayer.cpp */, + AC1904CB198B75D400A2307E /* CCFPlayer.h */, + AC1904C1198B733900A2307E /* FriendControlScene.cpp */, + AC1904C2198B733900A2307E /* FriendControlScene.h */, + AC1904CE198B78F800A2307E /* ConnectionInterface.cpp */, + AC1904CF198B78F800A2307E /* ConnectionInterface.h */, + BB0C4882190910CE0015152C /* AirCraft.cpp */, + BB0C4883190910CE0015152C /* AirCraft.h */, + BB0C4884190910CE0015152C /* Bullets.cpp */, + BB0C4885190910CE0015152C /* Bullets.h */, + BB0C4886190910CE0015152C /* consts.h */, + BB0C4887190910CE0015152C /* Effects.cpp */, + BB0C4888190910CE0015152C /* Effects.h */, + BB0C4889190910CE0015152C /* Enemies.cpp */, + BB0C488A190910CE0015152C /* Enemies.h */, + BB0C488B190910CE0015152C /* Explosion.cpp */, + BB0C488C190910CE0015152C /* Explosion.h */, + BB0C488D190910CE0015152C /* GameControllers.cpp */, + BB0C488E190910CE0015152C /* GameControllers.h */, + BB0C488F190910CE0015152C /* GameEntity.cpp */, + BB0C4890190910CE0015152C /* GameEntity.h */, + BB0C4891190910CE0015152C /* GameLayer.cpp */, + BB0C4892190910CE0015152C /* GameLayer.h */, + BB0C4893190910CE0015152C /* GameOverLayer.cpp */, + BB0C4894190910CE0015152C /* GameOverLayer.h */, + BB0C4895190910CE0015152C /* LicenseLayer.cpp */, + BB0C4896190910CE0015152C /* LicenseLayer.h */, + BB0C4897190910CE0015152C /* LoadingScene.cpp */, + BB0C4898190910CE0015152C /* LoadingScene.h */, + BB0C4899190910CE0015152C /* MainMenuScene.cpp */, + BB0C489A190910CE0015152C /* MainMenuScene.h */, + BB0C489B190910CE0015152C /* ParticleManager.cpp */, + BB0C489C190910CE0015152C /* ParticleManager.h */, + BB0C489D190910CE0015152C /* Plane.cpp */, + BB0C489E190910CE0015152C /* Plane.h */, + BB0C489F190910CE0015152C /* Player.cpp */, + BB0C48A0190910CE0015152C /* Player.h */, + BB0C48A1190910CE0015152C /* PublicApi.cpp */, + BB0C48A2190910CE0015152C /* PublicApi.h */, + 1AFAF8B316D35DE700DB1158 /* AppDelegate.cpp */, + 1AFAF8B416D35DE700DB1158 /* AppDelegate.h */, + 1AFAF8B516D35DE700DB1158 /* HelloWorldScene.cpp */, + 1AFAF8B616D35DE700DB1158 /* HelloWorldScene.h */, + B21386741925C30000A2C310 /* Sprite3DEffect.cpp */, + B21386751925C30000A2C310 /* Sprite3DEffect.h */, + ); + name = Classes; + path = ../classes; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* EarthWarrior3D iOS.app */, + 5087E76F17EB910900C73F5D /* EarthWarrior3D Mac.app */, + ); + name = Products; + sourceTree = ""; + }; + 1AC6FAE6180E9839004C840B /* Products */ = { + isa = PBXGroup; + children = ( + 1AC6FAF9180E9839004C840B /* libcocos2dx Mac.a */, + 1AC6FAFB180E9839004C840B /* libcocos2dx-extensions Mac.a */, + 1AC6FAFD180E9839004C840B /* libchipmunk Mac.a */, + 1AC6FAFF180E9839004C840B /* libbox2d Mac.a */, + 1AC6FB01180E9839004C840B /* libCocosDenshion Mac.a */, + 1AC6FB07180E9839004C840B /* libcocos2dx iOS.a */, + 1AC6FB09180E9839004C840B /* libcocos2dx-extensions iOS.a */, + 1AC6FB0B180E9839004C840B /* libchipmunk iOS.a */, + 1AC6FB0D180E9839004C840B /* libbox2d iOS.a */, + 1AC6FB0F180E9839004C840B /* libCocosDenshion iOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */, + 15AA9C4015B7EC450033D6C2 /* Classes */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 080E96DDFE201D6D7F000001 /* ios */, + 503AE10617EB990700D1A890 /* mac */, + 19C28FACFE9D520D11CA2CBB /* Products */, + 78C7DDAA14EBA5050085D0C2 /* Resources */, + ); + name = CustomTemplate; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + D6B0611A1803AB670077942B /* CoreMotion.framework */, + 503AE11A17EB9C5A00D1A890 /* IOKit.framework */, + 503AE11117EB99EE00D1A890 /* libcurl.dylib */, + 5087E78A17EB975400C73F5D /* OpenGL.framework */, + 5087E78817EB974C00C73F5D /* AppKit.framework */, + 1ACB3243164770DE00914215 /* libcurl.a */, + BF170DB412928DE900B8313A /* libz.dylib */, + D44C620F132DFF4E0009C878 /* AudioToolbox.framework */, + D44C620D132DFF430009C878 /* AVFoundation.framework */, + 288765A40DF7441C002DB57D /* CoreGraphics.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + D44C620B132DFF330009C878 /* OpenAL.framework */, + BF170DB012928DE900B8313A /* OpenGLES.framework */, + BF1C47EA1293683800B63C5D /* QuartzCore.framework */, + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 503AE0F517EB97AB00D1A890 /* Icons */ = { + isa = PBXGroup; + children = ( + 503AE0F617EB97AB00D1A890 /* Icon.icns */, + 503AE0F717EB97AB00D1A890 /* Info.plist */, + ); + name = Icons; + path = mac; + sourceTree = SOURCE_ROOT; + }; + 503AE10617EB990700D1A890 /* mac */ = { + isa = PBXGroup; + children = ( + 503AE0F517EB97AB00D1A890 /* Icons */, + 503AE10317EB98FF00D1A890 /* main.cpp */, + 503AE10417EB98FF00D1A890 /* Prefix.pch */, + ); + name = mac; + sourceTree = ""; + }; + 5087E77117EB970100C73F5D /* Icons */ = { + isa = PBXGroup; + children = ( + 5087E77217EB970100C73F5D /* Default-568h@2x.png */, + 5087E77317EB970100C73F5D /* Default.png */, + 5087E77417EB970100C73F5D /* Default@2x.png */, + 50EF62A017ECD613001EB2F8 /* Icon-29.png */, + 50EF62A117ECD613001EB2F8 /* Icon-50.png */, + 50EF629217ECD46A001EB2F8 /* Icon-40.png */, + 50EF629317ECD46A001EB2F8 /* Icon-58.png */, + 50EF629417ECD46A001EB2F8 /* Icon-80.png */, + 50EF629517ECD46A001EB2F8 /* Icon-100.png */, + 5087E77517EB970100C73F5D /* Icon-114.png */, + 5087E77617EB970100C73F5D /* Icon-120.png */, + 5087E77717EB970100C73F5D /* Icon-144.png */, + 5087E77817EB970100C73F5D /* Icon-152.png */, + 5087E77917EB970100C73F5D /* Icon-57.png */, + 5087E77A17EB970100C73F5D /* Icon-72.png */, + 5087E77B17EB970100C73F5D /* Icon-76.png */, + 5087E77C17EB970100C73F5D /* Info.plist */, + ); + name = Icons; + path = ios; + sourceTree = SOURCE_ROOT; + }; + 78C7DDAA14EBA5050085D0C2 /* Resources */ = { + isa = PBXGroup; + children = ( + AC2852901994684D00A2A767 /* pkstart.png */, + AC1904C7198B736B00A2307E /* potion2.png */, + AC1904A7198B72BF00A2307E /* backtotopnormal.png */, + AC1904A8198B72BF00A2307E /* backtotoppressed.png */, + AC1904A9198B72BF00A2307E /* listviewbg.png */, + AC1904AA198B72BF00A2307E /* CloseNormal.png */, + AC1904AB198B72BF00A2307E /* CloseSelected.png */, + AC1904AC198B72BF00A2307E /* HelloWorld.png */, + 76B5F2EB195C47BC00C15B36 /* boss.c3b */, + 76B5F2EC195C47BC00C15B36 /* bossCannon.c3b */, + 76B5F2ED195C47BC00C15B36 /* coconut.c3b */, + 76B5F2EE195C47BC00C15B36 /* daodanv001.c3b */, + 76B5F2EF195C47BC00C15B36 /* diji1_v002.c3b */, + 76B5F2F0195C47BC00C15B36 /* dijiyuanv001.c3b */, + 76B5F2F1195C47BC00C15B36 /* playerv002.c3b */, + B213867A1925C60E00A2C310 /* Shaders3D */, + BB0C48CB190910E60015152C /* boom.mp3 */, + BB0C48CC190910E60015152C /* boom2.mp3 */, + BB0C48CD190910E60015152C /* boss.obj */, + BB0C48CE190910E60015152C /* boss.png */, + BB0C48CF190910E60015152C /* bossCannon.obj */, + BB0C48D0190910E60015152C /* bullets.png */, + BB0C48D1190910E60015152C /* coco.png */, + BB0C48D2190910E60015152C /* coconut.obj */, + BB0C48D3190910E60015152C /* credits_03.png */, + BB0C48D4190910E60015152C /* daodan_32.png */, + BB0C48D5190910E60015152C /* daodanv001.obj */, + BB0C48D6190910E60015152C /* debris.plist */, + BB0C48D7190910E60015152C /* diji1_v001.obj */, + BB0C48D8190910E60015152C /* diji1_v002.obj */, + BB0C48D9190910E60015152C /* diji02_v002_128.png */, + BB0C48DA190910E60015152C /* dijiyuanv001.obj */, + BB0C48DB190910E60015152C /* dijiyuanv001.png */, + BB0C48DC190910E60015152C /* emission.plist */, + BB0C48DD190910E60015152C /* emissionPart.plist */, + BB0C48DE190910E60015152C /* engine.plist */, + BB0C48DF190910E60015152C /* explodeEffect.mp3 */, + BB0C48E0190910E60015152C /* flare.plist */, + BB0C48E1190910E60015152C /* Flux2.mp3 */, + BB0C48E2190910E60015152C /* fonts */, + BB0C48E4190910E60015152C /* gameover_score_num_0.png */, + BB0C48E5190910E60015152C /* gameover_score_num.fnt */, + BB0C48E6190910E60015152C /* gameover.plist */, + BB0C48E7190910E60015152C /* gameover.png */, + BB0C48E8190910E60015152C /* glow.plist */, + BB0C48E9190910E60015152C /* groundLevel.jpg */, + BB0C48EA190910E60015152C /* hit.mp3 */, + BB0C48EB190910E60015152C /* LICENSE_03.png */, + BB0C48EC190910E60015152C /* loadingAndHP.plist */, + BB0C48ED190910E60015152C /* loadingAndHP.png */, + BB0C48EE190910E60015152C /* menu_scene.plist */, + BB0C48EF190910E60015152C /* menu_scene.png */, + BB0C48F0190910E60015152C /* menuEmission.plist */, + BB0C48F1190910E60015152C /* missileFlare.plist */, + BB0C48F2190910E60015152C /* muzzle.png */, + BB0C48F3190910E60015152C /* num_0.png */, + BB0C48F4190910E60015152C /* num.fnt */, + BB0C48F5190910E60015152C /* Orbital Colossus_0.mp3 */, + BB0C48F6190910E60015152C /* Particle.plist */, + BB0C48F7190910E60015152C /* Particle.png */, + BB0C48F8190910E60015152C /* player_bullet_explosion.png */, + BB0C48F9190910E60015152C /* playerv002_256.png */, + BB0C48FA190910E60015152C /* playerv002.obj */, + BB0C48FB190910E60015152C /* score_right_top.png */, + BB0C48FC190910E60015152C /* Star Chaser (2012).mp3 */, + BB0C48FD190910E60015152C /* Star_Chaser.mp3 */, + BB0C48FE190910E60015152C /* streak.png */, + BB0C48FF190910E60015152C /* toonSmoke.plist */, + BB0C4900190910E70015152C /* vanishingPoint.plist */, + ); + name = Resources; + path = ../Resources; + sourceTree = ""; + }; + BB0C48E2190910E60015152C /* fonts */ = { + isa = PBXGroup; + children = ( + BB0C48E3190910E60015152C /* Marker Felt.ttf */, + ); + path = fonts; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* EarthWarrior3D iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "EarthWarrior3D iOS" */; + buildPhases = ( + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 1AC6FB25180E99E1004C840B /* PBXTargetDependency */, + 1AC6FB27180E99E1004C840B /* PBXTargetDependency */, + 1AC6FB29180E99E1004C840B /* PBXTargetDependency */, + 1AC6FB2B180E99E1004C840B /* PBXTargetDependency */, + 1AC6FB2D180E99E1004C840B /* PBXTargetDependency */, + ); + name = "EarthWarrior3D iOS"; + productName = iphone; + productReference = 1D6058910D05DD3D006BFB54 /* EarthWarrior3D iOS.app */; + productType = "com.apple.product-type.application"; + }; + 5087E73D17EB910900C73F5D /* EarthWarrior3D Mac */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5087E76C17EB910900C73F5D /* Build configuration list for PBXNativeTarget "EarthWarrior3D Mac" */; + buildPhases = ( + 5087E74817EB910900C73F5D /* Resources */, + 5087E75617EB910900C73F5D /* Sources */, + 5087E75C17EB910900C73F5D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 1AC6FB1E180E9963004C840B /* PBXTargetDependency */, + 1AC6FB16180E9959004C840B /* PBXTargetDependency */, + 1AC6FB18180E9959004C840B /* PBXTargetDependency */, + 1AC6FB1A180E9959004C840B /* PBXTargetDependency */, + 1AC6FB1C180E9959004C840B /* PBXTargetDependency */, + ); + name = "EarthWarrior3D Mac"; + productName = iphone; + productReference = 5087E76F17EB910900C73F5D /* EarthWarrior3D Mac.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0500; + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "EarthWarrior3D" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 1AC6FAE6180E9839004C840B /* Products */; + ProjectRef = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* EarthWarrior3D iOS */, + 5087E73D17EB910900C73F5D /* EarthWarrior3D Mac */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 1AC6FAF9180E9839004C840B /* libcocos2dx Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx Mac.a"; + remoteRef = 1AC6FAF8180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FAFB180E9839004C840B /* libcocos2dx-extensions Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx-extensions Mac.a"; + remoteRef = 1AC6FAFA180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FAFD180E9839004C840B /* libchipmunk Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libchipmunk Mac.a"; + remoteRef = 1AC6FAFC180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FAFF180E9839004C840B /* libbox2d Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libbox2d Mac.a"; + remoteRef = 1AC6FAFE180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB01180E9839004C840B /* libCocosDenshion Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libCocosDenshion Mac.a"; + remoteRef = 1AC6FB00180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB07180E9839004C840B /* libcocos2dx iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx iOS.a"; + remoteRef = 1AC6FB06180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB09180E9839004C840B /* libcocos2dx-extensions iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx-extensions iOS.a"; + remoteRef = 1AC6FB08180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB0B180E9839004C840B /* libchipmunk iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libchipmunk iOS.a"; + remoteRef = 1AC6FB0A180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB0D180E9839004C840B /* libbox2d iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libbox2d iOS.a"; + remoteRef = 1AC6FB0C180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB0F180E9839004C840B /* libCocosDenshion iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libCocosDenshion iOS.a"; + remoteRef = 1AC6FB0E180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5087E78117EB970100C73F5D /* Icon-120.png in Resources */, + BB0C493B190910E70015152C /* groundLevel.jpg in Resources */, + BB0C4965190910E70015152C /* streak.png in Resources */, + 5087E78617EB970100C73F5D /* Icon-76.png in Resources */, + BB0C4939190910E70015152C /* glow.plist in Resources */, + BB0C4943190910E70015152C /* loadingAndHP.png in Resources */, + 76B5F2F4195C47BC00C15B36 /* coconut.c3b in Resources */, + AC1904B3198B72BF00A2307E /* CloseNormal.png in Resources */, + BB0C4911190910E70015152C /* credits_03.png in Resources */, + AC2852911994684D00A2A767 /* pkstart.png in Resources */, + 76B5F2F8195C47BC00C15B36 /* playerv002.c3b in Resources */, + BB0C4903190910E70015152C /* boom2.mp3 in Resources */, + BB0C4929190910E70015152C /* explodeEffect.mp3 in Resources */, + BB0C4921190910E70015152C /* dijiyuanv001.png in Resources */, + 5087E77F17EB970100C73F5D /* Default@2x.png in Resources */, + BB0C4945190910E70015152C /* menu_scene.plist in Resources */, + BB0C492D190910E70015152C /* Flux2.mp3 in Resources */, + 50EF629917ECD46A001EB2F8 /* Icon-100.png in Resources */, + BB0C4931190910E70015152C /* gameover_score_num_0.png in Resources */, + BB0C494B190910E70015152C /* missileFlare.plist in Resources */, + 76B5F2F3195C47BC00C15B36 /* bossCannon.c3b in Resources */, + BB0C4959190910E70015152C /* player_bullet_explosion.png in Resources */, + AC1904C8198B736B00A2307E /* potion2.png in Resources */, + BB0C4933190910E70015152C /* gameover_score_num.fnt in Resources */, + B213867B1925C60E00A2C310 /* Shaders3D in Resources */, + BB0C495F190910E70015152C /* score_right_top.png in Resources */, + 5087E78317EB970100C73F5D /* Icon-152.png in Resources */, + BB0C4941190910E70015152C /* loadingAndHP.plist in Resources */, + BB0C4907190910E70015152C /* boss.png in Resources */, + BB0C4957190910E70015152C /* Particle.png in Resources */, + BB0C490B190910E70015152C /* bullets.png in Resources */, + 5087E77D17EB970100C73F5D /* Default-568h@2x.png in Resources */, + 76B5F2F2195C47BC00C15B36 /* boss.c3b in Resources */, + BB0C4951190910E70015152C /* num.fnt in Resources */, + BB0C495B190910E70015152C /* playerv002_256.png in Resources */, + 5087E78517EB970100C73F5D /* Icon-72.png in Resources */, + AC1904AF198B72BF00A2307E /* backtotoppressed.png in Resources */, + 76B5F2F5195C47BC00C15B36 /* daodanv001.c3b in Resources */, + BB0C4953190910E70015152C /* Orbital Colossus_0.mp3 in Resources */, + BB0C492B190910E70015152C /* flare.plist in Resources */, + BB0C4905190910E70015152C /* boss.obj in Resources */, + BB0C4923190910E70015152C /* emission.plist in Resources */, + 50EF62A317ECD613001EB2F8 /* Icon-50.png in Resources */, + 76B5F2F6195C47BC00C15B36 /* diji1_v002.c3b in Resources */, + BB0C493F190910E70015152C /* LICENSE_03.png in Resources */, + BB0C494F190910E70015152C /* num_0.png in Resources */, + 5087E78017EB970100C73F5D /* Icon-114.png in Resources */, + BB0C4967190910E70015152C /* toonSmoke.plist in Resources */, + BB0C4937190910E70015152C /* gameover.png in Resources */, + 50EF62A217ECD613001EB2F8 /* Icon-29.png in Resources */, + BB0C4909190910E70015152C /* bossCannon.obj in Resources */, + BB0C490F190910E70015152C /* coconut.obj in Resources */, + BB0C4947190910E70015152C /* menu_scene.png in Resources */, + BB0C490D190910E70015152C /* coco.png in Resources */, + 50EF629617ECD46A001EB2F8 /* Icon-40.png in Resources */, + 76B5F2F7195C47BC00C15B36 /* dijiyuanv001.c3b in Resources */, + BB0C493D190910E70015152C /* hit.mp3 in Resources */, + BB0C492F190910E70015152C /* Marker Felt.ttf in Resources */, + BB0C4919190910E70015152C /* diji1_v001.obj in Resources */, + BB0C4935190910E70015152C /* gameover.plist in Resources */, + BB0C4913190910E70015152C /* daodan_32.png in Resources */, + BB0C491D190910E70015152C /* diji02_v002_128.png in Resources */, + BB0C4925190910E70015152C /* emissionPart.plist in Resources */, + BB0C4915190910E70015152C /* daodanv001.obj in Resources */, + BB0C494D190910E70015152C /* muzzle.png in Resources */, + 5087E78217EB970100C73F5D /* Icon-144.png in Resources */, + BB0C491B190910E70015152C /* diji1_v002.obj in Resources */, + BB0C4927190910E70015152C /* engine.plist in Resources */, + AC1904B1198B72BF00A2307E /* listviewbg.png in Resources */, + 50EF629817ECD46A001EB2F8 /* Icon-80.png in Resources */, + BB0C4961190910E70015152C /* Star Chaser (2012).mp3 in Resources */, + AC1904AD198B72BF00A2307E /* backtotopnormal.png in Resources */, + BB0C4901190910E70015152C /* boom.mp3 in Resources */, + BB0C4949190910E70015152C /* menuEmission.plist in Resources */, + BB0C495D190910E70015152C /* playerv002.obj in Resources */, + 5087E78417EB970100C73F5D /* Icon-57.png in Resources */, + BB0C4969190910E70015152C /* vanishingPoint.plist in Resources */, + AC1904B7198B72BF00A2307E /* HelloWorld.png in Resources */, + 5087E77E17EB970100C73F5D /* Default.png in Resources */, + BB0C491F190910E70015152C /* dijiyuanv001.obj in Resources */, + 50EF629717ECD46A001EB2F8 /* Icon-58.png in Resources */, + BB0C4917190910E70015152C /* debris.plist in Resources */, + BB0C4963190910E70015152C /* Star_Chaser.mp3 in Resources */, + BB0C4955190910E70015152C /* Particle.plist in Resources */, + AC1904B5198B72BF00A2307E /* CloseSelected.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5087E74817EB910900C73F5D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AB2EA97A196BF8F2005FC902 /* boss.c3b in Resources */, + AB2EA97B196BF8F2005FC902 /* bossCannon.c3b in Resources */, + AB2EA97C196BF8F2005FC902 /* coconut.c3b in Resources */, + AB2EA97D196BF8F2005FC902 /* daodanv001.c3b in Resources */, + AC1904B0198B72BF00A2307E /* backtotoppressed.png in Resources */, + AB2EA97E196BF8F2005FC902 /* diji1_v002.c3b in Resources */, + AB2EA97F196BF8F2005FC902 /* dijiyuanv001.c3b in Resources */, + AB2EA980196BF8F2005FC902 /* playerv002.c3b in Resources */, + BB0C490C190910E70015152C /* bullets.png in Resources */, + BB0C4938190910E70015152C /* gameover.png in Resources */, + BB0C4924190910E70015152C /* emission.plist in Resources */, + AC1904B6198B72BF00A2307E /* CloseSelected.png in Resources */, + BB0C495C190910E70015152C /* playerv002_256.png in Resources */, + BB0C4906190910E70015152C /* boss.obj in Resources */, + AC1904B4198B72BF00A2307E /* CloseNormal.png in Resources */, + BB0C4940190910E70015152C /* LICENSE_03.png in Resources */, + BB0C492A190910E70015152C /* explodeEffect.mp3 in Resources */, + BB0C4920190910E70015152C /* dijiyuanv001.obj in Resources */, + B213867C1925C60E00A2C310 /* Shaders3D in Resources */, + BB0C490A190910E70015152C /* bossCannon.obj in Resources */, + BB0C4908190910E70015152C /* boss.png in Resources */, + AC1904C9198B736B00A2307E /* potion2.png in Resources */, + BB0C492C190910E70015152C /* flare.plist in Resources */, + 503AE0F817EB97AB00D1A890 /* Icon.icns in Resources */, + BB0C493E190910E70015152C /* hit.mp3 in Resources */, + BB0C494A190910E70015152C /* menuEmission.plist in Resources */, + BB0C4930190910E70015152C /* Marker Felt.ttf in Resources */, + BB0C4934190910E70015152C /* gameover_score_num.fnt in Resources */, + BB0C4916190910E70015152C /* daodanv001.obj in Resources */, + BB0C4922190910E70015152C /* dijiyuanv001.png in Resources */, + BB0C4950190910E70015152C /* num_0.png in Resources */, + BB0C4902190910E70015152C /* boom.mp3 in Resources */, + BB0C4958190910E70015152C /* Particle.png in Resources */, + BB0C4928190910E70015152C /* engine.plist in Resources */, + BB0C4964190910E70015152C /* Star_Chaser.mp3 in Resources */, + BB0C496A190910E70015152C /* vanishingPoint.plist in Resources */, + BB0C4910190910E70015152C /* coconut.obj in Resources */, + BB0C493A190910E70015152C /* glow.plist in Resources */, + BB0C491C190910E70015152C /* diji1_v002.obj in Resources */, + BB0C4932190910E70015152C /* gameover_score_num_0.png in Resources */, + BB0C4936190910E70015152C /* gameover.plist in Resources */, + BB0C491E190910E70015152C /* diji02_v002_128.png in Resources */, + BB0C4960190910E70015152C /* score_right_top.png in Resources */, + AC1904B2198B72BF00A2307E /* listviewbg.png in Resources */, + BB0C492E190910E70015152C /* Flux2.mp3 in Resources */, + BB0C495A190910E70015152C /* player_bullet_explosion.png in Resources */, + BB0C4948190910E70015152C /* menu_scene.png in Resources */, + BB0C4968190910E70015152C /* toonSmoke.plist in Resources */, + BB0C4942190910E70015152C /* loadingAndHP.plist in Resources */, + BB0C494E190910E70015152C /* muzzle.png in Resources */, + AC1904B8198B72BF00A2307E /* HelloWorld.png in Resources */, + BB0C4914190910E70015152C /* daodan_32.png in Resources */, + BB0C4926190910E70015152C /* emissionPart.plist in Resources */, + BB0C4956190910E70015152C /* Particle.plist in Resources */, + BB0C4946190910E70015152C /* menu_scene.plist in Resources */, + BB0C4912190910E70015152C /* credits_03.png in Resources */, + BB0C491A190910E70015152C /* diji1_v001.obj in Resources */, + BB0C4962190910E70015152C /* Star Chaser (2012).mp3 in Resources */, + BB0C4918190910E70015152C /* debris.plist in Resources */, + BB0C4966190910E70015152C /* streak.png in Resources */, + BB0C4904190910E70015152C /* boom2.mp3 in Resources */, + BB0C494C190910E70015152C /* missileFlare.plist in Resources */, + BB0C493C190910E70015152C /* groundLevel.jpg in Resources */, + BB0C4952190910E70015152C /* num.fnt in Resources */, + BB0C495E190910E70015152C /* playerv002.obj in Resources */, + BB0C4954190910E70015152C /* Orbital Colossus_0.mp3 in Resources */, + AC1904AE198B72BF00A2307E /* backtotopnormal.png in Resources */, + BB0C490E190910E70015152C /* coco.png in Resources */, + BB0C4944190910E70015152C /* loadingAndHP.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AC1904D4198B7A9200A2307E /* CCFLayer.cpp in Sources */, + B21386761925C30000A2C310 /* Sprite3DEffect.cpp in Sources */, + BB0C48B1190910CE0015152C /* Explosion.cpp in Sources */, + BB0C48BD190910CE0015152C /* LoadingScene.cpp in Sources */, + BB0C48B5190910CE0015152C /* GameEntity.cpp in Sources */, + BB0C48C3190910CE0015152C /* Plane.cpp in Sources */, + BB0C48A9190910CE0015152C /* AirCraft.cpp in Sources */, + AC1904C5198B733900A2307E /* FriendControlScene.cpp in Sources */, + BB0C48AF190910CE0015152C /* Enemies.cpp in Sources */, + BB0C48C5190910CE0015152C /* Player.cpp in Sources */, + AC1904D0198B78F800A2307E /* ConnectionInterface.cpp in Sources */, + BB0C48B7190910CE0015152C /* GameLayer.cpp in Sources */, + 503AE10017EB989F00D1A890 /* AppController.mm in Sources */, + AC1904DC198B7BC800A2307E /* PopLayer.cpp in Sources */, + BB0C48BB190910CE0015152C /* LicenseLayer.cpp in Sources */, + 503AE10217EB989F00D1A890 /* RootViewController.mm in Sources */, + AC1904D8198B7B4B00A2307E /* PeerButton.cpp in Sources */, + BB0C48AD190910CE0015152C /* Effects.cpp in Sources */, + AC1904CC198B75D400A2307E /* CCFPlayer.cpp in Sources */, + BB0C48C1190910CE0015152C /* ParticleManager.cpp in Sources */, + 1AFAF8B716D35DE700DB1158 /* AppDelegate.cpp in Sources */, + BB0C48AB190910CE0015152C /* Bullets.cpp in Sources */, + 503AE10117EB989F00D1A890 /* main.m in Sources */, + 1AFAF8B816D35DE700DB1158 /* HelloWorldScene.cpp in Sources */, + BB0C48B9190910CE0015152C /* GameOverLayer.cpp in Sources */, + BB0C48BF190910CE0015152C /* MainMenuScene.cpp in Sources */, + BB0C48B3190910CE0015152C /* GameControllers.cpp in Sources */, + BB0C48C7190910CE0015152C /* PublicApi.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5087E75617EB910900C73F5D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AC1904C6198B733900A2307E /* FriendControlScene.cpp in Sources */, + 5087E75717EB910900C73F5D /* AppDelegate.cpp in Sources */, + BB0C48C2190910CE0015152C /* ParticleManager.cpp in Sources */, + B21386771925C30000A2C310 /* Sprite3DEffect.cpp in Sources */, + BB0C48C4190910CE0015152C /* Plane.cpp in Sources */, + AC1904D9198B7B4B00A2307E /* PeerButton.cpp in Sources */, + BB0C48BC190910CE0015152C /* LicenseLayer.cpp in Sources */, + AC1904DD198B7BC800A2307E /* PopLayer.cpp in Sources */, + 5087E75817EB910900C73F5D /* HelloWorldScene.cpp in Sources */, + AC1904CD198B75D400A2307E /* CCFPlayer.cpp in Sources */, + BB0C48B0190910CE0015152C /* Enemies.cpp in Sources */, + BB0C48AA190910CE0015152C /* AirCraft.cpp in Sources */, + AC1904D1198B78F800A2307E /* ConnectionInterface.cpp in Sources */, + BB0C48C6190910CE0015152C /* Player.cpp in Sources */, + BB0C48B8190910CE0015152C /* GameLayer.cpp in Sources */, + BB0C48B4190910CE0015152C /* GameControllers.cpp in Sources */, + BB0C48C8190910CE0015152C /* PublicApi.cpp in Sources */, + 503AE10517EB98FF00D1A890 /* main.cpp in Sources */, + BB0C48C0190910CE0015152C /* MainMenuScene.cpp in Sources */, + BB0C48BA190910CE0015152C /* GameOverLayer.cpp in Sources */, + BB0C48AE190910CE0015152C /* Effects.cpp in Sources */, + BB0C48BE190910CE0015152C /* LoadingScene.cpp in Sources */, + BB0C48AC190910CE0015152C /* Bullets.cpp in Sources */, + BB0C48B2190910CE0015152C /* Explosion.cpp in Sources */, + AC1904D5198B7A9200A2307E /* CCFLayer.cpp in Sources */, + BB0C48B6190910CE0015152C /* GameEntity.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 1AC6FB16180E9959004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx Mac"; + targetProxy = 1AC6FB15180E9959004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB18180E9959004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx-extensions Mac"; + targetProxy = 1AC6FB17180E9959004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB1A180E9959004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "chipmunk Mac"; + targetProxy = 1AC6FB19180E9959004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB1C180E9959004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "CocosDenshion Mac"; + targetProxy = 1AC6FB1B180E9959004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB1E180E9963004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "box2d Mac"; + targetProxy = 1AC6FB1D180E9963004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB25180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx iOS"; + targetProxy = 1AC6FB24180E99E1004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB27180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx-extensions iOS"; + targetProxy = 1AC6FB26180E99E1004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB29180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "chipmunk iOS"; + targetProxy = 1AC6FB28180E99E1004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB2B180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "box2d iOS"; + targetProxy = 1AC6FB2A180E99E1004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB2D180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "CocosDenshion iOS"; + targetProxy = 1AC6FB2C180E99E1004C840B /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COMPRESS_PNG_FILES = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ios/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + USE_FILE32API, + CC_TARGET_OS_IPHONE, + "COCOS2D_DEBUG=1", + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../cocos2d/cocos/platform/ios", + "$(SRCROOT)/../cocos2d/cocos/platform/ios/Simulation", + ); + INFOPLIST_FILE = ios/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + LIBRARY_SEARCH_PATHS = ""; + PROVISIONING_PROFILE = ""; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COMPRESS_PNG_FILES = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ios/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + USE_FILE32API, + CC_TARGET_OS_IPHONE, + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../cocos2d/cocos/platform/ios", + "$(SRCROOT)/../cocos2d/cocos/platform/ios/Simulation", + ); + INFOPLIST_FILE = ios/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + LIBRARY_SEARCH_PATHS = ""; + PROVISIONING_PROFILE = ""; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Release; + }; + 5087E76D17EB910900C73F5D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = mac/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + USE_FILE32API, + CC_TARGET_OS_MAC, + "COCOS2D_DEBUG=1", + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../cocos2d/cocos/platform/mac", + "$(SRCROOT)/../cocos2d/external/glfw3/include/mac", + ); + INFOPLIST_FILE = mac/Info.plist; + LIBRARY_SEARCH_PATHS = ""; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Debug; + }; + 5087E76E17EB910900C73F5D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = mac/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + USE_FILE32API, + CC_TARGET_OS_MAC, + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../cocos2d/cocos/platform/mac", + "$(SRCROOT)/../cocos2d/external/glfw3/include/mac", + ); + INFOPLIST_FILE = mac/Info.plist; + LIBRARY_SEARCH_PATHS = ""; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + COPY_PHASE_STRIP = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../cocos2d", + "$(SRCROOT)/../cocos2d/cocos", + "$(SRCROOT)/../cocos2d/cocos/base", + "$(SRCROOT)/../cocos2d/cocos/physics", + "$(SRCROOT)/../cocos2d/cocos/math/kazmath", + "$(SRCROOT)/../cocos2d/cocos/2d", + "$(SRCROOT)/../cocos2d/cocos/ui", + "$(SRCROOT)/../cocos2d/cocos/network", + "$(SRCROOT)/../cocos2d/cocos/audio/include", + "$(SRCROOT)/../cocos2d/cocos/editor-support", + "$(SRCROOT)/../cocos2d/extensions", + "$(SRCROOT)/../cocos2d/external", + "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", + ); + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../cocos2d", + "$(SRCROOT)/../cocos2d/cocos", + "$(SRCROOT)/../cocos2d/cocos/base", + "$(SRCROOT)/../cocos2d/cocos/physics", + "$(SRCROOT)/../cocos2d/cocos/math/kazmath", + "$(SRCROOT)/../cocos2d/cocos/2d", + "$(SRCROOT)/../cocos2d/cocos/ui", + "$(SRCROOT)/../cocos2d/cocos/network", + "$(SRCROOT)/../cocos2d/cocos/audio/include", + "$(SRCROOT)/../cocos2d/cocos/editor-support", + "$(SRCROOT)/../cocos2d/extensions", + "$(SRCROOT)/../cocos2d/external", + "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", + ); + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "EarthWarrior3D iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 5087E76C17EB910900C73F5D /* Build configuration list for PBXNativeTarget "EarthWarrior3D Mac" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5087E76D17EB910900C73F5D /* Debug */, + 5087E76E17EB910900C73F5D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "EarthWarrior3D" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/AppController.h b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/AppController.h new file mode 100755 index 0000000..978e6e3 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/AppController.h @@ -0,0 +1,12 @@ +#import + +@class RootViewController; + +@interface AppController : NSObject { + UIWindow *window; +} + +@property(nonatomic, readonly) RootViewController* viewController; + +@end + diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/AppController.mm b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/AppController.mm new file mode 100755 index 0000000..e1e807c --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/AppController.mm @@ -0,0 +1,142 @@ +/**************************************************************************** + 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. + ****************************************************************************/ + +#import "AppController.h" +#import "CCEAGLView.h" +#import "cocos2d.h" +#import "AppDelegate.h" +#import "RootViewController.h" + +@implementation AppController + +#pragma mark - +#pragma mark Application lifecycle + +// cocos2d application instance +static AppDelegate s_sharedApplication; + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + + // Override point for customization after application launch. + + // Add the view controller's view to the window and display. + window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; + + // Init the CCEAGLView + CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [window bounds] + pixelFormat: kEAGLColorFormatRGB565 + depthFormat: GL_DEPTH24_STENCIL8_OES + preserveBackbuffer: NO + sharegroup: nil + multiSampling: NO + numberOfSamples: 0]; + + // Use RootViewController manage CCEAGLView + _viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; + _viewController.wantsFullScreenLayout = YES; + _viewController.view = eaglView; + + // Set RootViewController to window + if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0) + { + // warning: addSubView doesn't work on iOS6 + [window addSubview: _viewController.view]; + } + else + { + // use this method on ios6 + [window setRootViewController:_viewController]; + } + + [window makeKeyAndVisible]; + + [[UIApplication sharedApplication] setStatusBarHidden:true]; + + // IMPORTANT: Setting the GLView should be done after creating the RootViewController + cocos2d::GLView *glview = cocos2d::GLView::createWithEAGLView(eaglView); + cocos2d::Director::getInstance()->setOpenGLView(glview); + + cocos2d::Application::getInstance()->run(); + + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + /* + Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + */ + //We don't need to call this method any more. It will interupt user defined game pause&resume logic + /* cocos2d::Director::getInstance()->pause(); */ +} + +- (void)applicationDidBecomeActive:(UIApplication *)application { + /* + Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + */ + //We don't need to call this method any more. It will interupt user defined game pause&resume logic + /* cocos2d::Director::getInstance()->resume(); */ +} + +- (void)applicationDidEnterBackground:(UIApplication *)application { + /* + Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + If your application supports background execution, called instead of applicationWillTerminate: when the user quits. + */ + cocos2d::Application::getInstance()->applicationDidEnterBackground(); +} + +- (void)applicationWillEnterForeground:(UIApplication *)application { + /* + Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. + */ + cocos2d::Application::getInstance()->applicationWillEnterForeground(); +} + +- (void)applicationWillTerminate:(UIApplication *)application { + /* + Called when the application is about to terminate. + See also applicationDidEnterBackground:. + */ +} + + +#pragma mark - +#pragma mark Memory management + +- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { + /* + Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. + */ +} + + +- (void)dealloc { + [window release]; + [super dealloc]; +} + + +@end diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Default-568h@2x.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Default-568h@2x.png new file mode 100755 index 0000000..66c6d1c Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Default-568h@2x.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Default.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Default.png new file mode 100755 index 0000000..dcb8072 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Default.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Default@2x.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Default@2x.png new file mode 100755 index 0000000..8468988 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Default@2x.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-100.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-100.png new file mode 100755 index 0000000..ef38d45 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-100.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-114.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-114.png new file mode 100755 index 0000000..c380786 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-114.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-120.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-120.png new file mode 100755 index 0000000..a5b49cc Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-120.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-144.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-144.png new file mode 100755 index 0000000..1526615 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-144.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-152.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-152.png new file mode 100755 index 0000000..8aa8250 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-152.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-29.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-29.png new file mode 100755 index 0000000..0500184 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-29.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-40.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-40.png new file mode 100755 index 0000000..775685d Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-40.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-50.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-50.png new file mode 100755 index 0000000..ac381bc Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-50.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-57.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-57.png new file mode 100755 index 0000000..4fcc6fd Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-57.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-58.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-58.png new file mode 100755 index 0000000..f0f8b7f Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-58.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-72.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-72.png new file mode 100755 index 0000000..2c573c8 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-72.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-76.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-76.png new file mode 100755 index 0000000..8a1fa18 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-76.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-80.png b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-80.png new file mode 100755 index 0000000..d9c7ab4 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Icon-80.png differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Info.plist b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Info.plist new file mode 100755 index 0000000..0b9ef66 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Info.plist @@ -0,0 +1,69 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + Icon-57.png + CFBundleIconFiles + + Icon-29 + Icon-80 + Icon-58 + Icon-120 + Icon.png + Icon@2x.png + Icon-57.png + Icon-114.png + Icon-72.png + Icon-144.png + + CFBundleIconFiles~ipad + + Icon-29 + Icon-50 + Icon-58 + Icon-80 + Icon-40 + Icon-100 + Icon-152 + Icon-76 + Icon-120 + Icon.png + Icon@2x.png + Icon-57.png + Icon-114.png + Icon-72.png + Icon-144.png + + CFBundleIdentifier + org.cocos2d-x.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIAppFonts + + UIPrerenderedIcon + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + + diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Prefix.pch b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Prefix.pch new file mode 100755 index 0000000..5b4e2fd --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'iphone' target in the 'iphone' project +// + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/RootViewController.h b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/RootViewController.h new file mode 100755 index 0000000..a166901 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/RootViewController.h @@ -0,0 +1,34 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#import + + +@interface RootViewController : UIViewController { + +} +- (BOOL) prefersStatusBarHidden; + +@end diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/RootViewController.mm b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/RootViewController.mm new file mode 100755 index 0000000..c6e2390 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/RootViewController.mm @@ -0,0 +1,114 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#import "RootViewController.h" +#import "cocos2d.h" +#import "CCEAGLView.h" + +@implementation RootViewController + +/* + // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { + // Custom initialization + } + return self; +} +*/ + +/* +// Implement loadView to create a view hierarchy programmatically, without using a nib. +- (void)loadView { +} +*/ + +/* +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad { + [super viewDidLoad]; +} + +*/ +// Override to allow orientations other than the default portrait orientation. +// This method is deprecated on ios6 +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return UIInterfaceOrientationIsLandscape( interfaceOrientation ); +} + +// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead +- (NSUInteger) supportedInterfaceOrientations{ +#ifdef __IPHONE_6_0 + return UIInterfaceOrientationMaskAllButUpsideDown; +#endif +} + +- (BOOL) shouldAutorotate { + return YES; +} + +- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { + [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; + + cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView(); + + if (glview) + { + CCEAGLView *eaglview = (CCEAGLView*) glview->getEAGLView(); + + if (eaglview) + { + CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]); + cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height); + } + } +} + +//fix not hide status on ios7 +- (BOOL)prefersStatusBarHidden +{ + return YES; +} + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +- (void)viewDidUnload { + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + + +- (void)dealloc { + [super dealloc]; +} + + +@end diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/main.m b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/main.m new file mode 100755 index 0000000..8daa43e --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.ios_mac/ios/main.m @@ -0,0 +1,9 @@ +#import + +int main(int argc, char *argv[]) { + + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, @"AppController"); + [pool release]; + return retVal; +} diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/mac/Icon.icns b/samples/EarthWarrior3D-CSDK/proj.ios_mac/mac/Icon.icns new file mode 100755 index 0000000..2040fc6 Binary files /dev/null and b/samples/EarthWarrior3D-CSDK/proj.ios_mac/mac/Icon.icns differ diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/mac/Info.plist b/samples/EarthWarrior3D-CSDK/proj.ios_mac/mac/Info.plist new file mode 100755 index 0000000..a73feb7 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.ios_mac/mac/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + Icon + CFBundleIdentifier + org.cocos2d-x.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSApplicationCategoryType + public.app-category.games + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright © 2013. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/mac/Prefix.pch b/samples/EarthWarrior3D-CSDK/proj.ios_mac/mac/Prefix.pch new file mode 100755 index 0000000..46c36a7 --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.ios_mac/mac/Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'Paralaxer' target in the 'Paralaxer' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/samples/EarthWarrior3D-CSDK/proj.ios_mac/mac/main.cpp b/samples/EarthWarrior3D-CSDK/proj.ios_mac/mac/main.cpp new file mode 100755 index 0000000..96f027e --- /dev/null +++ b/samples/EarthWarrior3D-CSDK/proj.ios_mac/mac/main.cpp @@ -0,0 +1,34 @@ +/**************************************************************************** + 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. + ****************************************************************************/ + +#include "AppDelegate.h" +#include "cocos2d.h" + +USING_NS_CC; + +int main(int argc, char *argv[]) +{ + AppDelegate app; + return Application::getInstance()->run(); +} diff --git a/samples/EarthWarrior3D/.cocos-project.json b/samples/EarthWarrior3D/.cocos-project.json new file mode 100755 index 0000000..8f57f87 --- /dev/null +++ b/samples/EarthWarrior3D/.cocos-project.json @@ -0,0 +1,3 @@ +{ + "project_type": "cpp" +} \ No newline at end of file diff --git a/samples/EarthWarrior3D/CMakeLists.txt b/samples/EarthWarrior3D/CMakeLists.txt new file mode 100755 index 0000000..36b268d --- /dev/null +++ b/samples/EarthWarrior3D/CMakeLists.txt @@ -0,0 +1,174 @@ +cmake_minimum_required(VERSION 2.6) + +set(APP_NAME MyGame) +project (${APP_NAME}) + +include(cocos2d/build/BuildHelpers.CMakeLists.txt) + +option(USE_CHIPMUNK "Use chipmunk for physics library" ON) +option(USE_BOX2D "Use box2d for physics library" OFF) +option(DEBUG_MODE "Debug or release?" ON) + +if(DEBUG_MODE) + set(CMAKE_BUILD_TYPE DEBUG) +else(DEBUG_MODE) + set(CMAKE_BUILD_TYPE RELEASE) +endif(DEBUG_MODE) + +set(CMAKE_C_FLAGS_DEBUG "-g -Wall -DCOCOS2D_DEBUG=1") +set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + +if(USE_CHIPMUNK) + message("Using chipmunk ...") + add_definitions(-DLINUX -DCC_ENABLE_CHIPMUNK_INTEGRATION=1) +elseif(USE_BOX2D) + message("Using box2d ...") + add_definitions(-DLINUX -DCC_ENABLE_BOX2D_INTEGRATION=1) +else(USE_CHIPMUNK) + message(FATAL_ERROR "Must choose a physics library.") +endif(USE_CHIPMUNK) + +# architecture +if ( CMAKE_SIZEOF_VOID_P EQUAL 8 ) +set(ARCH_DIR "64-bit") +else() +set(ARCH_DIR "32-bit") +endif() + + +set(GAME_SRC + proj.linux/main.cpp + Classes/AppDelegate.cpp + Classes/HelloWorldScene.cpp +) + +set(COCOS2D_ROOT ${CMAKE_SOURCE_DIR}/cocos2d) + +include_directories( + /usr/local/include/GLFW + ${COCOS2D_ROOT} + ${COCOS2D_ROOT}/cocos + ${COCOS2D_ROOT}/cocos/audio/include + ${COCOS2D_ROOT}/cocos/2d + ${COCOS2D_ROOT}/cocos/2d/renderer + ${COCOS2D_ROOT}/cocos/2d/platform + ${COCOS2D_ROOT}/cocos/2d/platform/desktop + ${COCOS2D_ROOT}/cocos/2d/platform/linux + ${COCOS2D_ROOT}/cocos/base + ${COCOS2D_ROOT}/cocos/deprecated + ${COCOS2D_ROOT}/cocos/physics + ${COCOS2D_ROOT}/cocos/editor-support + ${COCOS2D_ROOT}/cocos/math/kazmath + ${COCOS2D_ROOT}/extensions + ${COCOS2D_ROOT}/external + ${COCOS2D_ROOT}/external/edtaa3func + ${COCOS2D_ROOT}/external/jpeg/include/linux + ${COCOS2D_ROOT}/external/tiff/include/linux + ${COCOS2D_ROOT}/external/webp/include/linux + ${COCOS2D_ROOT}/external/tinyxml2 + ${COCOS2D_ROOT}/external/unzip + ${COCOS2D_ROOT}/external/chipmunk/include/chipmunk + ${COCOS2D_ROOT}/external/freetype2/include/linux + ${COCOS2D_ROOT}/external/websockets/include/linux + ${COCOS2D_ROOT}/external/spidermonkey/include/linux + ${COCOS2D_ROOT}/external/linux-specific/fmod/include/${ARCH_DIR} + ${COCOS2D_ROOT}/external/xxhash +) + +link_directories( + /usr/local/lib + ${COCOS2D_ROOT}/external/jpeg/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/tiff/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/webp/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/freetype2/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/websockets/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/spidermonkey/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/linux-specific/fmod/prebuilt/${ARCH_DIR} +) + +# kazmath +add_subdirectory(${COCOS2D_ROOT}/cocos/math/kazmath) + +# chipmunk library +add_subdirectory(${COCOS2D_ROOT}/external/chipmunk/src) + +# box2d library +add_subdirectory(${COCOS2D_ROOT}/external/Box2D) + +# unzip library +add_subdirectory(${COCOS2D_ROOT}/external/unzip) + +# tinyxml2 library +add_subdirectory(${COCOS2D_ROOT}/external/tinyxml2) + +# audio +add_subdirectory(${COCOS2D_ROOT}/cocos/audio) + +# xxhash library +add_subdirectory(${COCOS2D_ROOT}/external/xxhash) + +# cocos base library +add_subdirectory(${COCOS2D_ROOT}/cocos/base) + +# cocos 2d library +add_subdirectory(${COCOS2D_ROOT}/cocos/2d) + +# cocos storage +add_subdirectory(${COCOS2D_ROOT}/cocos/storage) + +# ui +add_subdirectory(${COCOS2D_ROOT}/cocos/ui) + +# network +add_subdirectory(${COCOS2D_ROOT}/cocos/network) + +# extensions +add_subdirectory(${COCOS2D_ROOT}/extensions) + +## Editor Support + +# spine +add_subdirectory(${COCOS2D_ROOT}/cocos/editor-support/spine) + +# cocosbuilder +add_subdirectory(${COCOS2D_ROOT}/cocos/editor-support/cocosbuilder) + +# cocostudio +add_subdirectory(${COCOS2D_ROOT}/cocos/editor-support/cocostudio) + +# add the executable +add_executable(${APP_NAME} + ${GAME_SRC} +) + +if ( CMAKE_SIZEOF_VOID_P EQUAL 8 ) +set(FMOD_LIB "fmodex64") +else() +set(FMOD_LIB "fmodex") +endif() + +target_link_libraries(${APP_NAME} + ui + network + storage + spine + cocostudio + cocosbuilder + extensions + audio + cocos2d + ) + +set(APP_BIN_DIR "${CMAKE_BINARY_DIR}/bin") + +set_target_properties(${APP_NAME} PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${APP_BIN_DIR}") + +pre_build(${APP_NAME} + COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resources ${APP_BIN_DIR}/Resources + ) + diff --git a/samples/EarthWarrior3D/Classes/3d/Colored.es2.frag.h b/samples/EarthWarrior3D/Classes/3d/Colored.es2.frag.h new file mode 100755 index 0000000..e91dde0 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/3d/Colored.es2.frag.h @@ -0,0 +1,28 @@ +static const char* baseColoredFrag = STRINGIFY( + +#ifdef GL_ES +varying lowp vec4 DestinationColor; +#else +varying vec4 DestinationColor; +#endif + +//varying mediump vec2 TextureCoordOut; + +//uniform sampler2D Sampler; + +void main(void) +{ + gl_FragColor = DestinationColor; + gl_FragColor.a = 1.0; +} +); + + +// pure black frag shader +static const char* blackFrag = STRINGIFY( +uniform vec3 OutLineColor; +void main(void) +{ + gl_FragColor = vec4(OutLineColor,1.0); +} +); diff --git a/samples/EarthWarrior3D/Classes/3d/Mesh.cpp b/samples/EarthWarrior3D/Classes/3d/Mesh.cpp new file mode 100755 index 0000000..2ef2b3f --- /dev/null +++ b/samples/EarthWarrior3D/Classes/3d/Mesh.cpp @@ -0,0 +1,580 @@ +#include "Mesh.h" + +#include +#include +#include +#include +#include + + +#include "cocos2d.h" +#include "../cocos2d/cocos/2d/ccMacros.h" + +using namespace std; +using namespace cocos2d; + +class ObjMeshParser +{ +public: + void parse(std::istream& streamIn, ObjMeshData& meshData); +protected: + bool parseComment(std::istream& lineStream, ObjMeshData& meshData); + bool parseVertex(std::istream& lineStream, ObjMeshData& meshData); + bool parseTextureVertex(std::istream& lineStream, ObjMeshData& meshData); + bool parseNormal(std::istream& lineStream, ObjMeshData& meshData); + bool parseFace(std::istream& lineStream, ObjMeshData& meshData); + //void onLoadFace() + void logParseError(int lineCount, const std::string& lineData); +}; +void ObjMeshParser::logParseError(int lineCount, const std::string& lineData) +{ + CCLOG("Parse Obj file ERROR: line---%d, data---%s", lineCount, lineData.c_str()); +} + +bool ObjMeshParser::parseComment(std::istream& lineStream, ObjMeshData& meshData) +{ + return true; + //std::string comment; + //std::getline(lineStream,comment); + //todo, log comment +} + +bool ObjMeshParser::parseVertex(std::istream& lineStream, ObjMeshData& meshData) +{ + float x(0),y(0),z(0); + char whiteSpacex_y(0),whiteSpacey_z(0); + lineStream>>x>>whiteSpacex_y>>std::ws>>y>>whiteSpacey_z>>std::ws>>z>>std::ws; + //check + if(lineStream.bad() || !lineStream.eof() || !std::isspace(whiteSpacex_y) || !std::isspace(whiteSpacey_z)) + { + return false; + } + + meshData._vertexLists.push_back(vec3(x,y,z)); + return true; +} + +bool ObjMeshParser::parseTextureVertex(std::istream& lineStream, ObjMeshData& meshData) +{ + float u(0),v(0); + float w(0.f); + char whiteSpaceu_v(0); + lineStream>>u>>whiteSpaceu_v>>std::ws>>v>>std::ws; + if(!lineStream.bad() || !lineStream.eof()) + { + lineStream>>w>>std::ws; + } + //check + if(lineStream.bad() || !lineStream.eof() || !std::isspace(whiteSpaceu_v)) + { + return false; + } + v = 1 - v; + meshData._uvVertexLists.push_back(vec2(u,v)); + if(w != 0.f) + { + return false; + } + return true; +} + +bool ObjMeshParser::parseNormal(std::istream& lineStream, ObjMeshData& meshData) +{ + float x(0),y(0),z(0); + char whiteSpacex_y(0),whiteSpacey_z(0); + lineStream>>x>>whiteSpacex_y>>std::ws>>y>>whiteSpacey_z>>std::ws>>z>>std::ws; + //check + if(lineStream.bad() || !lineStream.eof() || !std::isspace(whiteSpacex_y) || !std::isspace(whiteSpacey_z)) + { + return false; + } + + meshData._normalVertexLists.push_back(vec3(x,y,z)); + return true; +} + +bool ObjMeshParser::parseFace(std::istream& lineStream, ObjMeshData& meshData) +{ + std::vector face; + + while (!lineStream.bad() && !lineStream.eof()) + { + std::string faceVertexString; + lineStream >> faceVertexString; + + //parse face vertex; + { + FaceVertex v(-1,-1,-1); + char placeHolder(0); + std::stringstream faceVertexStream(faceVertexString); + faceVertexStream >> v._vIndex; + if(!faceVertexStream.eof()) + { + faceVertexStream >> placeHolder>>std::ws; + if(placeHolder != '/') return false; + if(faceVertexStream.peek() == '/') + { + faceVertexStream >> placeHolder; + faceVertexStream >> v._normIndex; + } + else + { + faceVertexStream >> v._uvIndex; + if(!faceVertexStream.eof()) + { + faceVertexStream >> placeHolder; + if( placeHolder != '/') return false; + faceVertexStream >> v._normIndex; + } + } + } + if(v._uvIndex != -1) v._uvIndex -= 1; + if(v._normIndex != -1) v._normIndex -= 1; + if(v._vIndex != -1) v._vIndex -= 1; + face.push_back(v); + } + + //try read white space + char whiteSpace(0); + if(!lineStream.eof()) + { + lineStream >> whiteSpace >> std::ws; + if(!std::isspace(whiteSpace)) return false; + } + + } + + if(face.size() < 3) return false; + meshData._faceLists.push_back(face); + return true; +} + +void ObjMeshParser::parse(std::istream &streamIn, ObjMeshData &meshData) +{ + std::string line; + int line_number = 0; + while (!streamIn.eof() && std::getline(streamIn, line)) + { + ++line_number; + std::istringstream stringstream(line); + stringstream.unsetf(std::ios_base::skipws); + + stringstream >> std::ws; + + if(!stringstream.eof()) + { + if(stringstream.peek() == '#') + { + char commentKey; + stringstream>>commentKey; + if(!parseComment(stringstream, meshData)) + { + logParseError(line_number,line); + } + } + else + { + std::string keyword; + stringstream >> keyword; + char whiteSpace; + if(keyword == "v") + { + stringstream>>whiteSpace>>std::ws; + //check and parse + if(!std::isspace(whiteSpace) || stringstream.bad() || !parseVertex(stringstream, meshData)) + { + logParseError(line_number,line); + } + } + else if(keyword == "vt") + { + stringstream>>whiteSpace>>std::ws; + //check + if(!std::isspace(whiteSpace) || stringstream.bad() || !parseTextureVertex(stringstream, meshData)) + { + logParseError(line_number,line); + } + } + else if(keyword == "vn") + { + stringstream>>whiteSpace>>std::ws; + //check + if(!std::isspace(whiteSpace) || stringstream.bad() || !parseNormal(stringstream, meshData)) + { + logParseError(line_number,line); + } + } + else if((keyword == "f") || (keyword == "fo")) + { + stringstream>>whiteSpace>>std::ws; + //check + if(!std::isspace(whiteSpace) || stringstream.bad() || !parseFace(stringstream, meshData)) + { + logParseError(line_number,line); + } + } + else + { + if(!stringstream.eof()) + logParseError(line_number,line); + } + + } + + } + } + +} + +bool ObjMeshData::checkBound()const +{ + for(size_t faceIndex = 0; faceIndex < _faceLists.size(); ++faceIndex) + { + for(size_t faceVertexIndex = 0; faceVertexIndex < _faceLists[faceIndex].size(); ++ faceVertexIndex) + { + if(_faceLists[faceIndex][faceVertexIndex]._vIndex == -1) + { + CCLOG( "on face %d faceVertex %d, vIndex is -1 out of bound.", (int)faceIndex, (int)faceVertexIndex); + return false; + } + if(_faceLists[faceIndex][faceVertexIndex]._vIndex >= _vertexLists.size()) + { + CCLOG("on face %d faceVertex %d, vIndex is %d out of bound.", (int)faceIndex, (int)faceVertexIndex, _faceLists[faceIndex][faceVertexIndex]._vIndex); + return false; + } + + if(_faceLists[faceIndex][faceVertexIndex]._normIndex >= (int)_normalVertexLists.size()) + { + CCLOG("on face %d faceVertex %d, normIndex is %d out of bound.", (int)faceIndex, (int)faceVertexIndex, _faceLists[faceIndex][faceVertexIndex]._normIndex); + return false; + } + + if(_faceLists[faceIndex][faceVertexIndex]._uvIndex >= (int)_uvVertexLists.size()) + { + CCLOG("on face %d faceVertex %d, uvIndex is %d out of bound.", (int)faceIndex, (int)faceVertexIndex, _faceLists[faceIndex][faceVertexIndex]._uvIndex); + return false; + } + } + } + + return true; +} + +bool ObjMeshData::isTriangeMesh() const +{ + for(const auto& face : _faceLists) + { + if(face.size() > 3) + return false; + } + return true; +} + +void ObjMeshData::triangular() +{ + checkBound(); + std::vector> triangleFaces; + for(const auto& face : _faceLists) + { + if(face.size() < 3) continue; + else + { + //convert polygon to triangles + // a,b, c,d,e will be converted into abc, acd, ade + size_t triangleFacecount = face.size() - 2; + for (size_t triangleIndex = 0; triangleIndex < triangleFacecount; ++triangleIndex) + { + std::vector triangle; + triangle.push_back(face[0]); + triangle.push_back(face[triangleIndex+1]); + triangle.push_back(face[triangleIndex+2]); + triangleFaces.push_back(triangle); + } + } + } + + _faceLists = triangleFaces; +} + +void ObjMeshData::trianglarAndGenerateNormals() +{ + triangular(); + if( _normalVertexLists.size() != 0 ) return; + + std::vector> faceVertexNormalList; + faceVertexNormalList.resize(_vertexLists.size()); + + for (const auto& face : _faceLists) + { + vec3 v1 = _vertexLists[face[0]._vIndex]; + vec3 v2 = _vertexLists[face[1]._vIndex]; + vec3 v3 = _vertexLists[face[2]._vIndex]; + + vec3 fn = (v2-v1).Cross(v3-v2); + fn.Normalize(); + faceVertexNormalList[face[0]._vIndex].push_back(fn); + faceVertexNormalList[face[1]._vIndex].push_back(fn); + faceVertexNormalList[face[2]._vIndex].push_back(fn); + } + + _normalVertexLists.resize(faceVertexNormalList.size()); + for (int index = 0; index < _normalVertexLists.size(); ++index) + { + _normalVertexLists[index] = vec3(0,0,0); + for (const auto& facenormal : faceVertexNormalList[index]) + { + _normalVertexLists[index] += facenormal; + } + + _normalVertexLists[index] /= faceVertexNormalList[index].size(); + _normalVertexLists[index].Normalize(); + } +} + +void ObjMeshData::convertToRenderMesh(RenderMesh &renderMesh) +{ + trianglarAndGenerateNormals(); + renderMesh._indices.clear(); + renderMesh._vertexs.clear(); + int packedVertexNumber(0); + std::map>> faceVertexMappings; + for(const auto&face : _faceLists) + { + for (int faceVertexIndex = 0; faceVertexIndex < 3; ++faceVertexIndex) + { + int vertexIndex(-1),normalIndex(-1),uvIndex(-1); + vertexIndex = face[faceVertexIndex]._vIndex; + normalIndex = face[faceVertexIndex]._normIndex; + if(-1 == normalIndex) normalIndex = vertexIndex; + uvIndex = face[faceVertexIndex]._uvIndex; + CCASSERT(-1 != vertexIndex && vertexIndex < (int) _vertexLists.size(),"Vertex index out of bound"); + CCASSERT(-1 != normalIndex && normalIndex < (int) _normalVertexLists.size(),"Normal index out of bound"); + CCASSERT(uvIndex < (int)_uvVertexLists.size(),"UV index out of bound"); + //no vertex, push back one + if(faceVertexMappings[vertexIndex][normalIndex].find(uvIndex) == faceVertexMappings[vertexIndex][normalIndex].end()) + { + faceVertexMappings[vertexIndex][normalIndex][uvIndex] = packedVertexNumber++; + RenderMesh::RenderVertex vertex; + vertex.vertex = _vertexLists[vertexIndex]; + vertex.normal = _normalVertexLists[normalIndex]; + if(face[faceVertexIndex]._uvIndex == -1) //no uv + vertex.uv = vec2(0,0); + else + vertex.uv = _uvVertexLists[uvIndex]; + + renderMesh._vertexs.push_back(vertex); + } + + renderMesh._indices.push_back(faceVertexMappings[vertexIndex][normalIndex][uvIndex]); + } + } +} + +Mesh::Mesh(const string& name) +: _faceCount(0) +, _vertexCount(0) +, _texelCount(0) +, _vertexBuffer(0) +, _indexBuffer(0) +, _indexCount(0) +{ + _name = FileUtils::getInstance()->fullPathForFilename(name); + loadFromFile(name); + _vertices.clear(); + _indices.clear(); +// +// if (getTexelCount() > 0) { +// _texels.resize(getTexelCount()); +// } +// auto texel = _texels.begin(); +// +// _faces.resize(getTriangleIndexCount() / 3); +// ifstream objFile(_name.c_str()); +// float dumy; +// vector::iterator face = _faces.begin(); +// while (objFile) { +// char c = objFile.get(); +// if (c == 'f' && objFile.get() == ' ') { +// CCASSERT(face != _faces.end(), "parse error"); +// face->texi = ivec3(1,1,1); +// objFile >> face->face.x; +// if ((c = objFile.get()) == '/') { +// objFile >> face->texi.x; +// if ((c = objFile.get()) == '/') +// objFile >> dumy; +// } +// +// objFile >> face->face.y; +// if ((c = objFile.get()) == '/') { +// objFile >> face->texi.y; +// if ((c = objFile.get()) == '/') +// objFile >> dumy; +// } +// +// objFile >> face->face.z; +// if ((c = objFile.get()) == '/') { +// objFile >> face->texi.z; +// if ((c = objFile.get()) == '/') { +// objFile >> dumy; +// } +// } +// if (c != '\n') +// objFile.ignore(MAX_LINE_SIZE, '\n'); +// +// face->face -= ivec3(1, 1, 1); +// face->texi -= ivec3(1, 1, 1); +// ++face; +// } +// else if (c == 'v') { +// if ((c = objFile.get()) == 't') { +// objFile >> texel->x >> texel->y; +// +// /*while (texel->x >= 1.000) { +// texel->x -= 1.0; +// } +// while (texel->y >= 1.000) { +// texel->y -= 1.0; +// }*/ +//// texel->x = 1.0 - texel->x; +// //if (texel->x > 1.0 || texel->y > 1.0) { +// texel->y = 1.0 - texel->y; +// ++texel; +// //} +// } +// if (c != '\n') +// objFile.ignore(MAX_LINE_SIZE, '\n'); +// } +// else if (c != '\n') +// objFile.ignore(MAX_LINE_SIZE, '\n'); +// } +// CCASSERT(face == _faces.end(), "parse error"); +} + +Mesh::~Mesh() +{ + freeBuffers(); +} + +bool Mesh::loadFromFile(const std::string &name) +{ + auto fileData = FileUtils::getInstance()->getStringFromFile(name); + std::istringstream objFile(fileData.c_str()); + + ObjMeshParser parser; + + ObjMeshData data; + parser.parse(objFile, data); + + data.convertToRenderMesh(_renderableMesh); + + generateVertices(); + generateTriangleIndices(); + buildBuffer(); + + return true; +} + +void Mesh::countVertexData() const +{ + ifstream objFile(_name.c_str()); + _faceCount = 0; + while (objFile) { + char c = objFile.get(); + if (c == 'v') { + if ((c = objFile.get()) == ' ') + _vertexCount++; + else if (c == 't') + _texelCount++; + } + else if (c == 'f') { + if ((c = objFile.get()) == ' ') + _faceCount++; + } + objFile.ignore(MAX_LINE_SIZE, '\n'); + } +} + +int Mesh::getVertexCount() const +{ + if (_vertexCount != 0) { + return _vertexCount; + } + countVertexData(); + + return _vertexCount; +} + +int Mesh::getTexelCount() const { + if (_vertexCount != 0) { + return _texelCount; + } + countVertexData(); + + return _texelCount; +} +int Mesh::getTriangleIndexCount() const +{ + return _renderableMesh._indices.size()/3; + if (_faceCount != 0) + return _faceCount * 3; + countVertexData(); + + return _faceCount * 3; +} + +void Mesh::generateVertices() +{ + _vertices.resize(_renderableMesh._vertexs.size() * 8); + memcpy(&_vertices[0], &_renderableMesh._vertexs[0], _renderableMesh._vertexs.size() * 8 * sizeof(float)); +} + +void Mesh::generateTriangleIndices() +{ + _indices = _renderableMesh._indices; +// indices.resize(getTriangleIndexCount()); +// vector::iterator index = indices.begin(); +// for (vector::const_iterator f = _faces.begin(); f != _faces.end(); ++f) { +// *index++ = f->face.x; +// *index++ = f->face.y; +// *index++ = f->face.z; +// } +} + +void Mesh::freeBuffers() +{ + if(glIsBuffer(_vertexBuffer)) + { + glDeleteBuffers(1, &_vertexBuffer); + _vertexBuffer = 0; + } + if(glIsBuffer(_indexBuffer)) + { + glDeleteBuffers(1, &_indexBuffer); + _indexBuffer = 0; + } + _indexCount = 0; +} + +void Mesh::buildBuffer() +{ + freeBuffers(); + + glGenBuffers(1, &_vertexBuffer); + glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer); + glBufferData(GL_ARRAY_BUFFER, + _vertices.size() * sizeof(_vertices[0]), + &_vertices[0], + GL_STATIC_DRAW); + glBindBuffer(GL_ARRAY_BUFFER, 0); + + // Create a new VBO for the indices + _indexCount = _indices.size();// model->GetTriangleIndexCount(); + + glGenBuffers(1, &_indexBuffer); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBuffer); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, + _indexCount * sizeof(GLushort), + &_indices[0], + GL_STATIC_DRAW); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); +} diff --git a/samples/EarthWarrior3D/Classes/3d/Mesh.h b/samples/EarthWarrior3D/Classes/3d/Mesh.h new file mode 100755 index 0000000..20ce308 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/3d/Mesh.h @@ -0,0 +1,110 @@ + +#ifndef __CCMESH_H_ +#define __CCMESH_H_ + +#include +#include + +#include "Vector.h" +#include "ccTypes.h" + +struct Face +{ + ivec3 face; + ivec3 texi; +}; + +struct FaceVertex +{ + FaceVertex(int vIndex, int uvIndex, int normIndex) + : _vIndex(vIndex) + , _uvIndex(uvIndex) + , _normIndex(normIndex) + { + } + int _vIndex; + int _uvIndex; + int _normIndex; +}; + +struct RenderMesh +{ + struct RenderVertex + { + vec3 vertex; + vec3 normal; + vec2 uv; + }; + + std::vector _vertexs; + std::vector _indices; +}; + +struct ObjMeshData +{ + //mesh data + std::vector _vertexLists; + std::vector _uvVertexLists; + std::vector _normalVertexLists; + std::vector> _faceLists; + +public: + bool checkBound() const; + bool isTriangeMesh() const; + void triangular(); + void trianglarAndGenerateNormals(); + void convertToRenderMesh(RenderMesh& renderMesh); +}; + +class Mesh +{ +public: + Mesh(const std::string& name); + ~Mesh(); + + bool loadFromFile(const std::string& name); + + inline GLuint getVertexBuffer() const { return _vertexBuffer; } + inline GLuint getIndexBuffer() const { return _indexBuffer; } + inline ssize_t getIndexCount() const { return _indexCount; } + + //void readTexels(std::vector& ) const; + +protected: + void generateVertices(); + void generateTriangleIndices(); + void buildBuffer(); + + void generateLineIndices(std::vector& indices) const {} + int getVertexCount(/*int &texInCount*/) const; + int getTexelCount() const; + + int getLineIndexCount() const { return 0; } + int getTriangleIndexCount() const; + + void freeBuffers(); + +protected: + void countVertexData() const; + std::string _name; + //vector m_faces; + //std::vector _faces; + //std::vector _texels; + mutable int _faceCount; + mutable int _vertexCount; + mutable int _texelCount; + static const int MAX_LINE_SIZE = 128; + + GLuint _vertexBuffer; + GLuint _indexBuffer; + ssize_t _indexCount; + + std::vector _vertices; + std::vector _indices; + +private: + RenderMesh _renderableMesh; + +}; + +#endif // __CCMESH_H_ \ No newline at end of file diff --git a/samples/EarthWarrior3D/Classes/3d/MeshCache.cpp b/samples/EarthWarrior3D/Classes/3d/MeshCache.cpp new file mode 100755 index 0000000..bbfa56e --- /dev/null +++ b/samples/EarthWarrior3D/Classes/3d/MeshCache.cpp @@ -0,0 +1,83 @@ +#include "MeshCache.h" +#include "Mesh.h" +#include "cocos2d.h" + +using namespace cocos2d; + +MeshCache* MeshCache::_cacheInstance = nullptr; + +typedef std::map::iterator MeshMapIter; + +MeshCache::MeshCache() +{ + _cachedMeshes.clear(); +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + // listen the event when app go to foreground + _backToForegroundlistener = EventListenerCustom::create(EVENT_COME_TO_FOREGROUND, CC_CALLBACK_1(MeshCache::listenBackToForeground, this)); + Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_backToForegroundlistener, -1); +#endif +} + +MeshCache::~MeshCache() +{ + for (auto iter = _cachedMeshes.begin(); iter != _cachedMeshes.end(); ++iter) { + CC_SAFE_DELETE(iter->second); + } + _cachedMeshes.clear(); +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + Director::getInstance()->getEventDispatcher()->removeEventListener(_backToForegroundlistener); +#endif +} + +MeshCache* MeshCache::getInstance() +{ + if (! _cacheInstance) { + _cacheInstance = new MeshCache(); + } + + return _cacheInstance; +} + +void MeshCache::purgeMeshCache() +{ + if (_cacheInstance) { + CC_SAFE_DELETE(_cacheInstance); + } +} + +Mesh* MeshCache::addMesh(const std::string& fileName) +{ + Mesh* ret = nullptr; + const std::string fullPath = FileUtils::getInstance()->fullPathForFilename(fileName); + MeshMapIter it = _cachedMeshes.find(fullPath); + if (it == _cachedMeshes.end()) { + ret = new Mesh(fileName); + _cachedMeshes.insert(std::make_pair(fullPath, ret)); + } + else + { + ret = it->second; + } + + return ret; +} + +void MeshCache::removeMesh(const std::string& fileName) +{ + const std::string fullPath = FileUtils::getInstance()->fullPathForFilename(fileName); + MeshMapIter it = _cachedMeshes.find(fullPath); + if (it != _cachedMeshes.end()) { + CC_SAFE_DELETE(it->second); + _cachedMeshes.erase(it); + } +} + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +void MeshCache::listenBackToForeground(EventCustom* event) +{ + for (auto iter = _cachedMeshes.begin(); iter != _cachedMeshes.end(); ++iter) { + Mesh* mesh = iter->second; + mesh->loadFromFile(iter->first); + } +} +#endif diff --git a/samples/EarthWarrior3D/Classes/3d/MeshCache.h b/samples/EarthWarrior3D/Classes/3d/MeshCache.h new file mode 100755 index 0000000..0b9b344 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/3d/MeshCache.h @@ -0,0 +1,35 @@ + +#ifndef __CCMESH_CACHE_H_ +#define __CCMESH_CACHE_H_ + +#include +#include +#include "cocos2d.h" + +class Mesh; +class MeshCache +{ +public: + MeshCache(); + virtual ~MeshCache(); + + static MeshCache* getInstance(); + static void purgeMeshCache(); + + Mesh* addMesh(const std::string& fileName); + void removeMesh(const std::string& fileName); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + void listenBackToForeground(cocos2d::EventCustom* event); +#endif + +protected: + static MeshCache* _cacheInstance; + std::map _cachedMeshes; + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + cocos2d::EventListenerCustom* _backToForegroundlistener; +#endif +}; + +#endif // __CCMESH_CACHE_H_ \ No newline at end of file diff --git a/samples/EarthWarrior3D/Classes/3d/Sprite3D.cpp b/samples/EarthWarrior3D/Classes/3d/Sprite3D.cpp new file mode 100755 index 0000000..4c67245 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/3d/Sprite3D.cpp @@ -0,0 +1,329 @@ +// +// SkyboxNode.m +// testar1 +// +// Created by Pasi Kettunen on 12.12.2012. +// +// + +#include "Sprite3D.h" +#include "MeshCache.h" + +using namespace cocos2d; + +#define STRINGIFY(A) #A +//#include "../Shaders/TexturedLighting.es2.vert.h" +#include "Textured.es2.vert.h" +#include "Textured.es2.frag.h" +#include "Colored.es2.frag.h" + +Sprite3D* Sprite3D::create(const std::string &modelPath, const std::string &texturePath) +{ + auto ret = new Sprite3D; + if( ret && ret->init(modelPath, texturePath)) { + ret->autorelease(); + return ret; + } + return nullptr; +} + +Sprite3D::Sprite3D() +: _texture(nullptr) +, _model(nullptr) +, _mainShader(nullptr) +, _outlineShader(nullptr) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +,_backToForegroundlistener(nullptr) +#endif +{ +} + +Sprite3D::~Sprite3D() +{ + CC_SAFE_RELEASE(_mainShader); + CC_SAFE_RELEASE(_outlineShader); + CC_SAFE_RELEASE(_texture); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + Director::getInstance()->getEventDispatcher()->removeEventListener(_backToForegroundlistener); +#endif +} + +bool Sprite3D::init(const std::string &modelPath, const std::string &texturePath) +{ + auto model = MeshCache::getInstance()->addMesh(modelPath);// new Mesh(modelPath); + if( texturePath.size()) { + setTextureName(texturePath); + } + else + { + buildProgram( _texture->getName() != 0); + } + setModel(model); + + this->updateBlendFunc(); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + // listen the event when app go to foreground + _backToForegroundlistener = EventListenerCustom::create(EVENT_COME_TO_FOREGROUND, CC_CALLBACK_1(Sprite3D::listenBackToForeground, this)); + Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_backToForegroundlistener, -1); +#endif + + return true; +} + +void Sprite3D::setModel(Mesh *model) +{ + if (model != nullptr && _model != model) + { + _model = model; + } +} + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +void Sprite3D::listenBackToForeground(EventCustom* event) +{ + buildProgram(_texture->getName() != 0); + if (_outLine && _outLineWidth > 0 && _outlineShader) { + _outlineShader->reset(); + _outlineShader->initWithByteArrays(outLineShader, blackFrag); + _outlineShader->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_POSITION, GLProgram::VERTEX_ATTRIB_POSITION); + _outlineShader->link(); + _outlineShader->updateUniforms(); + _attributesOutline.Position = _outlineShader->getAttribLocation("Position"); + _attributesOutline.Normal = _outlineShader->getAttribLocation("Normal"); + _uniformsOutline.NormalMatrix = _outlineShader->getUniformLocation("NormalMatrix"); + _uniformsOutline.OutlineWidth = _outlineShader->getUniformLocation("OutlineWidth"); + _uniformsOutline.OutlineColor = _outlineShader->getUniformLocation("OutLineColor"); + } +} +#endif + +bool Sprite3D::buildProgram(bool textured) +{ + if (!_mainShader) { + _mainShader = new GLProgram(); + } + else + { + _mainShader->reset(); + } + + // Create the GLSL program. + if (textured) { + _mainShader->initWithByteArrays(baseVertexShader, baseTexturedFrag); + } + else + _mainShader->initWithByteArrays(baseVertexShader, baseColoredFrag); + + //glUseProgram(_program); + + _mainShader->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_POSITION, GLProgram::VERTEX_ATTRIB_POSITION); + _mainShader->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_COLOR, GLProgram::VERTEX_ATTRIB_COLOR); + _mainShader->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_TEX_COORD, GLProgram::VERTEX_ATTRIB_TEX_COORDS); + + _mainShader->link(); + _mainShader->updateUniforms(); + + // Extract the handles to attributes and uniforms. + _attributes.Position = _mainShader->getAttribLocation("Position"); + _attributes.Normal = _mainShader->getAttribLocation("Normal"); + + _uniforms.DiffuseMaterial = _mainShader->getUniformLocation("DiffuseMaterial"); + if (textured) { + _attributes.TextureCoord = _mainShader->getAttribLocation("TextureCoord"); + _uniforms.Sampler = _mainShader->getUniformLocation("Sampler"); + } + else { + _attributes.TextureCoord = 0; + _uniforms.Sampler = 0; + } + + _uniforms.NormalMatrix = _mainShader->getUniformLocation("NormalMatrix"); + return true; +} + +void Sprite3D::draw(Renderer* renderer, const kmMat4 &transform, bool transformUpdated) +{ + _customCommand.init(_globalZOrder); + _customCommand.func = CC_CALLBACK_0(Sprite3D::onDraw, this, transform, transformUpdated); + Director::getInstance()->getRenderer()->addCommand(&_customCommand); +} + +void Sprite3D::onDraw(const kmMat4 &transform, bool transformUpdated) +{ + glEnable(GL_DEPTH_TEST); + glEnable(GL_CULL_FACE); + // ********** Base Draw ************* + + _mainShader->use(); + _mainShader->setUniformsForBuiltins(transform); + + GL::blendFunc( _blendFunc.src, _blendFunc.dst ); + kmGLLoadIdentity(); + + if (_texture->getName()) { + GL::bindTexture2D(_texture->getName()); + glUniform1i(_uniforms.Sampler, 0); + GL::enableVertexAttribs( GL::VERTEX_ATTRIB_FLAG_POS_COLOR_TEX ); + } + else { + GL::enableVertexAttribs( GL::VERTEX_ATTRIB_FLAG_POSITION ); + } + + // Set the diffuse color. + glUniform3f(_uniforms.DiffuseMaterial,1, 1, 1); + + // Initialize various state. + glEnableVertexAttribArray(_attributes.Position); + //glEnableVertexAttribArray(_attributes.Normal); + if (_texture->getName()) + glEnableVertexAttribArray(_attributes.TextureCoord); + + // Set the normal matrix. + // It's orthogonal, so its Inverse-Transpose is itself! + kmMat3 normals; + kmMat3AssignMat4(&normals, &_modelViewTransform); + glUniformMatrix3fv(_uniforms.NormalMatrix, 1, 0, &normals.mat[0]); + + GLuint verBuf = _model->getVertexBuffer(); + GLuint indexBuf = _model->getIndexBuffer(); + ssize_t indexCount = _model->getIndexCount(); + + // Draw the surface using VBOs + int stride = sizeof(vec3) + sizeof(vec3) + sizeof(vec2); + const GLvoid* normalOffset = (const GLvoid*) sizeof(vec3); + const GLvoid* texCoordOffset = (const GLvoid*) (2 * sizeof(vec3)); + GLint position = _attributes.Position; + //GLint normal = _attributes.Normal; + GLint texCoord = _attributes.TextureCoord; + + glBindBuffer(GL_ARRAY_BUFFER, verBuf); + glVertexAttribPointer(position, 3, GL_FLOAT, GL_FALSE, stride, 0); + //glVertexAttribPointer(normal, 3, GL_FLOAT, GL_FALSE, stride, normalOffset); + if (_texture->getName()) + glVertexAttribPointer(texCoord, 2, GL_FLOAT, GL_FALSE, stride, texCoordOffset); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexBuf); + glDrawElements(GL_TRIANGLES, indexCount, GL_UNSIGNED_SHORT, 0); + + glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + + if(_outLine) + { + // ******* Outline Draw ********** + glCullFace(GL_FRONT); + _outlineShader->use(); + _outlineShader->setUniformsForBuiltins(_modelViewTransform); + //GL::blendFunc( _blendFunc.src, _blendFunc.dst ); + kmGLLoadIdentity(); + GL::enableVertexAttribs( GL::VERTEX_ATTRIB_FLAG_POSITION ); + + // Initialize various state. + glEnableVertexAttribArray(_attributesOutline.Position); + glEnableVertexAttribArray(_attributesOutline.Normal); + + // Set the normal matrix. + // It's orthogonal, so its Inverse-Transpose is itself! + //kmMat3 normals; + kmMat3AssignMat4(&normals, &_modelViewTransform); + glUniformMatrix3fv(_uniformsOutline.NormalMatrix, 1, 0, &normals.mat[0]); + glUniform1f(_uniformsOutline.OutlineWidth, _outLineWidth); + Color4F fOutlineColor(_outlineColor); + glUniform3f(_uniformsOutline.OutlineColor,fOutlineColor.r,fOutlineColor.g,fOutlineColor.b); + // Draw the surface using VBOs + stride = sizeof(vec3) + sizeof(vec3) + sizeof(vec2); + normalOffset = (const GLvoid*) sizeof(vec3); + position = _attributesOutline.Position; + GLint normal = _attributesOutline.Normal; + + glBindBuffer(GL_ARRAY_BUFFER, verBuf); + glVertexAttribPointer(position, 3, GL_FLOAT, GL_FALSE, stride, 0); + glVertexAttribPointer(normal, 3, GL_FLOAT, GL_FALSE, stride, normalOffset); + + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexBuf); + glDrawElements(GL_TRIANGLES, indexCount, GL_UNSIGNED_SHORT, 0); + + glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + + CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, indexCount); + glCullFace(GL_BACK); + } + glDisable(GL_DEPTH_TEST); + CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, indexCount); + +} + +void Sprite3D::setTextureName(const std::string& textureName) +{ + auto cache = Director::getInstance()->getTextureCache(); + Texture2D *tex = cache->addImage(textureName); + if( tex ) { + this->setTexture(tex); + } +} + +void Sprite3D::removeTexture() +{ + if( _texture ) { + _texture->release(); + _texture = nullptr; + + this->updateBlendFunc(); + buildProgram(false); + } +} + +#pragma mark Sprite3D - CocosNodeTexture protocol + +void Sprite3D::updateBlendFunc() +{ + // it is possible to have an untextured sprite + if( !_texture || ! _texture->hasPremultipliedAlpha() ) { + _blendFunc.src = GL_SRC_ALPHA; + _blendFunc.dst = GL_ONE_MINUS_SRC_ALPHA; + } else { + _blendFunc.src = CC_BLEND_SRC; + _blendFunc.dst = CC_BLEND_DST; + } +} + +void Sprite3D::setTexture(Texture2D* texture) +{ + CCASSERT( texture , "setTexture expects a Texture2D. Invalid argument"); + + if( _texture != texture ) { + if(_texture) + _texture->release(); + + _texture = texture; + _texture->retain(); + + this->updateBlendFunc(); + buildProgram( _texture->getName() != 0); + } +} + +void Sprite3D::setOutline(float width, Color3B color) +{ + if(width > 0) + { + _outLine = true; + _outLineWidth = width; + _outlineColor = color; + if (!_outlineShader) { + _outlineShader = new GLProgram(); + } + _outlineShader->initWithByteArrays(outLineShader, blackFrag); + _outlineShader->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_POSITION, GLProgram::VERTEX_ATTRIB_POSITION); + + _outlineShader->link(); + _outlineShader->updateUniforms(); + _attributesOutline.Position = _outlineShader->getAttribLocation("Position"); + _attributesOutline.Normal = _outlineShader->getAttribLocation("Normal"); + _uniformsOutline.NormalMatrix = _outlineShader->getUniformLocation("NormalMatrix"); + _uniformsOutline.OutlineWidth = _outlineShader->getUniformLocation("OutlineWidth"); + _uniformsOutline.OutlineColor = _outlineShader->getUniformLocation("OutLineColor"); + } +} diff --git a/samples/EarthWarrior3D/Classes/3d/Sprite3D.h b/samples/EarthWarrior3D/Classes/3d/Sprite3D.h new file mode 100755 index 0000000..3fe8eb3 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/3d/Sprite3D.h @@ -0,0 +1,97 @@ +// +// SkyboxNode.h +// testar1 +// +// Created by Pasi Kettunen on 12.12.2012. +// +// + + +/* + * + * SkyboxNode is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * SkyboxNode is distributed WITHOUT ANY WARRANTY; See the + * GNU General Public License for more details. + * + * Note: The 'cocos2d for iPhone' license also applies if used in conjunction + * with the Cocos2D framework. + */ + +#ifndef __SPRITE3D_H_ +#define __SPRITE3D_H_ + +#include + +#include "cocos2d.h" + +#include "Mesh.h" + +struct UniformHandles +{ + GLuint NormalMatrix; + GLuint OutlineWidth; + GLuint OutlineColor; + GLint DiffuseMaterial; + GLint Sampler; +}; + +struct AttributeHandles +{ + GLint Position; + GLint Normal; + GLint TextureCoord; +}; + +class Sprite3D : public cocos2d::Node +{ +public: + static Sprite3D* create(const std::string &modelPath, const std::string &texturePath=""); + void setOutline(float width, cocos2d::Color3B color); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + void listenBackToForeground(cocos2d::EventCustom* event); +#endif + +protected: + Sprite3D(); + virtual ~Sprite3D(); + bool init(const std::string &modelPath, const std::string &texturePath); + + void setModel(Mesh *model); + bool buildProgram(bool textured); + void draw(cocos2d::Renderer* renderer, const kmMat4 &transform, bool transformUpdated); + void onDraw(const kmMat4 &transform, bool transformUpdated); + void setTexture(cocos2d::Texture2D* texture); + void updateBlendFunc(); + void setTextureName(const std::string& textureName); + void removeTexture(); + + // the current rotation offset + //float xRot, yRot, zRot; + Mesh *_model; + + cocos2d::BlendFunc _blendFunc; + cocos2d::Texture2D *_texture; + cocos2d::CustomCommand _customCommand; + + bool _outLine = false; + float _outLineWidth; + cocos2d::Color3B _outlineColor; + cocos2d::GLProgram *_outlineShader; + cocos2d::GLProgram *_mainShader; + + UniformHandles _uniforms; + UniformHandles _uniformsOutline; + AttributeHandles _attributes; + AttributeHandles _attributesOutline; + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + cocos2d::EventListenerCustom* _backToForegroundlistener; +#endif +}; + +#endif // __SPRITE3D_H_ diff --git a/samples/EarthWarrior3D/Classes/3d/Textured.es2.frag.h b/samples/EarthWarrior3D/Classes/3d/Textured.es2.frag.h new file mode 100755 index 0000000..08049f0 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/3d/Textured.es2.frag.h @@ -0,0 +1,17 @@ +static const char* baseTexturedFrag = STRINGIFY( + +#ifdef GL_ES +varying lowp vec4 DestinationColor; +varying mediump vec2 TextureCoordOut; +#else +varying vec4 DestinationColor; +varying vec2 TextureCoordOut; +#endif + +uniform sampler2D Sampler; + +void main(void) +{ + gl_FragColor = texture2D(Sampler, TextureCoordOut) * DestinationColor; +} +); \ No newline at end of file diff --git a/samples/EarthWarrior3D/Classes/3d/Textured.es2.vert.h b/samples/EarthWarrior3D/Classes/3d/Textured.es2.vert.h new file mode 100755 index 0000000..831141d --- /dev/null +++ b/samples/EarthWarrior3D/Classes/3d/Textured.es2.vert.h @@ -0,0 +1,36 @@ +static const char* baseVertexShader = STRINGIFY( + +attribute vec4 Position; +attribute vec3 Normal; +attribute vec2 TextureCoord; + +uniform vec3 DiffuseMaterial; +uniform mat3 NormalMatrix; + +varying vec4 DestinationColor; +varying vec2 TextureCoordOut; + +void main(void) +{ + DestinationColor = vec4(DiffuseMaterial, 1); + gl_Position = CC_PMatrix * CC_MVMatrix * Position; + TextureCoordOut = TextureCoord; +} +); + + +// pure black vert shader +static const char* outLineShader = STRINGIFY( + +attribute vec4 Position; +attribute vec3 Normal; +uniform float OutlineWidth; +uniform mat3 NormalMatrix; +void main(void) +{ + vec4 pos = Position; + vec3 normal = Normal; + pos.xyz += Normal * OutlineWidth; + gl_Position = CC_PMatrix * CC_MVMatrix * pos; +} +); diff --git a/samples/EarthWarrior3D/Classes/3d/Vector.h b/samples/EarthWarrior3D/Classes/3d/Vector.h new file mode 100755 index 0000000..c018691 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/3d/Vector.h @@ -0,0 +1,199 @@ +#pragma once +#include + +const float Pi = 4 * std::atan(1.0f); +const float TwoPi = 2 * Pi; + +template +struct Vector2 { + Vector2() {} + Vector2(T x, T y) : x(x), y(y) {} + T Dot(const Vector2& v) const + { + return x * v.x + y * v.y; + } + Vector2 operator+(const Vector2& v) const + { + return Vector2(x + v.x, y + v.y); + } + Vector2 operator-(const Vector2& v) const + { + return Vector2(x - v.x, y - v.y); + } + Vector2 operator/(float s) const + { + return Vector2(x / s, y / s); + } + Vector2 operator*(float s) const + { + return Vector2(x * s, y * s); + } + void Normalize() + { + float s = 1.0f / Length(); + x *= s; + y *= s; + } + Vector2 Normalized() const + { + Vector2 v = *this; + v.Normalize(); + return v; + } + T LengthSquared() const + { + return x * x + y * y; + } + T Length() const + { + return sqrt(LengthSquared()); + } + operator Vector2() const + { + return Vector2(x, y); + } + bool operator==(const Vector2& v) const + { + return x == v.x && y == v.y; + } + Vector2 Lerp(float t, const Vector2& v) const + { + return Vector2(x * (1 - t) + v.x * t, + y * (1 - t) + v.y * t); + } + template + P* Write(P* pData) + { + Vector2* pVector = (Vector2*) pData; + *pVector++ = *this; + return (P*) pVector; + } + T x; + T y; +}; + +template +struct Vector3 { + Vector3() {} + Vector3(T x, T y, T z) : x(x), y(y), z(z) {} + void Normalize() + { + float s = 1.0f / std::sqrt(x * x + y * y + z * z); + x *= s; + y *= s; + z *= s; + } + Vector3 Normalized() const + { + Vector3 v = *this; + v.Normalize(); + return v; + } + Vector3 Cross(const Vector3& v) const + { + return Vector3(y * v.z - z * v.y, + z * v.x - x * v.z, + x * v.y - y * v.x); + } + T Dot(const Vector3& v) const + { + return x * v.x + y * v.y + z * v.z; + } + Vector3 operator+(const Vector3& v) const + { + return Vector3(x + v.x, y + v.y, z + v.z); + } + void operator+=(const Vector3& v) + { + x += v.x; + y += v.y; + z += v.z; + } + void operator-=(const Vector3& v) + { + x -= v.x; + y -= v.y; + z -= v.z; + } + void operator/=(T s) + { + x /= s; + y /= s; + z /= s; + } + Vector3 operator-(const Vector3& v) const + { + return Vector3(x - v.x, y - v.y, z - v.z); + } + Vector3 operator-() const + { + return Vector3(-x, -y, -z); + } + Vector3 operator*(T s) const + { + return Vector3(x * s, y * s, z * s); + } + Vector3 operator/(T s) const + { + return Vector3(x / s, y / s, z / s); + } + bool operator==(const Vector3& v) const + { + return x == v.x && y == v.y && z == v.z; + } + Vector3 Lerp(float t, const Vector3& v) const + { + return Vector3(x * (1 - t) + v.x * t, + y * (1 - t) + v.y * t, + z * (1 - t) + v.z * t); + } + const T* Pointer() const + { + return &x; + } + template + P* Write(P* pData) + { + Vector3* pVector = (Vector3*) pData; + *pVector++ = *this; + return (P*) pVector; + } + T x; + T y; + T z; +}; + +template +struct Vector4 { + Vector4() {} + Vector4(T x, T y, T z, T w) : x(x), y(y), z(z), w(w) {} + T Dot(const Vector4& v) const + { + return x * v.x + y * v.y + z * v.z + w * v.w; + } + Vector4 Lerp(float t, const Vector4& v) const + { + return Vector4(x * (1 - t) + v.x * t, + y * (1 - t) + v.y * t, + z * (1 - t) + v.z * t, + w * (1 - t) + v.w * t); + } + const T* Pointer() const + { + return &x; + } + T x; + T y; + T z; + T w; +}; + +typedef Vector2 bvec2; + +typedef Vector2 ivec2; +typedef Vector3 ivec3; +typedef Vector4 ivec4; + +typedef Vector2 vec2; +typedef Vector3 vec3; +typedef Vector4 vec4; diff --git a/samples/EarthWarrior3D/Classes/AirCraft.cpp b/samples/EarthWarrior3D/Classes/AirCraft.cpp new file mode 100755 index 0000000..2885352 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/AirCraft.cpp @@ -0,0 +1,58 @@ +// +// AirCraft.cpp +// Moon3d +// +// Created by Hao Wu on 2/27/14. +// +// + +#include "AirCraft.h" +#include "SimpleAudioEngine.h" +#include "Effects.h" +#include "HelloWorldScene.h" + +bool AirCraft::hurt(float damage) +{ + _HP -= damage; + if(_HP <= 0) + { + die(); + return true; + } + return false; +} +void AirCraft::die() +{ + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("explodeEffect.mp3"); + EffectManager::createBigExplosion(getPosition()); + auto helloworld = (HelloWorld*)Director::getInstance()->getRunningScene()->getChildByTag(100); + int score = helloworld->getScore(); + helloworld->setScore(score+=_score); + std::stringstream ss; + std::string str; + ss<>str; + const char *p = str.c_str(); + helloworld->getScoreLabel()->setString(p); + _alive = false; + auto scale = ScaleTo::create(0.1, 1.2); + auto scaleBack = ScaleTo::create(0.1, 1); + auto label =helloworld->getScoreLabel(); + label->runAction(Sequence::create(scale, scaleBack,NULL)); + //removeFromParent(); +} + +void AirCraft::move(float y, float dt) +{ + //setPosition(getPosition().x+getPosition().y+y); + forward(y); +} + +void AirCraft::reset() +{ + _alive = true; +} +bool AirCraft::alive() +{ + return _alive; +} \ No newline at end of file diff --git a/samples/EarthWarrior3D/Classes/AirCraft.h b/samples/EarthWarrior3D/Classes/AirCraft.h new file mode 100755 index 0000000..be9dd74 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/AirCraft.h @@ -0,0 +1,32 @@ +// +// AirCraft.h +// Moon3d +// +// Created by Hao Wu on 2/27/14. +// +// + +#ifndef __Moon3d__AirCraft__ +#define __Moon3d__AirCraft__ + +#include "cocos2d.h" +#include "GameEntity.h" +USING_NS_CC; + +class AirCraft : public GameEntity +{ +public: + virtual bool hurt(float damage); + virtual void die(); + void shoot(); + //CC_SYNTHESIZE(float, _HP, HP); + bool alive(); + virtual void move(float y, float dt); + virtual void reset(); +protected: + bool _alive = true; + float _HP; + int _score; +}; + +#endif /* defined(__Moon3d__AirCraft__) */ diff --git a/samples/EarthWarrior3D/Classes/AppDelegate.cpp b/samples/EarthWarrior3D/Classes/AppDelegate.cpp new file mode 100755 index 0000000..430f9af --- /dev/null +++ b/samples/EarthWarrior3D/Classes/AppDelegate.cpp @@ -0,0 +1,69 @@ +#include "AppDelegate.h" +#include "MainMenuScene.h" +#include "HelloWorldScene.h" +#include "LoadingScene.h" +#include "SimpleAudioEngine.h" +USING_NS_CC; + +AppDelegate::AppDelegate() { + +} + +AppDelegate::~AppDelegate() +{ +} + +bool AppDelegate::applicationDidFinishLaunching() { + // initialize director + auto director = Director::getInstance(); + auto glview = director->getOpenGLView(); + //glview->setDesignResolutionSize(480,800,ResolutionPolicy::FIXED_HEIGHT); + if(!glview) { + int height, width; + height = 800; + width = height*(640.0/960.0); + + glview = GLView::createWithRect("EarthWarrior3D", Rect(0, 0, width, height)); + + director->setOpenGLView(glview); + } + glview->setDesignResolutionSize(640, 960, ResolutionPolicy::SHOW_ALL); + + // turn on display FPS + director->setDisplayStats(false); + + // set FPS. the default value is 1.0/60 if you don't call this + director->setAnimationInterval(1.0 / 60); + + // create a scene. it's an autorelease object + //auto scene = LoadingScene::createScene(); + auto scene = MainMenuScene::createScene(); + //auto scene = HelloWorld::createScene(); + // run + director->runWithScene(scene); + glEnable(GL_CULL_FACE); + return true; +} + +// This function will be called when the app is inactive. When comes a phone call,it's be invoked too +void AppDelegate::applicationDidEnterBackground() { + SimpleAudioEngine::getInstance()->pauseAllEffects(); + SimpleAudioEngine::getInstance()->pauseBackgroundMusic(); + Director::getInstance()->stopAnimation(); + + + // if you use SimpleAudioEngine, it must be pause + // SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic(); +} + +// this function will be called when the app is active again +void AppDelegate::applicationWillEnterForeground() { + SimpleAudioEngine::getInstance()->resumeAllEffects(); + SimpleAudioEngine::getInstance()->resumeBackgroundMusic(); + + Director::getInstance()->startAnimation(); + + // if you use SimpleAudioEngine, it must resume here + // SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic(); +} + diff --git a/samples/EarthWarrior3D/Classes/AppDelegate.h b/samples/EarthWarrior3D/Classes/AppDelegate.h new file mode 100755 index 0000000..0aa6bba --- /dev/null +++ b/samples/EarthWarrior3D/Classes/AppDelegate.h @@ -0,0 +1,39 @@ +#ifndef _APP_DELEGATE_H_ +#define _APP_DELEGATE_H_ + +#include "cocos2d.h" + +/** +@brief The cocos2d Application. + +The reason for implement as private inheritance is to hide some interface call by Director. +*/ +class AppDelegate : private cocos2d::Application +{ +public: + AppDelegate(); + virtual ~AppDelegate(); + + /** + @brief Implement Director and Scene init code here. + @return true Initialize success, app continue. + @return false Initialize failed, app terminate. + */ + virtual bool applicationDidFinishLaunching(); + + /** + @brief The function be called when the application enter background + @param the pointer of the application + */ + virtual void applicationDidEnterBackground(); + + /** + @brief The function be called when the application enter foreground + @param the pointer of the application + */ + virtual void applicationWillEnterForeground(); + +}; + +#endif // _APP_DELEGATE_H_ + diff --git a/samples/EarthWarrior3D/Classes/Bullets.cpp b/samples/EarthWarrior3D/Classes/Bullets.cpp new file mode 100755 index 0000000..f82c852 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/Bullets.cpp @@ -0,0 +1,162 @@ +// +// Bullet.cpp +// Moon3d +// +// Created by Hao Wu on 3/4/14. +// +// + +#include "Bullets.h" +#include "3d/Sprite3D.h" +#include "consts.h" +#include "GameLayer.h" +#include "GameEntity.h" +#include "GameControllers.h" +#include "Enemies.h" +#include "ParticleManager.h" + +bool Bullet::init() +{ + _Model = Sprite::create("bullets.png", Rect(5,8,24,32)); + //_Model = ParticleSystemQuad::create("missileFlare.plist"); + if(_Model) + { + addChild(_Model); + _radius=10; + _type = kEnemyBullet; + _owner = kEnemy; + _damage = 10; + + auto part_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonFlare.png"); + ValueMap vm=ParticleManager::getInstance()->GetPlistData("missileFlare"); + ParticleSystemQuad *p = ParticleSystemQuad::create(vm,part_frame); + //p->setEndColor(Color4F(1,0,0,1)); + //p->setStartColor(Color4F(1,0,0,1)); + p->setPositionType(tPositionType::GROUPED); + p->setScale(2.5); + p->setTotalParticles(2); + _Model->addChild(p,-1); + p->setPosition(Point(_Model->getContentSize()/2)); + setScale(1.5); + //static_cast(_Model)->setFlippedY(true); + return true; + } + return false; +} +bool PlayerBullet::init() +{ + _Model = Sprite::create("bullets.png", Rect(54, 57, 36, 67)); + if(_Model) + { + addChild(_Model); + _radius=10; + _type = kPlayerBullet; + _owner = kPlayer; + _damage = 2; + return true; + } + return false; +} + +void Bullet::setVector(Point vec) +{ + _vector = vec; +} + +Point Bullet::getVector() +{ + return _vector; +} +void Bullet::reset() +{ + setRotation(0); +} + +bool Missile::init() +{ + _Model = Sprite3D::create("daodanv001.obj", "daodan_32.png"); + if(_Model) + { + addChild(_Model); + _radius=10; + _type = kPlayerMissiles; + _owner = kPlayer; + _Model->setScale(3); + _Model->setRotation3D(Vertex3F(90,0,0)); + _damage = 20; + static_cast(_Model)->setOutline(0.3, Color3B(0,0,0)); + + _left = (CCRANDOM_MINUS1_1()>0); + if(_left) + _yRotSpeed *= -1; + + + // missile effects + + auto part2_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonSmoke.png"); + ValueMap vm2=ParticleManager::getInstance()->GetPlistData("emission"); + auto part2 = ParticleSystemQuad::create(vm2,part2_frame); + addChild(part2,1); + part2->setPosition(0,-34); + part2->setPositionType(tPositionType::GROUPED); + //part2->setScale(2.5); + + + auto part1_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonFlare.png"); + ValueMap vm1=ParticleManager::getInstance()->GetPlistData("missileFlare"); + auto part1 = ParticleSystemQuad::create(vm1,part1_frame); + addChild(part1,2); + part1->setPosition(0,-30); + part1->setPositionType(tPositionType::GROUPED); + part1->setScale(2.5); + return true; + } + return false; +} + +void Missile::update(float dt) +{ + if(!_target) + { + //setTarget(static_cast(getParent())->_testDummy);//very hacky + setTarget(static_cast(EnemyController::enemies.getRandomObject())); + } + if(_target){ + //turn towards the target + float angle = -CC_RADIANS_TO_DEGREES((getPosition() - _target->getPosition()).getAngle()); + if(fabsf(angle-90)>70) + { + //too much angle to track, get another target instead + _target = nullptr; + } + float curRot = getRotation(); + float angleDif = std::min(std::max((angle-90) - curRot, -_turnRate*dt), _turnRate*dt); + + float f = curRot + angleDif; + setRotation(f); + setPosition(getPosition()+Point(sinf(CC_DEGREES_TO_RADIANS(f))*_velocity,cosf(CC_DEGREES_TO_RADIANS(f))*_velocity) + _vector*dt); + _vector = _vector * (1-dt); + + } + else{ + float f = getRotation(); + setRotation(f); + setPosition(getPosition()+Point(sinf(CC_DEGREES_TO_RADIANS(f))*_velocity,cosf(CC_DEGREES_TO_RADIANS(f))*_velocity) + _vector*dt); + _vector = _vector * (1-dt*0.5); + } + // missiles need to rotate + _yRotation += _yRotSpeed*dt; + _Model->setRotation3D(Vertex3F(90,_yRotation, 0)); + + + + + _velocity += _accel*dt; +} + +void Missile::reset() +{ + setTarget(nullptr); + _velocity = 0; +} + diff --git a/samples/EarthWarrior3D/Classes/Bullets.h b/samples/EarthWarrior3D/Classes/Bullets.h new file mode 100755 index 0000000..a3a3ce0 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/Bullets.h @@ -0,0 +1,56 @@ +// +// Bullet.h +// Moon3d +// +// Created by Hao Wu on 3/4/14. +// +// + +#ifndef __Moon3d__Bullet__ +#define __Moon3d__Bullet__ + +#include "cocos2d.h" +#include "GameEntity.h" + + + +class Bullet : public GameEntity +{ +public: + CREATE_FUNC(Bullet); + bool init(); + void setVector(Point vec); + Point getVector(); + virtual void reset(); + CC_SYNTHESIZE(float, _damage, Damage); + CC_SYNTHESIZE(int, _owner, Owner) +protected: + Point _vector; +}; + +class PlayerBullet : public Bullet +{ +public: + CREATE_FUNC(PlayerBullet); + bool init(); +}; + +class Missile : public Bullet +{ +public: + CREATE_FUNC(Missile); + bool init(); + void update(float dt); + CC_SYNTHESIZE(GameEntity*, _target, Target) + virtual void reset(); +protected: + float _accel = 15; + float _turnRate = 180; + //float _maxSpeed = 100; + float _yRotSpeed = 1400; + float _yRotation = 0; + bool _left = false; + float _velocity = 0; +}; + +#endif /* defined(__Moon3d__Bullet__) */ diff --git a/samples/EarthWarrior3D/Classes/Effects.cpp b/samples/EarthWarrior3D/Classes/Effects.cpp new file mode 100755 index 0000000..d2d15e1 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/Effects.cpp @@ -0,0 +1,66 @@ +// +// Effects.cpp +// Moon3d +// +// Created by Hao Wu on 3/6/14. +// +// + +#include "Effects.h" + +Node* EffectManager::_effectLayer = nullptr; +Vector EffectManager::_smallExplPool; +Vector EffectManager::_bigExplPool; + +void EffectManager::createExplosion(Point pos) +{ + if(!_effectLayer) + { + return; + } + + SmallExplosion* explosion = nullptr; + + if (!_smallExplPool.empty()) + { + explosion = _smallExplPool.back(); + _smallExplPool.popBack(); + } + else + { + explosion = SmallExplosion::create(); + explosion->retain(); + } + + explosion->createExplosion(_effectLayer, pos); + +} + +void EffectManager::createBigExplosion(Point pos) +{ + if(!_effectLayer) + { + return; + } + + BigExplosion* explosion = nullptr; + + if (!_bigExplPool.empty()) + { + explosion = _bigExplPool.back(); + _bigExplPool.popBack(); + } + else + { + explosion = BigExplosion::create(); + explosion->retain(); + } + + explosion->createExplosion(_effectLayer, pos); + +} + +void EffectManager::setLayer(Node *layer) +{ + _effectLayer = layer; +} \ No newline at end of file diff --git a/samples/EarthWarrior3D/Classes/Effects.h b/samples/EarthWarrior3D/Classes/Effects.h new file mode 100755 index 0000000..bc78886 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/Effects.h @@ -0,0 +1,30 @@ +// +// Effects.h +// Moon3d +// +// Created by Hao Wu on 3/6/14. +// +// + +#ifndef __Moon3d__Effects__ +#define __Moon3d__Effects__ + +#include "cocos2d.h" +#include "Explosion.h" +USING_NS_CC; + +class EffectManager +{ +public: + static void createExplosion(Point pos); + static void createBigExplosion(Point pos); + static void setLayer(Node* layer); + static Vector _smallExplPool; + static Vector _bigExplPool; +protected: + static Node* _effectLayer; + +}; + + +#endif /* defined(__Moon3d__Effects__) */ diff --git a/samples/EarthWarrior3D/Classes/Enemies.cpp b/samples/EarthWarrior3D/Classes/Enemies.cpp new file mode 100755 index 0000000..748bccb --- /dev/null +++ b/samples/EarthWarrior3D/Classes/Enemies.cpp @@ -0,0 +1,539 @@ +// +// Fodder.cpp +// Moon3d +// +// Created by Hao Wu on 2/27/14. +// +// + +#include "Enemies.h" +#include "3d/Sprite3D.h" +#include "GameControllers.h" +#include "Bullets.h" +#include "consts.h" +#include "SimpleAudioEngine.h" +#include "Effects.h" +#include "HelloWorldScene.h" +#include "GameLayer.h" + +bool Fodder::init() +{ + _score = 10; + _Model = Sprite3D::create("dijiyuanv001.obj", "dijiyuanv001.png"); + if(_Model) + { + _Model->setScale(6); + addChild(_Model); + _Model->setRotation3D(Vertex3F(90,0,0)); + static_cast(_Model)->setOutline(0.2, Color3B(0,0,0)); + _type = kEnemyFodder; + _HP = 10; + _radius = 30; + return true; + } + return false; +} +void Fodder::reset() +{ + AirCraft::reset(); + _target = nullptr; + _HP = 10; +} +void Fodder::setTurnRate(float turn) +{ + setMoveMode(moveMode::kTurn); + setRotation3D(Vertex3F(fabsf(turn)*0.15, turn, 0)); + _turn = turn; +} +float Fodder::getTurnRate() +{ + return _turn; +} +void Fodder::move(float y, float dt) +{ +switch(_moveMode) + { + case moveMode::kTurn: + forward(y, getTurnRate()*dt); + break; + default: + //setPosition(getPosition()+pos); + forward(y); + } + +} +void Fodder::shoot(float dt) +{ + if(!GameLayer::isDie && _target->alive()) + { + //get angle to player; + float angle = (getPosition()-_target->getPosition()).getAngle(); + auto bullet =BulletController::spawnBullet(kEnemyBullet, getPosition(), Point(cosf(angle)*-500, sinf(angle)*-500)); + //auto bullet =BulletController::spawnBullet(kEnemyBullet, getPosition(), Point(0,-500)); + bullet->setRotation(-CC_RADIANS_TO_DEGREES(angle)-90); + //log("aaaaaaa"); + } + else{ + //log("player is dead,hahahaha"); + } +} + + +bool FodderLeader::init() +{ + _score = 20; + _Model = Sprite3D::create("dijiyuanv001.obj", "dijiyuanv001.png"); + if(_Model) + { + _Model->setScale(8); + addChild(_Model); + _Model->setRotation3D(Vertex3F(90,0,0)); + static_cast(_Model)->setOutline(0.2, Color3B(255,0,0)); + _type = kEnemyFodderL; + _HP = 20; + _radius = 35; + return true; + } + return false; +} +void FodderLeader::reset() +{ + AirCraft::reset(); + _HP = 25; +} + + +bool BigDude::init() +{ + _score = 20; + _Model = Sprite3D::create("diji1_v002.obj", "diji02_v002_128.png"); + if(_Model) + { + _Model->setScale(8); + addChild(_Model); + _Model->setRotation3D(Vertex3F(90,0,0)); + static_cast(_Model)->setOutline(0.2, Color3B(0,0,0)); + _type = kEnemyBigDude; + _HP = 30; + _radius = 40; + + + return true; + } + return false; +} + +void BigDude::reset() +{ + AirCraft::reset(); + _HP = 30; + //_targetPos = nullptr; +} + +void BigDude::showFinished() +{ + //remove from show Vector, add to the enemy Vector + EnemyController::enemies.pushBack(this); + EnemyController::showCaseEnemies.eraseObject(this); + schedule(schedule_selector(BigDude::shoot),CCRANDOM_0_1()*2+1, 90, 0); +} +void BigDude::shoot(float dt) +{ + if(GameLayer::isDie) + { + unschedule(schedule_selector(BigDude::shoot)); + return; + } + //Point bulletVec = Point(getRotation()) + + Point offset1 = getPosition(); + Point offset2 = offset1; + float angle = CC_DEGREES_TO_RADIANS(-getRotation()+90); + float offsetRad = CC_DEGREES_TO_RADIANS(45); + offset1.x += cosf(angle+offsetRad)*-50; + offset1.y += sinf(angle+offsetRad)*-50; + offset2.x += cosf(angle-offsetRad)*-50; + offset2.y += sinf(angle-offsetRad)*-50; + //this->showMuzzle(); + auto bullet =BulletController::spawnBullet(kEnemyBullet, offset1, Point(cosf(angle)*-500, sinf(angle)*-500)); + bullet->setRotation(-CC_RADIANS_TO_DEGREES(angle)-90); + bullet =BulletController::spawnBullet(kEnemyBullet, offset2, Point(cosf(angle)*-500, sinf(angle)*-500)); + bullet->setRotation(-CC_RADIANS_TO_DEGREES(angle)-90); + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("boom.mp3"); +} + +void BigDude::update(float dt, Node* player) +{ + //find angle difference + float angleRad = (getPosition()-player->getPosition()).getAngle(); + float angleDeg = -CC_RADIANS_TO_DEGREES(angleRad)+180; + float curRot = getRotation(); + float angleDif = std::min(std::max((angleDeg-90) - curRot, -_turnRate*dt), _turnRate*dt); + + float f = curRot + angleDif; + setRotation(f); +} + +void BigDude::showMuzzle(){ + muzzle1 = Sprite::create("muzzle.png"); + muzzle2 = Sprite::create("muzzle.png"); + muzzle1->setScale(0.4); + muzzle2->setScale(0.4); + + Point offset1 = Point::ZERO; + Point offset2 = offset1; + float angle = 90; + float offsetRad = CC_DEGREES_TO_RADIANS(45); + offset1.x += cosf(offsetRad+angle)*-50; + offset1.y += sinf(offsetRad+angle)*-50; + offset2.x += cosf(-offsetRad+angle)*-50; + offset2.y += sinf(-offsetRad+angle)*-50; + + muzzle1->setPosition(offset1); + muzzle2->setPosition(offset2); + muzzle1->setRotation(-35.0f); + muzzle2->setRotation(-35.0f); + this->addChild(muzzle1); + this->addChild(muzzle2); + this->scheduleOnce(schedule_selector(BigDude::dismissMuzzle), 0.1); +} + +void BigDude::dismissMuzzle(float dt){ + muzzle1->removeFromParent(); + muzzle2->removeFromParent(); +} + +void BigDude::die(){ + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("boom2.mp3"); + this->_alive = false; + EnemyController::enemies.eraseObject(this); + EnemyController::showCaseEnemies.pushBack(this); + EffectManager::createExplosion(getPosition()); + Point nowPoint = this->getPosition(); + log("now X: %f Y:%f \n",nowPoint.x,nowPoint.y); + Point targetPos = Point(nowPoint.x,nowPoint.y-200); + log("now X: %f Y:%f \n",targetPos.x,targetPos.y); + unscheduleAllSelectors(); + this->runAction( + Sequence::create( + Spawn::create( + EaseSineOut::create(MoveTo::create(2, targetPos)), + EaseSineOut::create(ScaleTo::create(2,0.3)),//TODO: replace with move 3d when possible + //EaseBackOut::create(RotateBy::create(2,Vertex3F(CC_RADIANS_TO_DEGREES((nowPoint-targetPos).getAngle()),CC_RADIANS_TO_DEGREES((nowPoint-targetPos).getAngle())+45,-CC_RADIANS_TO_DEGREES((nowPoint-targetPos).getAngle())+90))), + RotateBy::create(2, Vertex3F(360+CCRANDOM_0_1()*600, 360+CCRANDOM_0_1()*600, 360+CCRANDOM_0_1()*600)), + nullptr + ), + CallFunc::create(this,callfunc_selector(BigDude::fall)), + nullptr + )); + + +} + +void BigDude::fall(){ + + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("explodeEffect.mp3"); + EffectManager::createBigExplosion(getPosition()); + auto helloworld = (HelloWorld*)Director::getInstance()->getRunningScene()->getChildByTag(100); + int score = helloworld->getScore(); + helloworld->setScore(score+=_score); + std::stringstream ss; + std::string str; + ss<>str; + const char *p = str.c_str(); + helloworld->getScoreLabel()->setString(p); + _alive = false; + auto scale = ScaleTo::create(0.1, 1.2); + auto scaleBack = ScaleTo::create(0.1, 1); + auto label = helloworld->getScoreLabel(); + label->runAction(Sequence::create(scale, scaleBack,NULL)); + this->removeFromParentAndCleanup(false); + EnemyController::_bigDudePool.pushBack(this); + EnemyController::showCaseEnemies.eraseObject(this); + reset(); +} + +bool Boss::init(){ + _score = 666; + _Model = Sprite3D::create("boss.obj", "boss.png"); + //auto cannon2 = Sprite3D::create("bossCannon.obj", "boos.png"); + if(_Model) + { + + _Model->setScale(28); + addChild(_Model); + _Model->setRotation3D(Vertex3F(90,0,0)); + static_cast(_Model)->setOutline(0.1, Color3B(0,0,0)); + _type = kEnemyBoss; + _HP = 5000; + _radius = 150; + auto cannon1 = Sprite3D::create("bossCannon.obj", "boss.png"); + _Cannon1 = Node::create(); + addChild(_Cannon1); + _Cannon1->addChild(cannon1); + cannon1->setScale(28); + cannon1->setRotation3D(Vertex3F(90,0,0)); + _Cannon1->setPosition3D(Vertex3F(40,-100, 10)); + cannon1->setOutline(0.1, Color3B(0,0,0)); + + auto cannon2 = Sprite3D::create("bossCannon.obj", "boss.png"); + _Cannon2 = Node::create(); + addChild(_Cannon2); + _Cannon2->addChild(cannon2); + cannon2->setScale(28); + cannon2->setRotation3D(Vertex3F(90,0,0)); + _Cannon2->setPosition3D(Vertex3F(-40,-100, 10)); + cannon2->setOutline(0.1, Color3B(0,0,0)); + //addChild(_Cannon2); + //_Cannon2->setPosition(-20,-200); + + _Cannon1->setRotation(-45); + _Cannon2->setRotation(45); + + enterTheBattle(); + return true; + } + return false; +} +void Boss::enterTheBattle() +{ + setRotation3D(Vertex3F(100,0,0)); + setScale(0.2); + runAction( + Sequence::create( + Spawn::create( + EaseSineOut::create(MoveTo::create(4, Point(0,300))), + EaseSineOut::create(ScaleTo::create(4,1)),//TODO: replace with move 3d when possible + EaseBackOut::create(RotateBy::create(4+0.5,Vertex3F(-100,0,0))), + nullptr + ), CallFunc::create(this, callfunc_selector(Boss::startShooting)), + CallFunc::create(this, callfunc_selector(Boss::_turns)), + nullptr + )); +} +void Boss::_turns() +{ + runAction + ( + Sequence::create + ( + EaseSineInOut::create(MoveBy::create(2, Point(200,0))), + EaseSineInOut::create(MoveBy::create(4, Point(-400,0))), + EaseSineInOut::create(MoveBy::create(2, Point(200,0))), + nullptr) + ); + + runAction( + Sequence::create( + EaseQuadraticActionInOut::create(RotateBy::create(1,-20)), + EaseQuadraticActionInOut::create(RotateBy::create(2,40)), + DelayTime::create(2), + EaseQuadraticActionInOut::create(RotateBy::create(2,-40)), + EaseQuadraticActionInOut::create(RotateBy::create(1,20)), + DelayTime::create(2), + CallFunc::create(this, Boss::_next()), + nullptr + ) + ); +} +cocos2d::SEL_CallFunc Boss::_next() +{ + int random = CCRANDOM_0_1()*2; + cocos2d::SEL_CallFunc ret; + switch(random) + { + case 0: + ret = callfunc_selector(Boss::_turns); + break; + case 1: + ret = callfunc_selector(Boss::_dash); + break; + default: + ret = callfunc_selector(Boss::_dash); + break; + } + return ret; +} +void Boss::_dash() +{ + int neg = (CCRANDOM_0_1()>0.5)? -1: 1; + + auto array = PointArray::create(6); + + array->addControlPoint(Point(0,0)); + array->addControlPoint(Point(80*neg,-300)); + array->addControlPoint(Point(500*neg,-900)); + array->addControlPoint(Point(700*neg,-600)); + array->addControlPoint(Point(500*neg,400)); + array->addControlPoint(Point(0,0)); + + auto action = CardinalSplineBy::create(5.5, array,0); + runAction(Sequence::create( + DelayTime::create(0.5), + EaseSineOut::create(action) + ,nullptr) + ); + runAction( + Sequence::create( + EaseSineInOut::create(RotateBy::create(0.5, Vertex3F(0,30*neg,0))), + RotateBy::create(2.5, Vertex3F(-30,45*neg,-90*neg)), + RotateBy::create(1, Vertex3F(0,-35*neg,-200*neg)), + EaseSineInOut::create(RotateBy::create(1.5, Vertex3F(30,-40*neg,-70*neg))), + CallFunc::create(this, Boss::_next()), + nullptr) + ); +} +void Boss::startShooting() +{ + log("startShooting"); + schedule(schedule_selector(Boss::shoot),0.15, 6, 0); + +} +void Boss::startShooting(float dt) +{ + if(GameLayer::isDie) + { + unschedule(schedule_selector(Boss::startShooting)); + return; + } + log("startShooting fd"); + startShooting(); + +} +void Boss::createRandomExplosion() +{ + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("explodeEffect.mp3"); + EffectManager::createBigExplosion(getPosition()+Point(CCRANDOM_MINUS1_1()*200, CCRANDOM_MINUS1_1()*200)); +} +void Boss::dying() +{ + _alive = false; + EnemyController::showCaseEnemies.pushBack(this); + EnemyController::enemies.eraseObject(this); +} +void Boss::dead(){ + auto helloworld = (HelloWorld*)Director::getInstance()->getRunningScene()->getChildByTag(100); + int score = helloworld->getScore(); + helloworld->setScore(score+=_score); + std::stringstream ss; + std::string str; + ss<>str; + const char *p = str.c_str(); + helloworld->getScoreLabel()->setString(p); + auto scale = ScaleTo::create(0.1, 1.2); + auto scaleBack = ScaleTo::create(0.1, 1); + auto label =helloworld->getScoreLabel(); + label->runAction(Sequence::create(scale, scaleBack,NULL)); + EnemyController::showCaseEnemies.eraseObject(this); + removeFromParent(); + CocosDenshion::SimpleAudioEngine::getInstance()->stopBackgroundMusic(); + NotificationCenter::getInstance()->postNotification("ShowGameOver",NULL); + scheduleOnce(schedule_selector(Boss::_endGame), 1.5); +} +void Boss::_endGame(float dt) +{ + NotificationCenter::getInstance()->postNotification("ShowGameOver",NULL); +} +void Boss::die(){ + //sequence to 10 random explosion + stopAllActions(); + Vector explosions; + for(int i = 0; i < 22; i++) + { + auto expl = CallFunc::create(this, callfunc_selector(Boss::createRandomExplosion)); + auto delay = DelayTime::create(i*0.15); + auto seq = Sequence::create(delay, expl, nullptr); + explosions.pushBack(seq); + } + auto giantExpl = Spawn::create(explosions); + Vector explosions2; + for(int i = 0; i < 15; i++) + { + auto expl = CallFunc::create(this, callfunc_selector(Boss::createRandomExplosion)); + explosions2.pushBack(expl); + } + auto giantExpl2 = Spawn::create(explosions2); + auto callDead = CallFunc::create(this, callfunc_selector(Boss::dead)); + auto final = Sequence::create(giantExpl, giantExpl2, callDead,nullptr); + runAction(final); + dying(); + +} + +Point Boss::_getCannon1Position() +{ + Point offset = getPosition(); + float angle = CC_DEGREES_TO_RADIANS(-getRotation()+90); + float offsetRad = CC_DEGREES_TO_RADIANS(28); + offset.x += cosf(angle+offsetRad)*-100; + offset.y += sinf(angle+offsetRad)*-100; + return offset; +} +Point Boss::_getCannon2Position() +{ + Point offset = getPosition(); + float angle = CC_DEGREES_TO_RADIANS(-getRotation()+90); + float offsetRad = CC_DEGREES_TO_RADIANS(28); + offset.x += cosf(angle-offsetRad)*-100; + offset.y += sinf(angle-offsetRad)*-100; + return offset; +} +Point Boss::_getCannon1Vector() +{ + float angle = CC_DEGREES_TO_RADIANS(-_Cannon1->getRotation()+90-getRotation()); + return Point(cosf(angle)*-500, sinf(angle)*-500); +} +Point Boss::_getCannon2Vector() +{ + float angle = CC_DEGREES_TO_RADIANS(-_Cannon2->getRotation()+90-getRotation()); + return Point(cosf(angle)*-500, sinf(angle)*-500); +} + +void Boss::showMuzzle(){ + muzzle1 = Sprite::create("muzzle.png"); + muzzle2 = Sprite::create("muzzle.png"); + muzzle1->setScale(0.4); + muzzle2->setScale(0.4); + muzzle1->setPosition(3,-30); + muzzle2->setPosition(3,-30); + muzzle1->setRotation(-35.0f); + muzzle2->setRotation(-35.0f); + _Cannon1->addChild(muzzle1); + _Cannon2->addChild(muzzle2); + this->scheduleOnce(schedule_selector(Boss::dismissMuzzle), 0.1); +} + +void Boss::dismissMuzzle(float dt){ + muzzle1->removeFromParent(); + muzzle2->removeFromParent(); +} + +void Boss::shoot(float dt) +{ + if (GameLayer::isDie) { + return; + } + auto bullet =BulletController::spawnBullet(kEnemyBullet, _getCannon1Position(), _getCannon1Vector()); + + showMuzzle(); + + bullet->setRotation(_Cannon1->getRotation()+180); + bullet =BulletController::spawnBullet(kEnemyBullet, _getCannon2Position(), _getCannon2Vector()); + bullet->setRotation(_Cannon2->getRotation()+180); + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("boom.mp3"); + schedule(schedule_selector(Boss::startShooting),1, 0, 3); +} +void Boss::update(float dt, Node* player) +{ + float angleRad = (_getCannon1Position()-player->getPosition()).getAngle(); + float angleDeg = -CC_RADIANS_TO_DEGREES(angleRad)+90; + _Cannon1->setRotation(angleDeg-getRotation()); + + + angleRad = (_getCannon2Position()-player->getPosition()).getAngle(); + angleDeg = -CC_RADIANS_TO_DEGREES(angleRad)+90; + _Cannon2->setRotation(angleDeg-getRotation()); + +} \ No newline at end of file diff --git a/samples/EarthWarrior3D/Classes/Enemies.h b/samples/EarthWarrior3D/Classes/Enemies.h new file mode 100755 index 0000000..7778038 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/Enemies.h @@ -0,0 +1,93 @@ +// +// Fodder.h +// Moon3d +// +// Created by Hao Wu on 2/27/14. +// +// + +#ifndef __Moon3d__Fodder__ +#define __Moon3d__Fodder__ + +#include "cocos2d.h" +#include "AirCraft.h" +enum moveMode{ + kDefault, + kTurn +}; +class Sprite3D; + +class Fodder : public AirCraft +{ +public: + CREATE_FUNC(Fodder); + bool init(); + virtual void reset(); + virtual void move(float y, float dt); + CC_SYNTHESIZE(int, _moveMode, MoveMode); + CC_PROPERTY(float, _turn, TurnRate); + virtual void shoot(float dt); + CC_SYNTHESIZE(AirCraft*, _target, Target); +}; + +class FodderLeader : public Fodder +{ +public: + CREATE_FUNC(FodderLeader); + bool init(); + virtual void reset(); +}; + +class BigDude : public AirCraft +{ +public: + CREATE_FUNC(BigDude); + bool init(); + virtual void reset(); + virtual void die(); + void update(float dt, Node* player); + void showFinished(); + void showMuzzle(); + void dismissMuzzle(float dt); + virtual void shoot(float dt); + void fall(); +protected: + Sprite* muzzle1; + Sprite* muzzle2; + Point _targetPos; + float _turnRate = 50; +}; + +class Boss : public Fodder +{ +public: + CREATE_FUNC(Boss); + bool init(); + virtual void die(); + virtual void shoot(float dt); + void update(float dt, Node* player); +protected: + void createRandomExplosion(); + void dying(); + void dead(); + void enterTheBattle(); + void startShooting(float dt); + void startShooting(); + void showMuzzle(); + void dismissMuzzle(float dt); + void _turns(); + void _endGame(float dt); + Point _getCannon1Position(); + Point _getCannon2Position(); + Point _getCannon1Vector(); + Point _getCannon2Vector(); + Node* _Cannon1; + Node* _Cannon2; + Sprite* muzzle1; + Sprite* muzzle2; + void _dash(); + cocos2d::SEL_CallFunc _next(); +}; + + +#endif /* defined(__Moon3d__Fodder__) */ diff --git a/samples/EarthWarrior3D/Classes/Explosion.cpp b/samples/EarthWarrior3D/Classes/Explosion.cpp new file mode 100755 index 0000000..aa5fb52 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/Explosion.cpp @@ -0,0 +1,121 @@ +// +// Explosion.cpp +// Moon3d +// +// Created by Rye on 14-3-10. +// +// + +#include "Explosion.h" +#include "Effects.h" +#include "ParticleManager.h" + +USING_NS_CC; + +bool SmallExplosion::init(){ + + auto part1_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonSmoke.png"); + ValueMap vm1=ParticleManager::getInstance()->GetPlistData("toonSmoke"); + part1 = ParticleSystemQuad::create(vm1,part1_frame); + this->addChild(part1); + auto part2_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonFlare.png"); + ValueMap vm2=ParticleManager::getInstance()->GetPlistData("flare"); + part2 = ParticleSystemQuad::create(vm2,part2_frame); + this->addChild(part2); + part1->setTotalParticles(10); + part1->setEmissionRate(9999999999); + part2->setTotalParticles(3); + part2->setEmissionRate(9999999999); + part1->setRotation3D(Vertex3F(30,0,0)); + part2->setRotation3D(Vertex3F(30,0,0)); + return true; +} + +void SmallExplosion::createExplosion(Node* _effectLayer, Point pos){ + + part1->setTotalParticles(8); + part1->setEmissionRate(9999999999); + part1->setScale(0.7); + part2->setTotalParticles(5); + part2->setEmissionRate(9999999999); + _effectLayer->addChild(this,7); + part1->setRotation3D(Vertex3F(30,0,0)); + part2->setRotation3D(Vertex3F(30,0,0)); + this->setPosition(pos); + this->scheduleOnce(schedule_selector(SmallExplosion::recycle), 1.5); +} + +void SmallExplosion::recycle(float dt){ + this->removeFromParentAndCleanup(false); + EffectManager::_smallExplPool.pushBack(this); +} + +bool BigExplosion::init(){ + auto part1_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonSmoke.png"); + ValueMap vm1=ParticleManager::getInstance()->GetPlistData("toonSmoke"); + part1 = ParticleSystemQuad::create(vm1,part1_frame); + this->addChild(part1); + auto part2_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonGlow.png"); + ValueMap vm2=ParticleManager::getInstance()->GetPlistData("glow"); + part2 = ParticleSystemQuad::create(vm2,part2_frame); + this->addChild(part2); + auto part3_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("toonFlare2.png"); + ValueMap vm3=ParticleManager::getInstance()->GetPlistData("debris"); + part3 = ParticleSystemQuad::create(vm3,part3_frame); + this->addChild(part3); + part1->setTotalParticles(10); + part1->setEmissionRate(9999999999); + part2->setTotalParticles(3); + part2->setEmissionRate(9999999999); + part3->setTotalParticles(20); + part3->setEmissionRate(9999999999); + part3->setScale(1.5); + part1->setRotation3D(Vertex3F(30,0,0)); + part2->setRotation3D(Vertex3F(30,0,0)); + part3->setRotation3D(Vertex3F(30,0,0)); + return true; +} + +void BigExplosion::createExplosion(Node *_effectLayer, Point pos){ + + _effectLayer->addChild(this,6); + part1->resetSystem(); + part2->resetSystem(); + part3->resetSystem(); + setPosition(pos); + + this->scheduleOnce(schedule_selector(BigExplosion::recycle), 1.2); +} + +void BigExplosion::recycle(float dt){ + this->removeFromParentAndCleanup(false); + EffectManager::_bigExplPool.pushBack(this); +} + +bool BulletExplosion::init(){ + + auto texture = Director::getInstance()->getTextureCache()->addImage("player_bullet_explosion.png"); + Sprite::initWithTexture(texture); + setTextureRect(Rect(0,0,26,17)); + //this -> setTexture(texture); + return true; +} + +void BulletExplosion::showExplosion(Point point){ + auto animation = AnimationCache::getInstance()->getAnimation("bullet_expl"); + auto animate = Animate::create(animation); + this->runAction(Sequence::create(animate, + CallFuncN::create(CC_CALLBACK_1(BulletExplosion::explosionFinished,this)), NULL)); + this->setScale(0.5); + this->runAction(ScaleBy::create(0.4, 2)); + this->runAction(FadeOut::create(0.4)); + this->setPosition(point); + this->setRotation3D(Vertex3F(30,0,0)); + this->setBlendFunc(BlendFunc::ADDITIVE); + Director::getInstance()->getRunningScene()->getChildByTag(100)->getChildByTag(123)->addChild(this,3); +} + +void BulletExplosion::explosionFinished(Ref* obj){ + auto expl=static_cast(obj); + expl->removeFromParentAndCleanup(false); +} diff --git a/samples/EarthWarrior3D/Classes/Explosion.h b/samples/EarthWarrior3D/Classes/Explosion.h new file mode 100755 index 0000000..dc01c5c --- /dev/null +++ b/samples/EarthWarrior3D/Classes/Explosion.h @@ -0,0 +1,52 @@ +// +// Explosion.h +// Moon3d +// +// Created by Rye on 14-3-10. +// +// + +#ifndef __Moon3d__Explosion__ +#define __Moon3d__Explosion__ + +#include "cocos2d.h" + +class SmallExplosion : public cocos2d::Node{ + +public: + CREATE_FUNC(SmallExplosion); + bool init(); + void createExplosion(Node* _effectLayer, cocos2d::Point pos); + +private: + void recycle(float dt); + cocos2d::ParticleSystemQuad* part1; + cocos2d::ParticleSystemQuad* part2; + +}; + +class BigExplosion : public cocos2d::Node{ + +public: + CREATE_FUNC(BigExplosion); + bool init(); + void createExplosion(Node* _effectLayer,cocos2d::Point pos); + cocos2d::ParticleSystemQuad* part1; + cocos2d::ParticleSystemQuad* part2; + cocos2d::ParticleSystemQuad* part3; +private: + void recycle(float dt); + +}; + +class BulletExplosion : public cocos2d::Sprite +{ +public: + CREATE_FUNC(BulletExplosion); + bool init(); + void showExplosion(cocos2d::Point point); + void explosionFinished(Ref* obj); +}; + + +#endif /* defined(__Moon3d__Explosion__) */ diff --git a/samples/EarthWarrior3D/Classes/FriendControlScene.cpp b/samples/EarthWarrior3D/Classes/FriendControlScene.cpp new file mode 100755 index 0000000..15ab115 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/FriendControlScene.cpp @@ -0,0 +1,234 @@ +#include "MainMenuScene.h" +#include "FriendControlScene.h" +#include "FriendPlayer.h" +#include "ParticleManager.h" +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +#include "platform/android/jni/JniHelper.h" +#endif + +USING_NS_CC; + +Scene* FriendControl::createScene() +{ + // 'scene' is an autorelease object + auto scene = Scene::create(); + + // 'layer' is an autorelease object + auto layer = FriendControl::create(); + + // add layer as a child to scene + scene->addChild(layer); + + layer->setTag(1002); + + // return the scene + return scene; +} + +// on "init" you need to initialize your instance +bool FriendControl::init() +{ + ////////////////////////////// + // 1. super init first + if ( !Layer::init() ) + { + return false; + } + + visibleSize = Director::getInstance()->getVisibleSize(); + Point origin = Director::getInstance()->getVisibleOrigin(); + + ///////////////////////////// + // 2. add a menu item with "X" image, which is clicked to quit the program + // you may modify it. + + // add a "close" icon to exit the progress. it's an autorelease object + auto leftItem = MenuItemImage::create( + "b1.png", + "b2.png", + CC_CALLBACK_1(FriendControl::menuLeftCallback, this)); + + auto rightItem = MenuItemImage::create( + "f1.png", + "f2.png", + CC_CALLBACK_1(FriendControl::menuRightCallback, this)); + + auto addItem = MenuItemImage::create( + "r1.png", + "r2.png", + CC_CALLBACK_1(FriendControl::menuAddCallback, this)); + + auto closeItem = MenuItemImage::create( + "CloseNormal.png", + "CloseSelected.png", + CC_CALLBACK_1(FriendControl::menuCloseCallback, this)); + + + closeItem->setPosition(Point(origin.x + visibleSize.width - closeItem->getContentSize().width/2 , + origin.y + closeItem->getContentSize().height/2)); + + addItem->setPosition(Point(origin.x + visibleSize.width/2 , + origin.y + addItem->getContentSize().height/2 )); + + leftItem->setPosition(Point(origin.x + visibleSize.width/2 - leftItem->getContentSize().width - 50, + origin.y + leftItem->getContentSize().height/2 )); + + rightItem->setPosition(Point(origin.x + visibleSize.width/2 + rightItem->getContentSize().width + 50, + origin.y + rightItem->getContentSize().height/2)); + + // create menu, it's an autorelease object + auto menu = Menu::create(leftItem, rightItem, addItem, closeItem, NULL); + menu->setPosition(Point::ZERO); + this->addChild(menu, 1); + + ///////////////////////////// + // 3. add your codes below... + + // add a label shows "Hello World" + // create and initialize a label + + auto label = LabelTTF::create("1 Clicking a arrow that change the bullet's direction\n2 Clicking the central point that send a 'fulmination'\n3 Clicking right-bottom button to quit", "Arial", 24); + + // position the label on the center of the screen + label->setPosition(Point(origin.x + visibleSize.width/2, + origin.y + visibleSize.height - label->getContentSize().height)); + + // add the label as a child to this layer + this->addChild(label, 1); +/* + // add "FriendControl" splash screen" + auto sprite = Sprite::create("potion2.png"); + + // position the sprite on the center of the screen + sprite->setPosition(Point(visibleSize.width/2 + origin.x, visibleSize.height/2 + origin.y)); + + sprite->setScale(2, 2); + // add the sprite as a child to this layer + this->addChild(sprite, 0); +*/ + auto listener = EventListenerTouchOneByOne::create(); + listener->setSwallowTouches(true); + + listener->onTouchBegan = CC_CALLBACK_2(FriendControl::onTouchBegan, this); + listener->onTouchMoved = CC_CALLBACK_2(FriendControl::onTouchMoved, this); + listener->onTouchEnded = CC_CALLBACK_2(FriendControl::onTouchEnded, this); + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + + _friendPlayer = Sprite3D::create("playerv002.obj", "playerv002_256.png"); + if(_friendPlayer) + { + _friendPlayer->setScale(8); + addChild(_friendPlayer); + _friendPlayer->setPosition(Point(visibleSize.width/2 + origin.x, visibleSize.height/2 + origin.y)); + _friendPlayer->setRotation3D(Vertex3F(90,0,0)); + + static_cast(_friendPlayer)->setOutline(0.2, Color3B(0,0,0)); + } + + return true; +} + + +void FriendControl::menuCloseCallback(Ref* pSender) +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, "com/cocos2dx/moon3d/AppActivity", "remoteDisconnectJni", "()V")) { + + t.env->CallStaticVoidMethod(t.classID, t.methodID); + t.env->DeleteLocalRef(t.classID); + } +#endif + + Director::getInstance()->replaceScene(MainMenuScene::createScene()); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + exit(0); +#endif +} + +void FriendControl::menuLeftCallback(Ref* pSender) +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, "com/cocos2dx/moon3d/AppActivity", "friendControl", "(Ljava/lang/String;)V")) { + jstring stringArg1 = t.env->NewStringUTF("{\"type\":1}"); + t.env->CallStaticVoidMethod(t.classID, t.methodID, stringArg1); + t.env->DeleteLocalRef(t.classID); + t.env->DeleteLocalRef(stringArg1); + } +#endif + +} + +void FriendControl::menuRightCallback(Ref* pSender) +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, "com/cocos2dx/moon3d/AppActivity", "friendControl", "(Ljava/lang/String;)V")) { + jstring stringArg1 = t.env->NewStringUTF("{\"type\":2}"); + t.env->CallStaticVoidMethod(t.classID, t.methodID, stringArg1); + t.env->DeleteLocalRef(t.classID); + t.env->DeleteLocalRef(stringArg1); + } +#endif +} + +void FriendControl::menuAddCallback(Ref* pSender) +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, "com/cocos2dx/moon3d/AppActivity", "friendControl", "(Ljava/lang/String;)V")) { + jstring stringArg1 = t.env->NewStringUTF("{\"type\":3}"); + t.env->CallStaticVoidMethod(t.classID, t.methodID, stringArg1); + t.env->DeleteLocalRef(t.classID); + t.env->DeleteLocalRef(stringArg1); + } +#endif +} + +void FriendControl::jniReturnMainMenu() +{ + log("FriendControl::jniReturnMainMenu"); + + this->schedule(schedule_selector(FriendControl::scheduleReturnMainMenu),0.1,0,0); +} + +void FriendControl::scheduleReturnMainMenu(float dt) +{ + Director::getInstance()->replaceScene(MainMenuScene::createScene()); +} + +bool FriendControl::onTouchBegan(Touch *touch, Event *event) +{ + + return true; +} + +void FriendControl::onTouchMoved(Touch *touch, Event *event) +{ + Point prev = _friendPlayer->getPosition(); + Point delta =touch->getDelta(); + _friendPlayer->setPosition(prev + delta); + + prev = prev - Point(visibleSize.width/2, visibleSize.height/2); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + JniMethodInfo t; + + if (JniHelper::getStaticMethodInfo(t, "com/cocos2dx/moon3d/AppActivity", "friendControl", "(Ljava/lang/String;)V")) { + jstring stringArg1 = t.env->NewStringUTF(StringUtils::format("{\"type\":4, \"prevX\":%f, \"prevX\":%f, \"deltaX\":%f, \"deltaY\":%f}", prev.x, prev.y, delta.x, delta.y).c_str()); + + t.env->CallStaticVoidMethod(t.classID, t.methodID, stringArg1); + t.env->DeleteLocalRef(t.classID); + t.env->DeleteLocalRef(stringArg1); + } +#endif +} + +void FriendControl::onTouchEnded(Touch *touch, Event *event) +{ +} diff --git a/samples/EarthWarrior3D/Classes/FriendControlScene.h b/samples/EarthWarrior3D/Classes/FriendControlScene.h new file mode 100755 index 0000000..fd815a2 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/FriendControlScene.h @@ -0,0 +1,42 @@ +#ifndef __FriendControl_SCENE_H__ +#define __FriendControl_SCENE_H__ + +#include "cocos2d.h" + +class FriendControl : public cocos2d::Layer +{ +public: + // there's no 'id' in cpp, so we recommend returning the class instance pointer + static cocos2d::Scene* createScene(); + + // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone + virtual bool init(); + + void jniReturnMainMenu(); + + virtual bool onTouchBegan(Touch *touch, Event *event); + virtual void onTouchMoved(Touch *touch, Event *event); + virtual void onTouchEnded(Touch *touch, Event *event); + +protected: + + // a selector callback + void menuCloseCallback(cocos2d::Ref* pSender); + + void menuLeftCallback(Ref* pSender); + + void menuRightCallback(Ref* pSender); + + void menuAddCallback(Ref* pSender); + + void scheduleReturnMainMenu(float dt); + + // implement the "static create()" method manually + CREATE_FUNC(FriendControl); + + Sprite3D *_friendPlayer; + + Size visibleSize; +}; + +#endif // __FriendControl_SCENE_H__ diff --git a/samples/EarthWarrior3D/Classes/FriendPlayer.cpp b/samples/EarthWarrior3D/Classes/FriendPlayer.cpp new file mode 100755 index 0000000..4d137ca --- /dev/null +++ b/samples/EarthWarrior3D/Classes/FriendPlayer.cpp @@ -0,0 +1,150 @@ +// +// FriendPlayer.cpp +// Moon3d +// +// Created by John Li on 7/16/14. +// +// + +#include "FriendPlayer.h" +#include "Bullets.h" +#include "3d/Sprite3D.h" +#include "GameControllers.h" +#include "consts.h" +#include "HelloWorldScene.h" +#include "PublicApi.h" +#include "GameLayer.h" +#include "ParticleManager.h" +#define visible_size_macro Director::getInstance()->getVisibleSize() +#define origin_point Director::getInstance()->getVisibleOrigin(); + +bool FriendPlayer::init() +{ + _Model = Sprite3D::create("playerv002.obj", "playerv002_256.png"); + if(_Model) + { + _Model->setScale(8); + addChild(_Model); + _Model->setRotation3D(Vertex3F(90,0,0)); + _radius = 40; + _HP = 100; + + static_cast(_Model)->setOutline(0.2, Color3B(0,0,0)); + schedule(schedule_selector(FriendPlayer::shootMissile), 1.5, -1, 0); + schedule(schedule_selector(FriendPlayer::shoot), 0.075, -1, 0); + + // engine trail + auto part_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("engine2.jpg"); + ValueMap vm=ParticleManager::getInstance()->GetPlistData("engine"); + auto part = ParticleSystemQuad::create(vm,part_frame); + addChild(part); + part->setPosition(0,-30); + part->setScale(0.6); + + _prev = Point::ZERO; + _delta = Point::ZERO; + + return true; + } + return false; +} +void FriendPlayer::update(float dt) +{ + float smoothedAngle =fmin(fmax(targetAngle*(1-dt*returnSpeed*(rollReturnThreshold-fabsf(targetAngle)/maxRoll)),-maxRoll),maxRoll); + setRotation3D(Vertex3F(fabsf(smoothedAngle)*0.15,smoothedAngle, 0)); + targetAngle = getRotation3D().y; +} + +void FriendPlayer::touchMoved(Point prev, Point delta) +{ + _prev = getPosition(); + _delta = delta; + + Point shiftPosition = _delta+_prev; + + setTargetAngle(targetAngle+_delta.x*rollSpeed*(rollReturnThreshold-fabsf(targetAngle)/maxRoll)); + + setPosition(shiftPosition.getClampPoint(Point(PLAYER_LIMIT_LEFT,PLAYER_LIMIT_BOT),Point(PLAYER_LIMIT_RIGHT,PLAYER_LIMIT_TOP))); +} + +void FriendPlayer::shoot(float dt) +{ + + BulletController::spawnBullet(kPlayerBullet, getPosition()+Point(-20,20), Point(-200+shootDirection,1600)); + BulletController::spawnBullet(kPlayerBullet, getPosition()+Point(20,20), Point(200+shootDirection,1600)); + BulletController::spawnBullet(kPlayerBullet, getPosition()+Point(0,20), Point(shootDirection,1600)); +} + +void FriendPlayer::setPosition(Point pos) +{ + if (_position.equals(pos)) + return; + + _position = pos; + _transformUpdated = _transformDirty = _inverseDirty = true; + if(_streak) + { + _streak->setPosition(pos+_trailOffset); + } + if(_emissionPart) + { + _emissionPart->setPosition(pos); + } + + CCLOG("FriendPlayer %f %f", _position.x, _position.y); +} +void FriendPlayer::shootMissile(float dt) +{ + auto left = BulletController::spawnBullet(kPlayerMissiles, getPosition()+Point(-50,-20), Point(-200,-200)); + left->setRotation(-45); + auto right = BulletController::spawnBullet(kPlayerMissiles, getPosition()+Point(50,-20), Point(200,-200)); + right->setRotation(45); +} + +void FriendPlayer::stop() +{ + unschedule(schedule_selector(FriendPlayer::shoot)); + unschedule(schedule_selector(FriendPlayer::shootMissile)); +} +void FriendPlayer::hideWarningLayer() +{ + setVisible(false); +} +bool FriendPlayer::hurt(float damage){ + float fromHP = _HP; + + _HP-=damage; + if(_HP>100) _HP = 100; + float toHP =_HP; + + auto fade = FadeTo::create(0.2, 40); + auto fadeBack = FadeTo::create(0.2, 0); + auto warningLayer = Director::getInstance()->getRunningScene()->getChildByTag(456); + warningLayer->setVisible(true); + warningLayer->runAction(Sequence::create(fade,fadeBack,CallFunc::create(warningLayer, callfunc_selector(FriendPlayer::hideWarningLayer)),NULL)); + + auto hpView = ((HelloWorld*)Director::getInstance()->getRunningScene()->getChildByTag(100))->getHPView(); + + auto to = ProgressFromTo::create(0.5, PublicApi::hp2percent(fromHP), PublicApi::hp2percent(toHP)); + hpView->runAction(to); + + if(_HP <= 0 && _alive) + { + die(); + return true; + } + + return false; +} + +bool FriendPlayer::heal(float hp) +{ + hurt(-hp); +} + +void FriendPlayer::die() +{ + _alive = false; + GameLayer::isDie=true; + NotificationCenter::getInstance()->postNotification("ShowGameOver",NULL); +} \ No newline at end of file diff --git a/samples/EarthWarrior3D/Classes/FriendPlayer.h b/samples/EarthWarrior3D/Classes/FriendPlayer.h new file mode 100755 index 0000000..5cdb10b --- /dev/null +++ b/samples/EarthWarrior3D/Classes/FriendPlayer.h @@ -0,0 +1,55 @@ +// +// FriendPlayer.h +// Moon3d +// +// Created by John Li on 7/16/14. +// +// + +#ifndef __Moon3d__Friend_Player__ +#define __Moon3d__Friend_Player__ + +#include "cocos2d.h" +#include "AirCraft.h" + +USING_NS_CC; + +class FriendPlayer : public AirCraft +{ +public: + CREATE_FUNC(FriendPlayer); + bool init(); + + void update(float dt); + + const float rollSpeed = 1.5;// recommended 1.5 + const float returnSpeed = 10;// recommended 4 + const float maxRoll = 75; + const float rollReturnThreshold = 1.02; + void setTargetAngle(float angle){targetAngle = angle;}; + void setTargetPos(Point target){targetPos = target;}; + + void shoot(float dt); + void shootMissile(float dt); + void stop(); + CC_SYNTHESIZE(MotionStreak*, _streak, Trail); + CC_SYNTHESIZE(ParticleSystemQuad*, _emissionPart, EmissionPart); + void setPosition(Point pos); + virtual bool hurt(float damage); + virtual bool heal(float hp); + virtual void die(); + void hideWarningLayer(); + + void touchMoved(Point prev, Point delta); +protected: + float targetAngle = 0; + Point targetPos = Point(0,0); + Point _trailOffset = Point(0,-40); + int shootDirection = 0; + + Point _prev; + Point _delta; +}; + + +#endif /* defined(__Moon3d__Friend_Player__) */ diff --git a/samples/EarthWarrior3D/Classes/GameControllers.cpp b/samples/EarthWarrior3D/Classes/GameControllers.cpp new file mode 100755 index 0000000..a694f9f --- /dev/null +++ b/samples/EarthWarrior3D/Classes/GameControllers.cpp @@ -0,0 +1,466 @@ +// +// BulletController.cpp +// Moon3d +// +// Created by Hao Wu on 3/4/14. +// +// + +#include "GameControllers.h" +#include "GameEntity.h" +#include "Bullets.h" +#include "consts.h" +#include "AirCraft.h" +#include "Reward.h" +#include "Effects.h" +#include "SimpleAudioEngine.h" +#include "Enemies.h" +#include "Player.h" +#include "HelloWorldScene.h" + +//-------------------------------------------------------------------- + +Node* RewardController::_rewardLayer = nullptr; +bool RewardController::_inited = false; +Vector RewardController::rewards; +Vector RewardController::_potionPool; +const float RewardController::rewardMoveDist = -200; + +bool RewardController::init(Node* rewardLayer) +{ + _rewardLayer = rewardLayer; + _inited = true; + return true; +} + +void RewardController::reset() +{ + _inited = false; + _rewardLayer = nullptr; + rewards.clear(); +} +Reward* RewardController::createOrGet(int type) +{ + Reward *reward = nullptr; + switch(type) + { + case kRewardPotion: + if(!_potionPool.empty()) + { + reward = _potionPool.back(); + _potionPool.popBack(); + } + else + { + reward = Potion::create(); + reward->retain(); + } + break; + case kRewardCoin: + + break; + } + return reward; +} + +Reward* RewardController::spawnReward(int type) +{ + CC_ASSERT(_rewardLayer); + Reward *reward = createOrGet(type); + if(reward) + { + rewards.pushBack(reward); + _rewardLayer->addChild(reward, -1); + return reward; + } + return nullptr; +} + +void RewardController::erase(int i) +{ + auto e = rewards.at(i); + int type = e->getType(); + switch(type) + { + case kRewardPotion: + _potionPool.pushBack(static_cast(e)); + break; + case kRewardCoin: + break; + } + rewards.erase(i); + e->removeFromParentAndCleanup(false); + e->reset(); +} + +//-------------------------------------------------------------------- + +Node* BulletController::_bulletLayer = nullptr; +bool BulletController::_inited = false; +Vector BulletController::bullets; +Vector BulletController::_missilePool; + + +void BulletController::reset(){ + _inited = false; + _bulletLayer = nullptr; + bullets.clear(); +} +bool BulletController::init(Node *bulletLayer){ + if(bulletLayer) + { + reset(); + _bulletLayer = bulletLayer; + _inited = false; + return true; + } + return false; +} +Bullet* BulletController::spawnBullet(int type, Point pos, Point vec) +{ + Bullet *bullet = nullptr; + switch(type) + { + case kPlayerBullet: + bullet = PlayerBullet::create(); + //bullet->retain(); + //bullet->setType(kPlayerBullet); + break; + case kPlayerMissiles: + if(!_missilePool.empty()) + { + // if the pool is not empty, we don't need to create, just return that, and reset its data + bullet = _missilePool.back(); + //bullet->retain(); + _missilePool.popBack(); + + //bullet->reset(); + } + else + { + bullet = Missile::create(); + bullet->retain(); + } + //bullet->setType + break; + case kEnemyBullet: + bullet = Bullet::create(); + bullet->setType(kEnemyBullet); + break; + } + if(bullet) + { + bullets.pushBack(bullet); + _bulletLayer->addChild(bullet,1); + //bullet->release(); + bullet->setPosition(pos); + bullet->setVector(vec); + return bullet; + } + return nullptr; +} +void BulletController::erase(Bullet* b) +{ + if(b->getType() == kPlayerMissiles) + { + _missilePool.pushBack(static_cast(b)); + bullets.eraseObject(b); + b->removeFromParentAndCleanup(false); + b->reset(); + } + else + { + b->removeFromParentAndCleanup(true); + bullets.eraseObject(b); + } +} +void BulletController::erase(int i) +{ + auto b = bullets.at(i); + if(b->getType() == kPlayerMissiles) + { + _missilePool.pushBack(static_cast(b)); + bullets.erase(i); + b->removeFromParentAndCleanup(false); + b->reset(); + } + else + { + bullets.erase(i); + b->removeFromParentAndCleanup(true); + } +} + + +Node* EnemyController::_enemyLayer = nullptr; +bool EnemyController::_inited = false; +Vector EnemyController::enemies; +Vector EnemyController::showCaseEnemies; +Vector EnemyController::_fodderPool; +Vector EnemyController::_fodderLPool; +Vector EnemyController::_bigDudePool; +Vector EnemyController::_bossPool; + +const float EnemyController::EnemyMoveDist = -400; +bool EnemyController::init(Node* enemyLayer) +{ + _enemyLayer = enemyLayer; + _inited = true; + return true; +} + +void EnemyController::reset() +{ + _inited = false; + _enemyLayer = nullptr; + enemies.clear(); +} +AirCraft* EnemyController::createOrGet(int type) +{ + AirCraft *enemy = nullptr; + switch(type) + { + case kEnemyFodder: + if(!_fodderPool.empty()) + { + enemy = _fodderPool.back(); + _fodderPool.popBack(); + } + else + { + enemy = Fodder::create(); + enemy->retain(); + } + break; + case kEnemyFodderL: + if(!_fodderLPool.empty()) + { + enemy = _fodderLPool.back(); + _fodderLPool.popBack(); + } + else + { + enemy = FodderLeader::create(); + enemy->retain(); + } + break; + case kEnemyBigDude: + if(!_bigDudePool.empty()) + { + enemy = _bigDudePool.back(); + _bigDudePool.popBack(); + } + else + { + enemy = BigDude::create(); + enemy->retain(); + } + break; + case kEnemyBoss: + if(!_bossPool.empty()) + { + enemy = _bossPool.back(); + _bossPool.popBack(); + } + else + { + enemy = Boss::create(); + enemy->retain(); + } + break; + } + return enemy; +} + +AirCraft* EnemyController::spawnEnemy(int type) +{ + CC_ASSERT(_enemyLayer); + AirCraft *enemy = createOrGet(type); + if(enemy) + { + enemies.pushBack(enemy); + _enemyLayer->addChild(enemy, 0); + return enemy; + } + return nullptr; +} +AirCraft* EnemyController::showCaseEnemy(int type) +{ + CC_ASSERT(_enemyLayer); + AirCraft *enemy = createOrGet(type); + if(enemy) + { + showCaseEnemies.pushBack(enemy); + _enemyLayer->addChild(enemy, 0); + return enemy; + } + return nullptr; +} +void EnemyController::erase(int i) +{ + auto e = enemies.at(i); + int type = e->getType(); + switch(type) + { + case kEnemyFodder: + _fodderPool.pushBack(static_cast(e)); + break; + case kEnemyFodderL: + _fodderLPool.pushBack(static_cast(e)); + break; + case kEnemyBigDude: + _bigDudePool.pushBack(static_cast(e)); + break; + case kEnemyBoss: + _bossPool.pushBack(static_cast(e)); + break; + } + enemies.erase(i); + e->removeFromParentAndCleanup(false); + e->reset(); +} + + +void GameController::update(float dt, Player* player) +{ + Point temp; + Bullet* b; + auto list =BulletController::bullets; + float enemyMoveDist =EnemyController::EnemyMoveDist*dt; + for(int i = BulletController::bullets.size()-1; i >= 0; i-- ) + { + b =BulletController::bullets.at(i); + temp =b->getPosition(); + if(BOUND_RECT.containsPoint(temp)) + { + if(b->getOwner() == kPlayer) + { + //********* Enemy Loop ********** + for(int j = EnemyController::enemies.size()-1; j >= 0; j--) + { + auto e = EnemyController::enemies.at(j); + if(b->getPosition().getDistance(e->getPosition()) <(b->getRadius() + e->getRadius())) + { + //collision happened + bool dead = e->hurt(b->getDamage()); + if(!dead) + { + switch(b->getType()) + { + case kPlayerMissiles: + EffectManager::createExplosion(b->getPosition()); + + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("boom2.mp3"); + break; + default: + CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("hit.mp3"); + break; + } + } + BulletController::erase(i); + } + + } + //*********** Enemy Loop *************** + if(b->getType() == kPlayerMissiles) + { + b->update(dt); + } + else{ + b->setPosition(temp+(b->getVector()*dt)); + } + } + // loop all enemy bullets against player + else if(b->getPosition().getDistance(player->getPosition()) < b->getRadius()+player->getRadius()) + { + player->hurt(b->getDamage()); + BulletController::erase(i); + EffectManager::createExplosion(player->getPosition()); + break; + } + else // nothing happens to the bullet, move along.. + { + + b->setPosition(temp+(b->getVector()*dt)); + } + } + else + { + BulletController::erase(i); + } + } + // Enemies update + for(int k = EnemyController::enemies.size()-1; k>=0; k--) + { + auto enemy =EnemyController::enemies.at(k); + if(!enemy->alive()) + { + EnemyController::erase(k); + //enemy->reset(); + //break; + } + switch(enemy->getType()) + { + case kEnemyBigDude: + static_cast(enemy)->update(dt, player); + break; + case kEnemyBoss: + static_cast(enemy)->update(dt, player); + break; + default: + enemy->move(enemyMoveDist, dt); + break; + } + if(!ENEMY_BOUND_RECT.containsPoint(enemy->getPosition()) && enemy->getType() != kEnemyBoss) + { + //enemy went out side, kill it + EnemyController::erase(k); + } + //if colliding with player + else if(enemy->getPosition().getDistance(player->getPosition()) <(enemy->getRadius() + player->getRadius())) + { + player->hurt(50); + enemy->hurt(50); + if(enemy->getType() != kEnemyBoss && enemy->getType() != kEnemyBigDude) + EnemyController::erase(k); + } + //TODO: if enemy collide with player + //if(enemy->getPosition().getDistance(<#const cocos2d::Point &other#>)) + } + + float rewardMoveDist =RewardController::rewardMoveDist*dt; + // Reward update + for(int k = RewardController::rewards.size()-1; k>=0; k--) + { + auto reward =RewardController::rewards.at(k); + if(!reward->alive()) + { + RewardController::erase(k); + } + switch(reward->getType()) + { + case kRewardPotion: + case kRewardCoin: + default: + reward->move(rewardMoveDist, dt); + break; + } + + if(!ENEMY_BOUND_RECT.containsPoint(reward->getPosition())) + { + //reward went out side, kill it + RewardController::erase(k); + } + //if colliding with player + else if(reward->getPosition().getDistance(player->getPosition()) <(reward->getRadius() + player->getRadius())) + { + player->heal(50); + RewardController::erase(k); + } + } + +} + + + + diff --git a/samples/EarthWarrior3D/Classes/GameControllers.h b/samples/EarthWarrior3D/Classes/GameControllers.h new file mode 100755 index 0000000..922f5fd --- /dev/null +++ b/samples/EarthWarrior3D/Classes/GameControllers.h @@ -0,0 +1,99 @@ +// +// BulletController.h +// Moon3d +// +// Created by Hao Wu on 3/4/14. +// +// + +#ifndef __Moon3d__BulletController__ +#define __Moon3d__BulletController__ + +#include "cocos2d.h" +USING_NS_CC; +class Bullet; +class AirCraft; +class Missile; +class Fodder; +class FodderLeader; +class BigDude; +class Player; +class Boss; +class Reward; +class Potion; + +class RewardController +{ +public: + static void reset(); + static bool init(Node *rewardLayer); + static Reward* spawnReward(int type); + static Reward* createOrGet(int type); + static void update(float dt); + static Vector rewards; + static void erase(int i); + + static const float rewardMoveDist; + + //all kinds of reward container + static Vector _potionPool; + +protected: + static bool _inited; + static Node *_rewardLayer; +}; + +class BulletController +{ +public: + static void reset(); + static bool init(Node *bulletLayer); + static Bullet* spawnBullet(int type, Point pos, Point vec); + //static void update(float dt); + static Vector bullets; + static void erase(Bullet* b); //returns the bullet to the pool + static void erase(int i); + + static Vector _missilePool; + +protected: + //static BulletController *s_instance; + static bool _inited; + static Node *_bulletLayer; +}; + +class EnemyController +{ +public: + static void reset(); + static bool init(Node *enemyLayer); + static AirCraft* spawnEnemy(int type); + static AirCraft* createOrGet(int type); + static AirCraft* showCaseEnemy(int type); + static void update(float dt); + static Vector enemies; + static void erase(int i); + static Vector showCaseEnemies; + + static const float EnemyMoveDist; + + + //all kinds of enemies container + static Vector _fodderPool; + static Vector _fodderLPool; + static Vector _bigDudePool; + static Vector _bossPool; + +protected: + static bool _inited; + static Node *_enemyLayer; + +}; + +class GameController +{ +public: + static void update(float dt, Player* player); +}; + +#endif /* defined(__Moon3d__BulletController__) */ diff --git a/samples/EarthWarrior3D/Classes/GameEntity.cpp b/samples/EarthWarrior3D/Classes/GameEntity.cpp new file mode 100755 index 0000000..30b9970 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/GameEntity.cpp @@ -0,0 +1,31 @@ +// +// GameEntity.cpp +// Moon3d +// +// Created by Hao Wu on 2/27/14. +// +// + +#include "GameEntity.h" + +Node *GameEntity::getModel(){ + return _Model; +} + +Vertex3F GameEntity::getOrientation(){ + return _orientation; +} + +void GameEntity::forward(float dist){ + float f = getRotation(); + setPosition(getPosition() + +Point( + sinf(CC_DEGREES_TO_RADIANS(f))*dist, + cosf(CC_DEGREES_TO_RADIANS(f))*dist) + ); +} +void GameEntity::forward(float dist, float angle) +{ + setRotation(getRotation()-angle); + forward(dist); +} \ No newline at end of file diff --git a/samples/EarthWarrior3D/Classes/GameEntity.h b/samples/EarthWarrior3D/Classes/GameEntity.h new file mode 100755 index 0000000..146bd79 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/GameEntity.h @@ -0,0 +1,37 @@ +// +// GameEntity.h +// Moon3d +// +// Created by Hao Wu on 2/27/14. +// +// + +#ifndef __Moon3d__GameEntity__ +#define __Moon3d__GameEntity__ + +#include "cocos2d.h" + +USING_NS_CC; + +class GameEntity : public Node +{ +public: + CREATE_FUNC(GameEntity); + Node *getModel(); + void remove(); + Vertex3F getOrientation(); + void setType(int type){_type = type;}; + int getType(){return _type;}; + float getRadius(){return _radius;}; + void forward(float dist); + void forward(float dist, float angle); +protected: + Node *_Model; + float _radius; + Vertex3F _orientation; + int _type; + +}; + + +#endif /* defined(__Moon3d__GameEntity__) */ diff --git a/samples/EarthWarrior3D/Classes/GameLayer.cpp b/samples/EarthWarrior3D/Classes/GameLayer.cpp new file mode 100755 index 0000000..ec1971f --- /dev/null +++ b/samples/EarthWarrior3D/Classes/GameLayer.cpp @@ -0,0 +1,321 @@ +// +// ScrollingBackground.cpp +// Moon3d +// +// Created by Hao Wu on 2/24/14. +// +// + +#include "GameLayer.h" +#include "Player.h" +#include "FriendPlayer.h" +#include "Enemies.h" +#include "Reward.h" +#include "PublicApi.h" +#include "GameControllers.h" +#include "consts.h" +#include "Bullets.h" +#include "Effects.h" +#include "GameEntity.h" +#include "SimpleAudioEngine.h" +#include "Effects.h" +#include "ParticleManager.h" +#include "json/document.h" + +USING_NS_CC; +using namespace std; + +bool GameLayer::isDie=false; + +bool GameLayer::init() +{ + _spr = Sprite::create("groundLevel.jpg"); + addChild(_spr, -5); + Texture2D::TexParams texRepeat = {GL_LINEAR, GL_LINEAR, GL_CLAMP_TO_EDGE, GL_REPEAT}; + _spr->getTexture()->setTexParameters(texRepeat); + setRotation3D(Vertex3F(-30.0,0.0f,0.0f)); + _spr->setScale(1.4); + _spr->setPosition(0.0f,400.0f); + + _player = Player::create(); + _streak = MotionStreak::create(0.4, 1, 15, Color3B(82,255,253), "streak.png"); + _player->setTrail(_streak); + addChild(_streak,3); + auto emission_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("engine.jpg"); + ValueMap vm_emission=ParticleManager::getInstance()->GetPlistData("emissionPart"); + _emissionPart = ParticleSystemQuad::create(vm_emission,emission_frame); + _player->setEmissionPart(_emissionPart); + addChild(_emissionPart,4); + _emissionPart->setPositionType(tPositionType::FREE); + addChild(_player,5); + EffectManager::setLayer(this); + + this->schedule(schedule_selector(GameLayer::gameMaster) , 1.5, -1, 2.0); + + BulletController::init(this); + EnemyController::init(this); + RewardController::init(this); + scheduleUpdate(); + + + _player->setPosition(Point(0,-1000)); + _player->runAction(Sequence::create( + DelayTime::create(0.75), + Spawn::create( + EaseBackOut::create(MoveTo::create(1.7,Point(0,-200))), + EaseSineOut::create(RotateBy::create(1.7,Vertex3F(0,720,0))), + nullptr + ), + CallFunc::create(CC_CALLBACK_0(GameLayer::schedulePlayer,this)),nullptr)); + + + _friendPlayer = FriendPlayer::create(); + MotionStreak *_streak1 = MotionStreak::create(0.4, 1, 15, Color3B(82,255,253), "streak.png"); + _friendPlayer->setTrail(_streak1); + addChild(_streak1,3); + auto emission_frame1=SpriteFrameCache::getInstance()->getSpriteFrameByName("engine.jpg"); + ValueMap vm_emission1=ParticleManager::getInstance()->GetPlistData("emissionPart"); + ParticleSystemQuad *_emissionPart1 = ParticleSystemQuad::create(vm_emission1,emission_frame1); + + _friendPlayer->setEmissionPart(_emissionPart1); + addChild(_emissionPart1,4); + _emissionPart1->setPositionType(tPositionType::FREE); + addChild(_friendPlayer,999); + + _friendPlayer->setPosition(Point(0,-1000)); + _friendPlayer->runAction(Sequence::create( + DelayTime::create(0.75), + Spawn::create( + EaseBackOut::create(MoveTo::create(1.7,Point(0,-200))), + EaseSineOut::create(RotateBy::create(1.7,Vertex3F(0,720,0))), + nullptr + ), + CallFunc::create(CC_CALLBACK_0(GameLayer::scheduleFriendPlayer,this)),nullptr)); + + return true; +} + +void GameLayer::schedulePlayer() +{ + _player->scheduleUpdate(); +} + +void GameLayer::scheduleFriendPlayer() +{ + if(_friendPlayer == NULL) return; + + _friendPlayer->scheduleUpdate(); +} + +void GameLayer::gameMaster(float dt) +{ + if(isDie) + { + return; + } + + _elapsed+=dt; + + int enemyCount =EnemyController::enemies.size(); + + //if(_elapsed < 10 && enemyCount < 5) + if(enemyCount < 5 &&_elapsed < 60) + { + Point random = Point(100*CCRANDOM_MINUS1_1(), BOUND_RECT.size.height/2+200); + for(int i=0; i < 4; i++) + { + auto enemy1 = EnemyController::spawnEnemy(kEnemyFodder); + enemy1->setPosition(random + Point(60,60)*(i+1)); + static_cast(enemy1)->setMoveMode(moveMode::kDefault); + auto enemy2 = EnemyController::spawnEnemy(kEnemyFodder); + enemy2->setPosition(random + Point(-60,60)*(i+1)); + static_cast(enemy2)->setMoveMode(moveMode::kDefault); + enemy1->setRotation3D(Vertex3F(0,0,0)); + enemy2->setRotation3D(Vertex3F(0,0,0)); + } + auto leader = EnemyController::spawnEnemy(kEnemyFodderL); + leader->setPosition(random); + leader->setRotation3D(Vertex3F(0,0,0)); + static_cast(leader)->setTarget(_player); + static_cast(leader)->setMoveMode(moveMode::kDefault); + } + //else if(_elapsed < 20 && enemyCount <5) + if(_elapsed > 4 && enemyCount <4 &&_elapsed < 60) + { + Point random = Point(-400, BOUND_RECT.size.height/4*CCRANDOM_MINUS1_1()+350); + for(int i=0; i < 3; i++) + { + float randomAngle = CCRANDOM_MINUS1_1()*70; + auto enemy = EnemyController::spawnEnemy(kEnemyFodder); + enemy->setPosition(random + Point(60,60)*(i+1)); + static_cast(enemy)->setTurnRate(randomAngle*0.5); + enemy->setRotation(-randomAngle-90); + auto enemy2 = EnemyController::spawnEnemy(kEnemyFodder); + enemy2->setPosition(random + Point(-60,60)*(i+1)); + static_cast(enemy2)->setTurnRate(randomAngle*0.5); + enemy2->setRotation(-randomAngle-90); + } + auto leader = EnemyController::spawnEnemy(kEnemyFodderL); + leader->setPosition(random); + static_cast(leader)->setTurnRate(45); + leader->setRotation(-45); + //enemy->runAction(EaseBackOut::create(MoveTo::create(2, _player->getPosition()))); + static_cast(leader)->setTarget(_player); + leader->schedule(schedule_selector(FodderLeader::shoot),CCRANDOM_0_1()*1+1,90,0); + + } + if(_elapsed > 10 && enemyCount < 4 &&_elapsed < 60 ) + { + for(int q = 0; q< 2; q++) + { + //random if its from the top, left, or bottom + int direction = CCRANDOM_0_1()*4; + float rX, rY; + switch(direction) + { + case 0://top + rY = BOUND_RECT.size.height/2+200; + rX = ENEMY_BOUND_RECT.size.width*CCRANDOM_0_1(); + break; + case 1://bottom + rY = -200; + rX = ENEMY_BOUND_RECT.size.width*CCRANDOM_0_1(); + break; + case 2://left + rY = ENEMY_BOUND_RECT.size.height*CCRANDOM_0_1(); + rX = ENEMY_BOUND_RECT.origin.x; + break; + case 3://right + rY = ENEMY_BOUND_RECT.size.height*CCRANDOM_0_1(); + rX = ENEMY_BOUND_RECT.size.width; + break; + } + auto enemy = EnemyController::showCaseEnemy(kEnemyBigDude); + //enemy->setPosition(Point(100*CCRANDOM_MINUS1_1(), BOUND_RECT.size.height/2+200)); + enemy->setPosition(rX,rY); + Point targetPos =Point(BOUND_RECT.size.width/3*CCRANDOM_MINUS1_1(),BOUND_RECT.size.height/3*CCRANDOM_0_1()); + enemy->setScale(2*CCRANDOM_MINUS1_1()+2); + float randomTime = CCRANDOM_0_1()*1+1; + enemy->setRotation3D(Vertex3F(300,0,-CC_RADIANS_TO_DEGREES((enemy->getPosition()-targetPos).getAngle())+90)); + enemy->runAction( + Sequence::create( + Spawn::create( + EaseSineOut::create(MoveTo::create(randomTime, targetPos)), + EaseSineOut::create(ScaleTo::create(randomTime,1)),//TODO: replace with move 3d when possible + EaseBackOut::create(RotateBy::create(randomTime+0.2,Vertex3F(-300,0,0))), + nullptr + ), + CallFunc::create(enemy,callfunc_selector(BigDude::showFinished)), + nullptr + )); + } + } + if(_elapsed > 65 && !_bossOut) + { + //spawn boss + _bossOut = true; + auto boss = EnemyController::spawnEnemy(kEnemyBoss); + boss->setPosition(0,800); + CocosDenshion::SimpleAudioEngine::getInstance()->stopBackgroundMusic(); + // Music By Matthew Pable (http://www.matthewpablo.com/) + // Licensed under CC-BY 3.0 (http://creativecommons.org/licenses/by/3.0/) + CocosDenshion::SimpleAudioEngine::getInstance()->playBackgroundMusic("Orbital Colossus_0.mp3", true); + } +} + +void GameLayer::update(float dt) +{ + xScroll += speed*dt; + _spr->setTextureRect(Rect(0,((int)xScroll)%2048,512,1200)); + //_cloud->setTextureRect(Rect(0,((int)xScroll)%1024, 256, 1024)); + if (!isDie) { + GameController::update(dt, _player); + } + else + { + if (_player) { + _player->stop(); + removeChild(_player); + _player=NULL; + removeChild(_streak); + _streak=NULL; + removeChild(_emissionPart); + _emissionPart=NULL; + //scheduleOnce(schedule_selector(GameLayer::removeBulletAndEnmeys), 1/60); + stopAllActions(); + unscheduleAllSelectors(); + } + + if (_friendPlayer) { + _friendPlayer->stop(); + + removeChild(_friendPlayer->getTrail()); + removeChild(_friendPlayer->getEmissionPart()); + removeChild(_friendPlayer); + _friendPlayer=NULL; + } + } +} + +void GameLayer::removeBulletAndEnmeys(float dt) +{ + for(int i=EnemyController::enemies.size()-1;i>=0;i--) + { + EnemyController::erase(i); + } + for(int i=EnemyController::showCaseEnemies.size()-1;i>=0;i--) + { + //EnemyController::erase(i); + EnemyController::showCaseEnemies.at(i)->removeFromParentAndCleanup(false); + EnemyController::showCaseEnemies.erase(i); + } + for(int i=BulletController::bullets.size()-1;i>=0;i--) + { + BulletController::erase(i); + } + + for(int i=RewardController::rewards.size()-1;i>=0;i--) + { + EnemyController::erase(i); + } +} + +void GameLayer::addNodeAsync(const char* type) +{ + if(isDie) return; + + log("HelloWorld::addNodeAsync %s", type); + + rapidjson::Document doc; + doc.Parse(type); + + switch (doc["type"].GetInt()) { + case 1: + _player->friendShootLeft(); + break; + case 2: + _player->friendShootRight(); + break; + case 3: + this->schedule(schedule_selector(GameLayer::addNode),0,0,0); + break; + case 4: + if(_friendPlayer == NULL) return; + _friendPlayer->touchMoved(Point(doc["prevX"].GetDouble(), doc["prevY"].GetDouble()), Point(doc["deltaX"].GetDouble(), doc["deltaY"].GetDouble())); + break; + } +} + +void GameLayer::addNode(float dt) +{ + if(isDie) return; + + log("HelloWorld::addNode"); + + Point random = Point(100*CCRANDOM_MINUS1_1(), BOUND_RECT.size.height/2+200); + + auto reward = RewardController::spawnReward(kRewardPotion); + reward->setPosition(random); +} + + diff --git a/samples/EarthWarrior3D/Classes/GameLayer.h b/samples/EarthWarrior3D/Classes/GameLayer.h new file mode 100755 index 0000000..54931b8 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/GameLayer.h @@ -0,0 +1,55 @@ +// +// ScrollingBackground.h +// Moon3d +// +// Created by Hao Wu on 2/24/14. +// +// + +#ifndef __Moon3d__GameLayer__ +#define __Moon3d__GameLayer__ +#include "cocos2d.h" +USING_NS_CC; +class Player; +class FriendPlayer; +//class QuadTree; +class AirCraft; +class GameEntity; + +class GameLayer : public Layer +{ +public: + virtual bool init(); + void update(float dt); + CREATE_FUNC(GameLayer); + static bool isDie; + + //virtual void onEnter(); + + void addNodeAsync(const char* type); +protected: + float xScroll = 0.0f; + float speed = -60.0f; + Sprite *_spr; + Sprite *_cloud; + Player *_player; + FriendPlayer *_friendPlayer; + MotionStreak *_streak; + ParticleSystemQuad *_emissionPart; + void schedulePlayer(); + void scheduleFriendPlayer(); + //QuadTree *_collisionTree; + + + + //QuadTree *container; + void gameMaster(float dt); + float _elapsed = 20; //testing purpose, this was set to near boss timer + bool _bossOut = false; + + void addNode(float dt); + +private: + void removeBulletAndEnmeys(float dt); +}; +#endif /* defined(__Moon3d__GameLayer__) */ \ No newline at end of file diff --git a/samples/EarthWarrior3D/Classes/GameOverLayer.cpp b/samples/EarthWarrior3D/Classes/GameOverLayer.cpp new file mode 100755 index 0000000..af57108 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/GameOverLayer.cpp @@ -0,0 +1,184 @@ +// +// GameOverLayer.cpp +// Moon3d +// +// Created by Jacky on 14-3-12. +// +// + +#include "GameOverLayer.h" +#include "MainMenuScene.h" +#include "HelloWorldScene.h" +#include "GameLayer.h" +#include "GameControllers.h" +#include "AirCraft.h" +#include "Bullets.h" +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +#include "platform/android/jni/JniHelper.h" +#endif +GameOverLayer* GameOverLayer::create(int score) +{ + GameOverLayer *pRet = new GameOverLayer(); + pRet->m_score=score; + if (pRet && pRet->init()) + { + pRet->autorelease(); + } + else + { + delete pRet; + pRet = NULL; + } + return pRet; +} + +bool GameOverLayer::init() +{ + if (!LayerColor::initWithColor(Color4B(255, 255, 255, 50))) { + return false; + } + + auto visibleSize=Director::getInstance()->getVisibleSize(); + + auto score_bk=Sprite::createWithSpriteFrameName("gameover_score_bk.png"); + score_bk->setPosition(Point(visibleSize.width/2, visibleSize.height/2)); + addChild(score_bk,1); + score_bk->setScale(0.2f); + score_bk->runAction(Sequence::create(ScaleTo::create(0.2f, 1.1f), + ScaleTo::create(0.1f, 0.9f), + ScaleTo::create(0.1f, 1.0f), + CallFunc::create(CC_CALLBACK_0(GameOverLayer::ShowScore,this)), + NULL)); + + auto backtomenu_normal=Sprite::createWithSpriteFrameName("gameover_backtomenu.png"); + auto backtomenu_pressed=Sprite::createWithSpriteFrameName("gameover_backtomenu.png"); + backtomenu_Item = MenuItemSprite::create(backtomenu_normal, + backtomenu_pressed, + CC_CALLBACK_1(GameOverLayer::menu_backtomenu_Callback,this)); + +// auto playagain_normal=Sprite::createWithSpriteFrameName("gameover_playagain.png"); +// auto playagain_pressed=Sprite::createWithSpriteFrameName("gameover_playagain.png"); +// playagain_Item = MenuItemSprite::create(playagain_normal, +// playagain_pressed, +// CC_CALLBACK_1(GameOverLayer::menu_playagain_Callback,this)); + + auto menu = Menu::create(backtomenu_Item,NULL); + menu->alignItemsHorizontallyWithPadding(20); + menu->setPosition(visibleSize.width/2, 100); + this->addChild(menu, 2); + + auto listener = EventListenerTouchOneByOne::create(); + listener->setSwallowTouches(true); + + listener->onTouchBegan = CC_CALLBACK_2(GameOverLayer::onTouchBegan, this); + listener->onTouchMoved = CC_CALLBACK_2(GameOverLayer::onTouchMoved, this); + listener->onTouchEnded = CC_CALLBACK_2(GameOverLayer::onTouchEnded, this); + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + + return true; +} + +void GameOverLayer::ShowScore() +{ + auto visibleSize=Director::getInstance()->getVisibleSize(); + + auto score_text=Sprite::createWithSpriteFrameName("gameover_score.png"); + score_text->setPosition(Point(-200, visibleSize.height/2+30)); + score_text->runAction(MoveTo::create(0.5f, Point(visibleSize.width/2,visibleSize.height/2+30))); + addChild(score_text,2); + + char pScore[10]; + sprintf(pScore, "%d",m_score); + auto score_label=LabelBMFont::create(pScore, "gameover_score_num.fnt"); + score_label->setAnchorPoint(Point(0.5f,0.5f)); + score_label->setPosition(Point(1000,visibleSize.height/2-40)); + score_label->runAction(Sequence::create( + MoveTo::create(0.5f, Point(visibleSize.width/2,visibleSize.height/2-30)), + ScaleTo::create(0.1f, 1.3f), + ScaleTo::create(0.1f, 0.98f), + ScaleTo::create(0.1f, 1.2f),NULL)); + addChild(score_label,2); + +} + +void GameOverLayer::menu_backtomenu_Callback(Ref* sender) +{ + backtomenu_Item->runAction(Sequence::create(ScaleTo::create(0.1f, 1.1f), + ScaleTo::create(0.1f, 0.9f), + ScaleTo::create(0.1f, 1.0f), + CallFunc::create(CC_CALLBACK_0(GameOverLayer::menu_backtomenu, this)),NULL)); +} + +void GameOverLayer::menu_backtomenu() +{ + CocosDenshion::SimpleAudioEngine::getInstance()->stopBackgroundMusic(); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, "com/cocos2dx/moon3d/AppActivity", "remoteDisconnectJni", "()V")) { + + t.env->CallStaticVoidMethod(t.classID, t.methodID); + t.env->DeleteLocalRef(t.classID); + } +#endif + Director::getInstance()->replaceScene(MainMenuScene::createScene()); + + for(int i=EnemyController::enemies.size()-1;i>=0;i--) + { + EnemyController::enemies.at(i)->removeFromParentAndCleanup(true); + } + EnemyController::enemies.clear(); + for(int i=EnemyController::showCaseEnemies.size()-1;i>=0;i--) + { + EnemyController::showCaseEnemies.at(i)->removeFromParentAndCleanup(true); + //EnemyController::showCaseEnemies.erase(i); + } + EnemyController::showCaseEnemies.clear(); + for(int i=BulletController::bullets.size()-1;i>=0;i--) + { + BulletController::bullets.erase(i); + } + BulletController::bullets.clear(); +} + +void GameOverLayer::menu_playagain_Callback(Ref* sender) +{ + playagain_Item->runAction(Sequence::create(ScaleTo::create(0.1f, 1.1f), + ScaleTo::create(0.1f, 0.9f), + ScaleTo::create(0.1f, 1.0f), + CallFunc::create(CC_CALLBACK_0(GameOverLayer::menu_playagain, this)),NULL)); + +} + +void GameOverLayer::menu_playagain() +{ + CocosDenshion::SimpleAudioEngine::getInstance()->stopBackgroundMusic(); + GameLayer::isDie = false; + for(int i=EnemyController::enemies.size()-1;i>=0;i--) + { + EnemyController::erase(i); + } + for(int i=EnemyController::showCaseEnemies.size()-1;i>=0;i--) + { + //EnemyController::erase(i); + EnemyController::showCaseEnemies.at(i)->removeFromParentAndCleanup(false); + } + for(int i=BulletController::bullets.size()-1;i>=0;i--) + { + BulletController::erase(i); + } + Director::getInstance()->replaceScene(HelloWorld::createScene()); +} + +bool GameOverLayer::onTouchBegan(Touch *touch, Event *event) +{ + return true; +} +void GameOverLayer::onTouchMoved(Touch *touch, Event *event) +{ + +} +void GameOverLayer::onTouchEnded(Touch *touch, Event *event) +{ +} \ No newline at end of file diff --git a/samples/EarthWarrior3D/Classes/GameOverLayer.h b/samples/EarthWarrior3D/Classes/GameOverLayer.h new file mode 100755 index 0000000..39e75a1 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/GameOverLayer.h @@ -0,0 +1,44 @@ +// +// GameOverLayer.h +// Moon3d +// +// Created by Jacky on 14-3-12. +// +// + +#ifndef __Moon3d__GameOverLayer__ +#define __Moon3d__GameOverLayer__ + +#include "cocos2d.h" +#include "SimpleAudioEngine.h" + +USING_NS_CC; +using namespace CocosDenshion; + +class GameOverLayer : public LayerColor +{ +public: + + static GameOverLayer* create(int score); + + virtual bool init(); + +private: + + int m_score; + MenuItemSprite* backtomenu_Item; + MenuItemSprite* playagain_Item; + + void ShowScore(); + + void menu_backtomenu_Callback(Ref* sender); + void menu_playagain_Callback(Ref* sender); + void menu_backtomenu(); + void menu_playagain(); + + virtual bool onTouchBegan(Touch *touch, Event *event); + virtual void onTouchMoved(Touch *touch, Event *event); + virtual void onTouchEnded(Touch *touch, Event *event); +}; + +#endif /* defined(__Moon3d__GameOverLayer__) */ diff --git a/samples/EarthWarrior3D/Classes/HelloWorldScene.cpp b/samples/EarthWarrior3D/Classes/HelloWorldScene.cpp new file mode 100755 index 0000000..23385bb --- /dev/null +++ b/samples/EarthWarrior3D/Classes/HelloWorldScene.cpp @@ -0,0 +1,124 @@ +#include "HelloWorldScene.h" +#include "GameLayer.h" +#include "3d/Sprite3D.h" +#include "HelloWorldScene.h" +#include "GameOverLayer.h" +#include "GameControllers.h" + +USING_NS_CC; + +HelloWorld::~HelloWorld() +{ + //NotificationCenter::getInstance()->destroyInstance(); +} + +Scene* HelloWorld::createScene() +{ + // 'scene' is an autorelease object + auto scene = Scene::create(); + + // 'layer' is an autorelease object + auto layer = HelloWorld::create(); + layer->setTag(100); + // add layer as a child to scene + scene->addChild(layer,2); + + // add warning layer + auto warningLayer = LayerColor::create(Color4B(255, 0, 0, 60)); + warningLayer->setOpacity(0); + warningLayer->setTag(456); + scene->addChild(warningLayer,7); + + + // return the scene + return scene; +} + +// on "init" you need to initialize your instance +bool HelloWorld::init() +{ + if ( !Layer::init() ) + { + return false; + } + Size visibleSize = Director::getInstance()->getVisibleSize(); + Point origin = Director::getInstance()->getVisibleOrigin(); + auto sb = GameLayer::create(); + sb->setTag(123); + sb->setPosition(Point(visibleSize.width/2 + origin.x, visibleSize.height/2 + origin.y)); + addChild(sb); + auto fog = Sprite::createWithSpriteFrameName("fog.png"); + addChild(fog); + fog->setPosition(visibleSize.width/2,visibleSize.height/2+285); + fog->setScaleX(visibleSize.width/10); + + //HP + auto lefttopUI = Sprite::createWithSpriteFrameName("hp_empty.png"); + lefttopUI->setAnchorPoint(Point(0,1)); + lefttopUI->setPosition(Point(0, visibleSize.height+origin.y)); + addChild(lefttopUI); + + hpView = ProgressTimer::create(Sprite::createWithSpriteFrameName("hp.png")); + hpView->setType(ProgressTimer::Type::BAR); + hpView->setMidpoint(Point(0,0)); + hpView->setPercentage(1); + hpView->setBarChangeRate(Point(0, 1)); + hpView->setPercentage(100); + hpView->setAnchorPoint(Point(0,1)); + hpView->setPosition(Point(18, visibleSize.height+origin.y-32)); + addChild(hpView); + + auto hpAbove = Sprite::createWithSpriteFrameName("hp_above.png"); + hpAbove->setAnchorPoint(Point(0,1)); + hpAbove->setPosition(Point(18, visibleSize.height+origin.y-32)); + addChild(hpAbove); + + //Score + auto rightTopUI = Sprite::createWithSpriteFrameName("right_top_ui.png"); + rightTopUI->setAnchorPoint(Point(1,1)); + rightTopUI->setPosition(origin+Point(visibleSize)); + this->addChild(rightTopUI); + + //the menuitem to show score + scoreLabel = LabelAtlas::create("0", "score_right_top.png", 23, 28, '0'); + scoreLabel->setAnchorPoint(Point(1,0.5)); + scoreLabel->setPosition(visibleSize.width-40,visibleSize.height-45); + this->addChild(scoreLabel); + + this->schedule(schedule_selector(HelloWorld::increaseScore), (float)1/10); + //this->addChild(scoreLabel); + + + NotificationCenter::getInstance()->destroyInstance(); + NotificationCenter::getInstance()->addObserver(this,callfuncO_selector(HelloWorld::ShowGameOver),"ShowGameOver",NULL); + + return true; +} + +void HelloWorld::increaseScore(float dt){ + this->score++; + std::stringstream ss; + std::string str; + ss<>str; + const char *p = str.c_str(); + scoreLabel->setString(p); +} + +void HelloWorld::ShowGameOver(Ref* pObj) +{ + //unschedule(schedule_selector(HelloWorld::increaseScore)); +// BulletController::reset(); +// EnemyController::reset(); + auto gameoverlayer=GameOverLayer::create(score); + addChild(gameoverlayer,10); +} + +void HelloWorld::menuCloseCallback(Ref* pSender) +{ + Director::getInstance()->end(); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + exit(0); +#endif +} diff --git a/samples/EarthWarrior3D/Classes/HelloWorldScene.h b/samples/EarthWarrior3D/Classes/HelloWorldScene.h new file mode 100755 index 0000000..35e65d9 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/HelloWorldScene.h @@ -0,0 +1,33 @@ +#ifndef __HELLOWORLD_SCENE_H__ +#define __HELLOWORLD_SCENE_H__ + +#include "cocos2d.h" +# +class HelloWorld : public cocos2d::Layer +{ +public: + // there's no 'id' in cpp, so we recommend returning the class instance pointer + static cocos2d::Scene* createScene(); + + // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone + virtual bool init(); + + // a selector callback + void menuCloseCallback(cocos2d::Ref* pSender); + + // implement the "static create()" method manually + CREATE_FUNC(HelloWorld); + + ~HelloWorld(); + + +private: + CC_SYNTHESIZE(cocos2d::ProgressTimer*, hpView, HPView); + CC_SYNTHESIZE(int, score, Score) + CC_SYNTHESIZE(cocos2d::LabelAtlas*, scoreLabel, ScoreLabel); + void increaseScore(float dt); + void ShowGameOver(Ref* pObj); + +}; + +#endif // __HELLOWORLD_SCENE_H__ diff --git a/samples/EarthWarrior3D/Classes/LicenseLayer.cpp b/samples/EarthWarrior3D/Classes/LicenseLayer.cpp new file mode 100755 index 0000000..355baf2 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/LicenseLayer.cpp @@ -0,0 +1,69 @@ +// +// LisenceLayer.cpp +// Moon3d +// +// Created by Rye on 14-3-14. +// +// + +#include "LicenseLayer.h" + +LicenseLayer* LicenseLayer::create(const char* type_file_name) +{ + LicenseLayer *pRet = new LicenseLayer(); + pRet->type_file_name = type_file_name; + if (pRet && pRet->init()) + { + pRet->autorelease(); + } + else + { + delete pRet; + pRet = NULL; + } + return pRet; +} + + +bool LicenseLayer::init() +{ + + auto visibleSize=Director::getInstance()->getVisibleSize(); + + auto window = Sprite::create(type_file_name); + //window->setPosition(Point(visibleSize.width/2, visibleSize.height/2)); + addChild(window,1); + window->setScale(0.2f); + window->runAction(Sequence::create(ScaleTo::create(0.2f, 1.1f), + ScaleTo::create(0.1f, 0.9f), + ScaleTo::create(0.1f, 1.0f), + NULL)); + + auto listener = EventListenerTouchOneByOne::create(); + listener->setSwallowTouches(true); + + listener->onTouchBegan = CC_CALLBACK_2(LicenseLayer::onTouchBegan, this); + listener->onTouchMoved = CC_CALLBACK_2(LicenseLayer::onTouchMoved, this); + listener->onTouchEnded = CC_CALLBACK_2(LicenseLayer::onTouchEnded, this); + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + + return true; +} + +void LicenseLayer::dismiss(){ + this->removeFromParent(); +} + +bool LicenseLayer::onTouchBegan(Touch *touch, Event *event) +{ + this->runAction(Sequence::create(ScaleTo::create(0.2f, 0.2f),CallFunc::create(CC_CALLBACK_0(LicenseLayer::dismiss,this)), NULL)); + return true; +} +void LicenseLayer::onTouchMoved(Touch *touch, Event *event) +{ + +} +void LicenseLayer::onTouchEnded(Touch *touch, Event *event) +{ +} \ No newline at end of file diff --git a/samples/EarthWarrior3D/Classes/LicenseLayer.h b/samples/EarthWarrior3D/Classes/LicenseLayer.h new file mode 100755 index 0000000..44eac20 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/LicenseLayer.h @@ -0,0 +1,37 @@ +// +// LicenseLayer.h +// Moon3d +// +// Created by Rye on 14-3-14. +// +// + +#ifndef __Moon3d__LicenseLayer__ +#define __Moon3d__LicenseLayer__ + +#include "cocos2d.h" + +USING_NS_CC; + +class LicenseLayer : public Layer +{ +public: + + static LicenseLayer* create(const char* type_file_name); + + virtual bool init(); + +private: + + MenuItemSprite* license; + + const char* type_file_name; + + void dismiss(); + + virtual bool onTouchBegan(Touch *touch, Event *event); + virtual void onTouchMoved(Touch *touch, Event *event); + virtual void onTouchEnded(Touch *touch, Event *event); +}; + +#endif /* defined(__Moon3d__LicenseLayer__) */ diff --git a/samples/EarthWarrior3D/Classes/LoadingScene.cpp b/samples/EarthWarrior3D/Classes/LoadingScene.cpp new file mode 100755 index 0000000..878b611 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/LoadingScene.cpp @@ -0,0 +1,292 @@ +// +// LoadingScene.cpp +// Moon3d +// +// Created by Jacky on 3/10/14. +// +// + +#include "LoadingScene.h" +#include "HelloWorldScene.h" +#include "3d/Sprite3D.h" +#include "AirCraft.h" +#include "Enemies.h" +#include "Bullets.h" +#include "GameControllers.h" +#include "ParticleManager.h" +#include "consts.h" +#include "FriendControlScene.h" + +int LoadingScene::updatecount=0; +int LoadingScene::m_curPreload_fodder_count=0; +int LoadingScene::m_curPreload_fodderL_count=0; +int LoadingScene::m_curPreload_BigDude_count=0; +int LoadingScene::m_curPreload_Missile_count=0; +int LoadingScene::m_curPreload_Boss_count=0; + +int LoadingScene::audioloaded = false; +int LoadingScene::particleloaded = false; + +LoadingScene::~LoadingScene() +{ +} + +Scene* LoadingScene::createScene() +{ + // 'scene' is an autorelease object + auto scene = Scene::create(); + + // 'layer' is an autorelease object + auto layer = LoadingScene::create(); + + // add layer as a child to scene + scene->addChild(layer); + + // return the scene + return scene; +} + +// on "init" you need to initialize your instance +bool LoadingScene::init() +{ + if ( !Layer::init() ) + { + return false; + } + + InitBk(); + InitCoco(); + LoadingResource(); + + //NotificationCenter::getInstance()->addObserver(this,callfuncO_selector(LoadingScene::GotoNextScene),"GotoNextScene",NULL); + scheduleUpdate(); + + return true; +} + +void LoadingScene::InitBk() +{ + Size visibleSize = Director::getInstance()->getVisibleSize(); + + + SpriteFrameCache::getInstance()->addSpriteFramesWithFile("loadingAndHP.plist","loadingAndHP.png"); + + //bk + auto loading_bk=Sprite::createWithSpriteFrameName("loading_bk.png"); + loading_bk->setPosition(Point(visibleSize.width/2, visibleSize.height/2)); + addChild(loading_bk,0); + + + //LabelPercent + m_pPercent=LabelBMFont::create("0%", "num.fnt"); + m_pPercent->setPosition(Point(visibleSize.width/2,visibleSize.height/2+170)); + this->addChild(m_pPercent,1); + + //progress + auto progress_bk=Sprite::createWithSpriteFrameName("loading_progress_bk.png"); + progress_bk->setPosition(Point(visibleSize.width/2, visibleSize.height/2+300)); + addChild(progress_bk); + + m_pProgress=Sprite::createWithSpriteFrameName("loading_progress_thumb.png"); + m_pProgress->setPosition(Point(100, visibleSize.height/2+320)); + addChild(m_pProgress); +} + +void LoadingScene::InitCoco() +{ + Size visibleSize = Director::getInstance()->getVisibleSize(); + auto coco = Sprite3D::create("coconut.obj", "coco.png"); + if(coco) + { + coco->setPosition(Point(visibleSize.width/2, visibleSize.height/2-150)); + coco->setOutline(10,Color3B(0,0,0)); + addChild(coco,1); + coco->runAction(RepeatForever::create(RotateBy::create(0.8f,Vertex3F(0,360,0)))); + } +} + +void LoadingScene::LoadingResource() +{ + if(!particleloaded) + LoadingParticle(); + //Loading Music + if(!audioloaded) + LoadingMusic(); + + //Loading Picture + LoadingPic(); +} + +void LoadingScene::LoadingMusic() +{ + audioloaded = true; + auto Audio = CocosDenshion::SimpleAudioEngine::getInstance(); + Audio->preloadEffect("explodeEffect.mp3"); + Audio->preloadEffect("hit.mp3"); + Audio->preloadEffect("boom2.mp3"); + Audio->preloadEffect("boom.mp3"); + Audio->preloadBackgroundMusic("Orbital Colossus_0.mp3"); + //Audio->preloadBackgroundMusic("Star_Chaser.mp3"); + + // Music By Matthew Pable (http://www.matthewpablo.com/) + // Licensed under CC-BY 3.0 (http://creativecommons.org/licenses/by/3.0/) + Audio->playBackgroundMusic("Flux2.mp3"); +} + +void LoadingScene::LoadingPic() +{ + auto TexureCache=Director::getInstance()->getTextureCache(); + TexureCache->addImageAsync("boss.png",CC_CALLBACK_1(LoadingScene::LoadingCallback,this)); + TexureCache->addImageAsync("coco.png",CC_CALLBACK_1(LoadingScene::LoadingCallback,this)); + TexureCache->addImageAsync("groundLevel.jpg", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + TexureCache->addImageAsync("bullets.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + TexureCache->addImageAsync("daodan_32.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + TexureCache->addImageAsync("diji02_v002_128.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + TexureCache->addImageAsync("dijiyuanv001.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + TexureCache->addImageAsync("playerv002_256.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + TexureCache->addImageAsync("streak.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + + TexureCache->addImageAsync("gameover_score_num_0.png",CC_CALLBACK_1(LoadingScene::LoadingCallback,this)); + TexureCache->addImageAsync("num_0.png",CC_CALLBACK_1(LoadingScene::LoadingCallback,this)); + TexureCache->addImageAsync("score_right_top.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + + TexureCache->addImageAsync("gameover.png", CC_CALLBACK_1(LoadingScene::LoadingCallback, this)); + +} + +void LoadingScene::LoadingCallback(Ref* pObj) +{ + ++currentNum; + char tmp[10]; + int percent=(int)(((float)currentNum / totalNum) * 100); + sprintf(tmp, "%d%%", percent); + m_pPercent->setString(tmp); + m_pProgress->runAction(MoveBy::create(0.01f, Point(420/TOTAL_PIC_NUM,0))); +// m_pSlider->setValue(percent); + + + if (currentNum == totalNum) + { + //NotificationCenter::getInstance()->postNotification("GotoNextScene",NULL); + GotoNextScene(); + } +} + +void LoadingScene::GotoNextScene() +{ + //goto next scene. + SpriteFrameCache::getInstance()->addSpriteFramesWithFile("gameover.plist","gameover.png"); + + scheduleOnce(schedule_selector(LoadingScene::RunNextScene), 1.0f); +} + +void LoadingScene::RunNextScene(float dt) +{ + this->removeAllChildren(); + +// auto helloworldScene=FriendControl::createScene(); + auto helloworldScene=HelloWorld::createScene(); + Director::getInstance()->replaceScene(TransitionZoomFlipX::create(1.0f,helloworldScene)); + +} + +void LoadingScene::update(float dt) +{ + ++updatecount; + log("updateCount:%d........",updatecount); + + if (m_curPreload_fodder_countretain(); + EnemyController::_fodderPool.pushBack(enemy_fodder); + } + break; + case kEnemyFodderL: + { + auto enemy_fodderL= FodderLeader::create(); + enemy_fodderL->retain(); + EnemyController::_fodderLPool.pushBack(enemy_fodderL); + } + break; + case kEnemyBigDude: + { + auto enmey_bigdude= BigDude::create(); + enmey_bigdude->retain(); + EnemyController::_bigDudePool.pushBack(enmey_bigdude); + } + case kEnemyBoss: + { + auto enemy_boss =Boss::create(); + enemy_boss->retain(); + EnemyController::_bossPool.pushBack(enemy_boss); + } + break; + default: + break; + } +} + +void LoadingScene::LoadingBullet(int type) +{ + switch (type) { + case kPlayerMissiles: + { + auto bullet = Missile::create(); + bullet->retain(); + BulletController::_missilePool.pushBack(bullet); + } + break; + default: + break; + } +} + +void LoadingScene::LoadingParticle() +{ + particleloaded = true; + auto particle=ParticleManager::getInstance(); + particle->AddPlistData("missileFlare.plist","missileFlare"); + particle->AddPlistData("emission.plist", "emission"); + particle->AddPlistData("missileFlare.plist","missileFlare"); + particle->AddPlistData("toonSmoke.plist", "toonSmoke"); + particle->AddPlistData("flare.plist", "flare"); + particle->AddPlistData("glow.plist", "glow"); + particle->AddPlistData("debris.plist", "debris"); + particle->AddPlistData("emissionPart.plist", "emissionPart"); + particle->AddPlistData("engine.plist", "engine"); +} diff --git a/samples/EarthWarrior3D/Classes/LoadingScene.h b/samples/EarthWarrior3D/Classes/LoadingScene.h new file mode 100755 index 0000000..94f188b --- /dev/null +++ b/samples/EarthWarrior3D/Classes/LoadingScene.h @@ -0,0 +1,79 @@ +// +// LoadingScene.h +// Moon3d +// +// Created by Jacky on 3/10/14. +// +// + +#ifndef __Moon3d__LoadingScene__ +#define __Moon3d__LoadingScene__ + +#include "cocos2d.h" +#include "SimpleAudioEngine.h" + +USING_NS_CC; +using namespace CocosDenshion; + +#define TOTAL_PIC_NUM 13 + +#define PRELOAD_FODDER_COUNT 18 +#define PRELOAD_FODDERL_COUNT 3 +#define PRELOAD_BIGDUDE_COUBR 5 +#define PRELOAD_MISSILE_COUNT 5 +#define PRElOAD_BOSS_COUNT 1 + +class LoadingScene : public Layer +{ +public: + + LoadingScene():currentNum(0), + totalNum(TOTAL_PIC_NUM){}; + + ~LoadingScene(); + + static Scene* createScene(); + + virtual bool init(); + + void update(float dt); + static int audioloaded; + CREATE_FUNC(LoadingScene); + +private: + void InitBk(); + void InitCoco(); + void LoadingResource(); + void LoadingMusic(); + void LoadingPic(); + void LoadingEnemy(int type); + void LoadingBullet(int type); + void LoadingParticle(); + + void LoadingCallback(Ref* pObj); + void GotoNextScene(); + void RunNextScene(float dt); + + +private: + static bool isReg; + int currentNum; + int totalNum; + + Sprite* m_pProgress; + LabelBMFont* m_pPercent; + + static int m_curPreload_fodder_count; + static int m_curPreload_fodderL_count; + static int m_curPreload_BigDude_count; + static int m_curPreload_Missile_count; + static int m_curPreload_Boss_count; + + static int updatecount; + + static int particleloaded; +}; + + + +#endif /* defined(__Moon3d__LoadingScene__) */ diff --git a/samples/EarthWarrior3D/Classes/MainMenuScene.cpp b/samples/EarthWarrior3D/Classes/MainMenuScene.cpp new file mode 100755 index 0000000..882fb34 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/MainMenuScene.cpp @@ -0,0 +1,251 @@ +// +// MainMenuScene.cpp +// Moon3d +// +// Created by Rye on 14-3-12. +// +// + +#include "MainMenuScene.h" +#include "LoadingScene.h" +#include "PublicApi.h" +#include "Plane.h" +#include "GameLayer.h" +#include "HelloWorldScene.h" +#include "LicenseLayer.h" +#include "consts.h" +#include "GameControllers.h" +#include "FriendControlScene.h" +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +#include "platform/android/jni/JniHelper.h" +#endif +USING_NS_CC; + +Scene* MainMenuScene::createScene() +{ + // 'scene' is an autorelease object + auto scene = Scene::create(); + + // 'layer' is an autorelease object + auto layer = MainMenuScene::create(); + layer->setTag(1001); + // add layer as a child to scene + scene->addChild(layer); + + // return the scene + return scene; +} + +// on "init" you need to initialize your instance +bool MainMenuScene::init() +{ + if ( !Layer::init() ) + { + return false; + } + // Music By Matthew Pable (http://www.matthewpablo.com/) + // Licensed under CC-BY 3.0 (http://creativecommons.org/licenses/by/3.0/) + CocosDenshion::SimpleAudioEngine::getInstance()->playBackgroundMusic("Star_Chaser.mp3"); + + SpriteFrameCache::getInstance()->addSpriteFramesWithFile("menu_scene.plist","menu_scene.png"); + SpriteFrameCache::getInstance()->addSpriteFramesWithFile("Particle.plist","Particle.png"); + + Size visibleSize = Director::getInstance()->getVisibleSize(); + Point origin = Director::getInstance()->getVisibleOrigin(); + Size winSize = Director::getInstance()->getWinSize(); +// if(){ +// log("x"); +// }else if(920 == visibleSize.height){ +// log("y"); +// } +// log("w:%f",visibleSize.width); +// log("h:%f",visibleSize.height); +// log("w:%f",winSize.width); +// log("h:%f",winSize.height); + + + //************ adds Plane **************** + plane = Plane::create(); + this->addChild(plane, 10); + this->scheduleUpdate(); + + //************ adds emission flare **************** + auto flare = ParticleSystemQuad::create("missileFlare.plist"); + flare->setScale(5); + float originX = -9.0f; + float originY = 159.0f; + float originZ = 9.0f; + flare->setTotalParticles(50); + flare->setRotation3D(Vertex3F(-originX,-originY,-originZ)); + flare->setPosition(-39,0); + flare->setPositionType(tPositionType::GROUPED); + flare->setStartColor(Color4F(0,0.99,1,1)); + plane->addChild(flare, -1); + + auto emis = ParticleSystemQuad::create("menuEmission.plist"); + emis->setScale(3); + emis->setRotation3D(Vertex3F(-originX,-originY,-originZ)); + emis->setPosition(-40,0); + emis->setPositionType(tPositionType::GROUPED); + emis->setRotation(180); + plane->addChild(emis, -2); + + + //************ adds vanishing **************** + auto fileUtil = FileUtils::getInstance(); + auto plistData = fileUtil->getValueMapFromFile("vanishingPoint.plist"); + //auto sf = SpriteFrame::create("bullets.png", Rect(5,8,24,32)); + auto vanishing = ParticleSystemQuad::create(plistData); + vanishing->setAnchorPoint(Point(0.5f,0.5f)); + vanishing->setPosition(visible_size_macro.width-90,visible_size_macro.height/2 +50); + this->addChild(vanishing,1,1); + + //************* adds background *********** + auto background = Sprite::createWithSpriteFrameName("mainmenu_BG.png"); + background->setAnchorPoint(Point(0,0)); + this->addChild(background,-1,-1); + + //************* adds start game *********** + auto start_normal=Sprite::createWithSpriteFrameName("start_game.png"); + auto start_pressed=Sprite::createWithSpriteFrameName("start_game.png"); + startgame_item = MenuItemSprite::create(start_normal, start_pressed, CC_CALLBACK_1(MainMenuScene::startgame, this)); + startgame_item->setPosition(visibleSize.width/2 - 150,200); + startgame_item->setScale(1.3); + + //************* adds PK game *********** + auto pk_normal=Sprite::create("pkstart.png"); + auto pk_pressed=Sprite::create("pkstart.png"); + pk_item = MenuItemSprite::create(pk_normal, pk_pressed, CC_CALLBACK_1(MainMenuScene::pkgame, this)); + pk_item->setPosition(visibleSize.width/2 + 150,200); + pk_item->setScale(1.3); + + //************* license ******************* + auto license_normal=Sprite::createWithSpriteFrameName("license.png"); + auto license_pressed=Sprite::createWithSpriteFrameName("license.png"); + license_item = MenuItemSprite::create(license_normal, license_pressed, CC_CALLBACK_1(MainMenuScene::license, this)); + license_item->setPosition(visibleSize.width/2-200,100); + license_item->setScale(0.7); + + //************* credits ****************** + auto credits_normal=Sprite::createWithSpriteFrameName("credits.png"); + auto credits_pressed=Sprite::createWithSpriteFrameName("credits.png"); + credits_item = MenuItemSprite::create(credits_normal, credits_pressed, CC_CALLBACK_1(MainMenuScene::credits, this)); + credits_item->setPosition(visibleSize.width/2+200,100); + credits_item->setScale(0.7); + + //************* Menu ****************** + auto menu = Menu::create(startgame_item, pk_item, license_item,credits_item, NULL); + menu->setPosition(origin); + this->addChild(menu,3); + + return true; +} + +void MainMenuScene::update(float dt){ + pRate+=0.01; + plane->setPosition3D(Vertex3F(visible_size_macro.width/2+50,480-20*sin(1.05*pRate),0)); +} + +void MainMenuScene::startgame(Ref* sender) +{ + startgame_item->runAction(Sequence::create(ScaleTo::create(0.1f, 1.4f), + ScaleTo::create(0.1f, 1.2f), + ScaleTo::create(0.1f, 1.3f), + CallFunc::create(CC_CALLBACK_0(MainMenuScene::startgame_callback,this)),NULL)); +} + +void MainMenuScene::startgame_callback() +{ + CocosDenshion::SimpleAudioEngine::getInstance()->stopBackgroundMusic(); + GameLayer::isDie=false; + auto scene = (LoadingScene::audioloaded) ? HelloWorld::createScene() :LoadingScene::createScene(); + Director::getInstance()->replaceScene(scene); +} + +void MainMenuScene::pkgame(Ref* sender) +{ + pk_item->runAction(Sequence::create(ScaleTo::create(0.1f, 1.4f), + ScaleTo::create(0.1f, 1.2f), + ScaleTo::create(0.1f, 1.3f), + CallFunc::create(CC_CALLBACK_0(MainMenuScene::pkgame_callback,this)),NULL)); +} + +void MainMenuScene::pkgame_callback() +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + JniMethodInfo t; + + if (JniHelper::getStaticMethodInfo(t, "com/cocos2dx/moon3d/AppActivity", "showFriend", "(Ljava/lang/String;)V")) { + jstring stringArg1 = t.env->NewStringUTF(""); + + t.env->CallStaticVoidMethod(t.classID, t.methodID, stringArg1); + t.env->DeleteLocalRef(t.classID); + t.env->DeleteLocalRef(stringArg1); + } +#endif +} + +void MainMenuScene::credits(Ref* sender){ + credits_item->runAction(Sequence::create(ScaleTo::create(0.1f, 0.8f), + ScaleTo::create(0.1f, 0.6f), + ScaleTo::create(0.1f, 0.7f), + CallFunc::create(CC_CALLBACK_0(MainMenuScene::credits_callback, this)),NULL)); +} + +void MainMenuScene::credits_callback() +{ + auto license =LicenseLayer::create("credits_03.png"); + license->setAnchorPoint(Point(0.5f,0.5f)); + license->setPosition(Point(visible_size_macro.width/2, visible_size_macro.height/2)); + addChild(license,20); + license->runAction(Sequence::create(ScaleTo::create(0.2f, 1.1f), + ScaleTo::create(0.1f, 0.9f), + ScaleTo::create(0.1f, 1.0f), + NULL)); +} + +void MainMenuScene::license(Ref* sender){ + license_item->runAction(Sequence::create(ScaleTo::create(0.1f, 0.8f), + ScaleTo::create(0.1f, 0.6f), + ScaleTo::create(0.1f, 0.7f), + CallFunc::create(CC_CALLBACK_0(MainMenuScene::license_callback, this)),NULL)); +} + +void MainMenuScene::license_callback() +{ + auto license =LicenseLayer::create("LICENSE_03.png"); + license->setAnchorPoint(Point(0.5f,0.5f)); + license->setPosition(Point(visible_size_macro.width/2, visible_size_macro.height/2)); + addChild(license,20); + license->runAction(Sequence::create(ScaleTo::create(0.2f, 1.1f), + ScaleTo::create(0.1f, 0.9f), + ScaleTo::create(0.1f, 1.0f), + NULL)); +} + +void MainMenuScene::jniStartGame(const char* something) +{ + log("MainMenuScene::jniStartGame"); + + this->schedule(schedule_selector(MainMenuScene::scheduleStartGame),0.1,0,0); +} + +void MainMenuScene::scheduleStartGame(float dt) +{ + startgame(NULL); +} + +void MainMenuScene::jniStartControl() +{ + log("MainMenuScene::jniStartControl"); + + this->schedule(schedule_selector(MainMenuScene::scheduleStartControl),0.1,0,0); +} + +void MainMenuScene::scheduleStartControl(float dt) +{ + CocosDenshion::SimpleAudioEngine::getInstance()->stopBackgroundMusic(); + GameLayer::isDie=false; + auto scene = FriendControl::createScene(); + Director::getInstance()->replaceScene(scene); +} diff --git a/samples/EarthWarrior3D/Classes/MainMenuScene.h b/samples/EarthWarrior3D/Classes/MainMenuScene.h new file mode 100755 index 0000000..f63209b --- /dev/null +++ b/samples/EarthWarrior3D/Classes/MainMenuScene.h @@ -0,0 +1,54 @@ +// +// MainMenuScene.h +// Moon3d +// +// Created by Rye on 14-3-12. +// +// + +#ifndef __Moon3d__MainMenuScene__ +#define __Moon3d__MainMenuScene__ + +#include "cocos2d.h" +#include "3d/Sprite3D.h" +#include "Plane.h" + +USING_NS_CC; + +class MainMenuScene : public cocos2d::Layer +{ +public: + static cocos2d::Scene* createScene(); + virtual bool init(); + CREATE_FUNC(MainMenuScene); + void update(float dt); + + void jniStartGame(const char* something); + + void jniStartControl(); + +private: + void startgame(cocos2d::Ref* sender); + void pkgame(cocos2d::Ref* sender); + void license(cocos2d::Ref* sender); + void credits(cocos2d::Ref* sender); + Plane* plane; + float pRate = 3.1415926/2; + void startgame_callback(); + void pkgame_callback(); + void license_callback(); + void credits_callback(); + + void scheduleStartGame(float dt); + + void scheduleStartControl(float dt); + +private: + MenuItemSprite* startgame_item; + MenuItemSprite* pk_item; + MenuItemSprite* license_item; + MenuItemSprite* credits_item; + +}; + +#endif /* defined(__Moon3d__MainMenuScene__) */ diff --git a/samples/EarthWarrior3D/Classes/ParticleManager.cpp b/samples/EarthWarrior3D/Classes/ParticleManager.cpp new file mode 100755 index 0000000..4adced6 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/ParticleManager.cpp @@ -0,0 +1,29 @@ +// +// ParticleManager.cpp +// Moon3d +// +// Created by cocos01 on 14-3-13. +// +// + +#include "ParticleManager.h" + +ParticleManager* ParticleManager::m_pInstance=NULL; +ParticleManager::CGarbo ParticleManager::m_garbo; +ParticleManager::ParticleManager() +{ + m_plistMap.clear(); +} + +void ParticleManager::AddPlistData(std::string strPlist,std::string strName) +{ + auto plistData=FileUtils::getInstance()->getValueMapFromFile(strPlist); + std::map::iterator it = m_plistMap.begin(); + m_plistMap.insert(it,std::pair(strName,plistData)); +} + +ValueMap ParticleManager::GetPlistData(std::string strplist) +{ + auto plistData=m_plistMap.find(strplist)->second; + return plistData; +} diff --git a/samples/EarthWarrior3D/Classes/ParticleManager.h b/samples/EarthWarrior3D/Classes/ParticleManager.h new file mode 100755 index 0000000..71fc71b --- /dev/null +++ b/samples/EarthWarrior3D/Classes/ParticleManager.h @@ -0,0 +1,56 @@ +// +// ParticleManager.h +// Moon3d +// +// Created by cocos01 on 14-3-13. +// +// + +#ifndef __Moon3d__ParticleManager__ +#define __Moon3d__ParticleManager__ + +#include "cocos2d.h" + +USING_NS_CC; + +class ParticleManager +{ +public: + + static ParticleManager* getInstance() + { + if ( m_pInstance == nullptr ) + m_pInstance = new ParticleManager(); + return m_pInstance; + } + +private: + + ParticleManager(); + + static ParticleManager* m_pInstance; + + class CGarbo + { + public: + ~CGarbo() + { + if (ParticleManager::m_pInstance!= nullptr) + { + delete ParticleManager::m_pInstance; + } + } + }; + + static CGarbo m_garbo; + +public: + + std::map m_plistMap; + + void AddPlistData(std::string strPlist,std::string strName); + + ValueMap GetPlistData(std::string strplist); +}; + +#endif /* defined(__Moon3d__ParticleManager__) */ diff --git a/samples/EarthWarrior3D/Classes/Plane.cpp b/samples/EarthWarrior3D/Classes/Plane.cpp new file mode 100755 index 0000000..74f38eb --- /dev/null +++ b/samples/EarthWarrior3D/Classes/Plane.cpp @@ -0,0 +1,28 @@ +// +// Plane.cpp +// Moon3d +// +// Created by Rye on 14-3-13. +// +// + +#include "Plane.h" +#include "3d/Sprite3D.h" +#include "PublicApi.h" +bool Plane::init(){ + _Model = Sprite3D::create("playerv002.obj", "playerv002_256.png"); + if(_Model){ + _Model->setScale(55); + ((Sprite3D*)_Model)->setOutline(0.035, Color3B::BLACK); + _Model->setRotation3D(Vertex3F(originX,originY,originZ)); + this->setRotation3D(Vertex3F(originX, originY, originZ)); + this->addChild(_Model); + this->scheduleUpdate(); + } + return true; +} + +void Plane::update(float dt){ + pRate+=0.01; + _Model->setRotation3D(Vertex3F(0-pXA*sin(pXW*pRate),0,0-pZA*sin(pZW*pRate))); +} \ No newline at end of file diff --git a/samples/EarthWarrior3D/Classes/Plane.h b/samples/EarthWarrior3D/Classes/Plane.h new file mode 100755 index 0000000..8129ba1 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/Plane.h @@ -0,0 +1,35 @@ +// +// Plane.h +// Moon3d +// +// Created by Rye on 14-3-13. +// +// + +#ifndef __Moon3d__Plane__ +#define __Moon3d__Plane__ + +#include +#include "cocos2d.h" +#include "GameEntity.h" + +class Plane :public GameEntity{ +public: + CREATE_FUNC(Plane); + bool init(); +private: + float pRate = 3.1415926/2; + float originX = -15.0f; + float originY = 159.0f; + float originZ = 9.0f; + const float pXW = 1.1f; + const float pYW = 5.0f; + const float pZW = 1.0f; + const float pXA = 1.0f; + const float pYA = 10.0f; + const float pZA = 7.0f; + + void update(float dt); +}; + +#endif /* defined(__Moon3d__Plane__) */ diff --git a/samples/EarthWarrior3D/Classes/Player.cpp b/samples/EarthWarrior3D/Classes/Player.cpp new file mode 100755 index 0000000..9c0e0ea --- /dev/null +++ b/samples/EarthWarrior3D/Classes/Player.cpp @@ -0,0 +1,177 @@ +// +// Player.cpp +// Moon3d +// +// Created by Hao Wu on 2/27/14. +// +// + +#include "Player.h" +#include "Bullets.h" +#include "3d/Sprite3D.h" +#include "GameControllers.h" +#include "consts.h" +#include "HelloWorldScene.h" +#include "PublicApi.h" +#include "GameLayer.h" +#include "ParticleManager.h" +#define visible_size_macro Director::getInstance()->getVisibleSize() +#define origin_point Director::getInstance()->getVisibleOrigin(); + +bool Player::init() +{ + _Model = Sprite3D::create("playerv002.obj", "playerv002_256.png"); + if(_Model) + { + _Model->setScale(8); + addChild(_Model); + _Model->setRotation3D(Vertex3F(90,0,0)); + _radius = 40; + _HP = 100; + + auto listener = EventListenerTouchOneByOne::create(); + listener->setSwallowTouches(true); + + listener->onTouchBegan = CC_CALLBACK_2(Player::onTouchBegan, this); + listener->onTouchMoved = CC_CALLBACK_2(Player::onTouchMoved, this); + listener->onTouchEnded = CC_CALLBACK_2(Player::onTouchEnded, this); + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + //scheduleUpdate(); + static_cast(_Model)->setOutline(0.2, Color3B(0,0,0)); + schedule(schedule_selector(Player::shootMissile), 1.5, -1, 0); + schedule(schedule_selector(Player::shoot), 0.075, -1, 0); + + // engine trail + auto part_frame=SpriteFrameCache::getInstance()->getSpriteFrameByName("engine2.jpg"); + ValueMap vm=ParticleManager::getInstance()->GetPlistData("engine"); + auto part = ParticleSystemQuad::create(vm,part_frame); + addChild(part); + part->setPosition(0,-30); + part->setScale(0.6); + //part->setRotation(90); + return true; + } + return false; +} +void Player::update(float dt) +{ + float smoothedAngle =fmin(fmax(targetAngle*(1-dt*returnSpeed*(rollReturnThreshold-fabsf(targetAngle)/maxRoll)),-maxRoll),maxRoll); + setRotation3D(Vertex3F(fabsf(smoothedAngle)*0.15,smoothedAngle, 0)); + targetAngle = getRotation3D().y; +} +bool Player::onTouchBegan(Touch *touch, Event *event) +{ + + return true; +} +void Player::onTouchMoved(Touch *touch, Event *event) +{ + Point prev = event->getCurrentTarget()->getPosition(); + Point delta =touch->getDelta(); + + setTargetAngle(targetAngle+delta.x*rollSpeed*(rollReturnThreshold-fabsf(targetAngle)/maxRoll)); + + Point shiftPosition = delta+prev; + + setPosition(shiftPosition.getClampPoint(Point(PLAYER_LIMIT_LEFT,PLAYER_LIMIT_BOT),Point(PLAYER_LIMIT_RIGHT,PLAYER_LIMIT_TOP))); + + CCLOG("%f %f", shiftPosition.x, shiftPosition.y); +} +void Player::onTouchEnded(Touch *touch, Event *event) +{ +} + +void Player::shoot(float dt) +{ + + BulletController::spawnBullet(kPlayerBullet, getPosition()+Point(-20,20), Point(-200+shootDirection,1600)); + BulletController::spawnBullet(kPlayerBullet, getPosition()+Point(20,20), Point(200+shootDirection,1600)); + BulletController::spawnBullet(kPlayerBullet, getPosition()+Point(0,20), Point(shootDirection,1600)); +} + +void Player::friendShootLeft() +{ + if (shootDirection > -1000) { + shootDirection -= 100; + } +} + +void Player::friendShootRight() +{ + if (shootDirection < 1000) { + shootDirection += 100; + } +} + +void Player::setPosition(Point pos) +{ + if (_position.equals(pos)) + return; + + _position = pos; + _transformUpdated = _transformDirty = _inverseDirty = true; + if(_streak) + { + _streak->setPosition(pos+_trailOffset); + } + if(_emissionPart) + { + _emissionPart->setPosition(pos); + } +} +void Player::shootMissile(float dt) +{ + auto left = BulletController::spawnBullet(kPlayerMissiles, getPosition()+Point(-50,-20), Point(-200,-200)); + left->setRotation(-45); + auto right = BulletController::spawnBullet(kPlayerMissiles, getPosition()+Point(50,-20), Point(200,-200)); + right->setRotation(45); +} + +void Player::stop() +{ + unschedule(schedule_selector(Player::shoot)); + unschedule(schedule_selector(Player::shootMissile)); +} +void Player::hideWarningLayer() +{ + setVisible(false); +} +bool Player::hurt(float damage){ + float fromHP = _HP; + + _HP-=damage; + if(_HP>100) _HP = 100; + float toHP =_HP; + + auto fade = FadeTo::create(0.2, 40); + auto fadeBack = FadeTo::create(0.2, 0); + auto warningLayer = Director::getInstance()->getRunningScene()->getChildByTag(456); + warningLayer->setVisible(true); + warningLayer->runAction(Sequence::create(fade,fadeBack,CallFunc::create(warningLayer, callfunc_selector(Player::hideWarningLayer)),NULL)); + + auto hpView = ((HelloWorld*)Director::getInstance()->getRunningScene()->getChildByTag(100))->getHPView(); + + auto to = ProgressFromTo::create(0.5, PublicApi::hp2percent(fromHP), PublicApi::hp2percent(toHP)); + hpView->runAction(to); + + if(_HP <= 0 && _alive) + { + die(); + return true; + } + + return false; +} + +bool Player::heal(float hp) +{ + hurt(-hp); +} + +void Player::die() +{ + _alive = false; + GameLayer::isDie=true; + NotificationCenter::getInstance()->postNotification("ShowGameOver",NULL); +} \ No newline at end of file diff --git a/samples/EarthWarrior3D/Classes/Player.h b/samples/EarthWarrior3D/Classes/Player.h new file mode 100755 index 0000000..428b569 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/Player.h @@ -0,0 +1,56 @@ +// +// Player.h +// Moon3d +// +// Created by Hao Wu on 2/27/14. +// +// + +#ifndef __Moon3d__Player__ +#define __Moon3d__Player__ + +#include "cocos2d.h" +#include "AirCraft.h" + + +USING_NS_CC; + +class Player : public AirCraft +{ +public: + CREATE_FUNC(Player); + bool init(); + virtual bool onTouchBegan(Touch *touch, Event *event); + virtual void onTouchMoved(Touch *touch, Event *event); + virtual void onTouchEnded(Touch *touch, Event *event); + void update(float dt); + + const float rollSpeed = 1.5;// recommended 1.5 + const float returnSpeed = 10;// recommended 4 + const float maxRoll = 75; + const float rollReturnThreshold = 1.02; + void setTargetAngle(float angle){targetAngle = angle;}; + void setTargetPos(Point target){targetPos = target;}; + + void shoot(float dt); + void shootMissile(float dt); + void stop(); + CC_SYNTHESIZE(MotionStreak*, _streak, Trail); + CC_SYNTHESIZE(ParticleSystemQuad*, _emissionPart, EmissionPart); + void setPosition(Point pos); + virtual bool hurt(float damage); + virtual bool heal(float hp); + virtual void die(); + void hideWarningLayer(); + + void friendShootLeft(); + void friendShootRight(); +protected: + float targetAngle = 0; + Point targetPos = Point(0,0); + Point _trailOffset = Point(0,-40); + int shootDirection = 0; +}; + + +#endif /* defined(__Moon3d__Player__) */ diff --git a/samples/EarthWarrior3D/Classes/PublicApi.cpp b/samples/EarthWarrior3D/Classes/PublicApi.cpp new file mode 100755 index 0000000..0fd341d --- /dev/null +++ b/samples/EarthWarrior3D/Classes/PublicApi.cpp @@ -0,0 +1,32 @@ +// +// PublicApi.cpp +// Moon3d +// +// Created by Hao Wu on 2/27/14. +// +// + +#include "PublicApi.h" +USING_NS_CC; + +float PublicApi::hp2percent(float hp){ + float percent = 100.0f; + if(hp>=100){ + percent = 100.f; + }else if(83<=hp && hp<=99){ + percent = 100.0/7*6; + }else if(65<=hp && hp<=82){ + percent = 100.0/7*5; + }else if(47<=hp && hp<=64){ + percent = 100.0/7*4; + }else if(29<=hp && hp<=46){ + percent = 100.0/7*3; + }else if(11<=hp && hp<=28){ + percent = 100.0/7*2; + }else if(1<=hp && hp<=10){ + percent = 100.0/7*1; + }else if(hp<=0){ + percent = 0; + } + return percent; +} diff --git a/samples/EarthWarrior3D/Classes/PublicApi.h b/samples/EarthWarrior3D/Classes/PublicApi.h new file mode 100755 index 0000000..3533833 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/PublicApi.h @@ -0,0 +1,23 @@ +// +// PublicApi.h +// Moon3d +// +// Created by Hao Wu on 2/27/14. +// +// + +#ifndef __Moon3d__PublicApi__ +#define __Moon3d__PublicApi__ + +#include "cocos2d.h" +#define visible_size_macro Director::getInstance()->getVisibleSize() +#define origin_point Director::getInstance()->getVisibleOrigin(); +class PublicApi +{ +public: + static float hp2percent(float hp); +protected: + +}; + +#endif /* defined(__Moon3d__PublicApi__) */ diff --git a/samples/EarthWarrior3D/Classes/Reward.cpp b/samples/EarthWarrior3D/Classes/Reward.cpp new file mode 100755 index 0000000..e450559 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/Reward.cpp @@ -0,0 +1,83 @@ +// +// Reward.cpp +// Moon3d +// +// Created by Jun Li on 5/20/14. +// +// + +#include "Reward.h" +#include "Enemies.h" + +void Reward::gain(long count) +{ + _count += count; +} + +void Reward::move(float y, float dt) +{ + forward(y); +} + +void Reward::reset() +{ + _alive = true; +} + +bool Reward::alive() +{ + return _alive; +} + +bool Potion::init() +{ + _count = 10; + _Model = CCSprite::create("potion2.png"); + if(_Model) + { + addChild(_Model); + _count = 10; + _radius = 30; + return true; + } + return false; +} +void Potion::reset() +{ + Reward::reset(); + _target = nullptr; + _count = 10; +} + +void Potion::setTurnRate(float turn) +{ +} + +float Potion::getTurnRate() +{ + return _turn; +} +void Potion::move(float y, float dt) +{ + switch(_moveMode) + { + case moveMode::kTurn: + forward(y, getTurnRate()*dt); + break; + default: + //setPosition(getPosition()+pos); + forward(y); + } +} + +void Potion::gain(long count) +{ + _count += count; + + if (_count > 100) { + _count = 100; + } +} + + + diff --git a/samples/EarthWarrior3D/Classes/Reward.h b/samples/EarthWarrior3D/Classes/Reward.h new file mode 100755 index 0000000..501b858 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/Reward.h @@ -0,0 +1,41 @@ +// +// Reward.h +// Moon3d +// +// Created by Jun Li on 5/20/14. +// +// + +#ifndef __Moon3d__Reward__ +#define __Moon3d__Reward__ + +#include "cocos2d.h" +#include "GameEntity.h" +USING_NS_CC; + +class Reward : public GameEntity +{ +public: + virtual void gain(long count); + virtual bool alive(); + virtual void move(float y, float dt); + virtual void reset(); +protected: + bool _alive = true; + long _count; +}; + +class Potion : public Reward +{ +public: + CREATE_FUNC(Potion); + bool init(); + void gain(long count); + virtual void reset(); + virtual void move(float y, float dt); + CC_SYNTHESIZE(int, _moveMode, MoveMode); + CC_PROPERTY(float, _turn, TurnRate); + CC_SYNTHESIZE(Reward*, _target, Target); +}; + +#endif /* defined(__Moon3d__Reward__) */ diff --git a/samples/EarthWarrior3D/Classes/consts.h b/samples/EarthWarrior3D/Classes/consts.h new file mode 100755 index 0000000..09696e9 --- /dev/null +++ b/samples/EarthWarrior3D/Classes/consts.h @@ -0,0 +1,37 @@ +// +// consts.h +// Moon3d +// +// Created by Hao Wu on 3/5/14. +// +// + +#ifndef Moon3d_consts_h +#define Moon3d_consts_h + +#define PLAYER_LIMIT_LEFT -240 +#define PLAYER_LIMIT_RIGHT 240 +#define PLAYER_LIMIT_TOP 737 +#define PLAYER_LIMIT_BOT -376 + +const static Rect BOUND_RECT = Rect(-380,PLAYER_LIMIT_BOT-60,760,PLAYER_LIMIT_TOP-PLAYER_LIMIT_BOT+180 ); +const static Rect ENEMY_BOUND_RECT = Rect(-480,PLAYER_LIMIT_BOT-60,960,PLAYER_LIMIT_TOP-PLAYER_LIMIT_BOT+380 ); +#endif + +enum entityTypes +{ + kPlayerBullet, + kPlayerMissiles, + kEnemyBullet, + + kPlayer, + kEnemy, + + kEnemyFodder, + kEnemyFodderL, + kEnemyBigDude, + kEnemyBoss, + + kRewardPotion, + kRewardCoin +}; \ No newline at end of file diff --git a/samples/EarthWarrior3D/README.md b/samples/EarthWarrior3D/README.md new file mode 100755 index 0000000..112f3c0 --- /dev/null +++ b/samples/EarthWarrior3D/README.md @@ -0,0 +1,49 @@ +EarthWarrior3D +====== + +This is an experimental project from Cocos2d-x, featuring 3D models in a 2d game. + +Using Cocos2d-x 3.0 and the experimental Sprite3D. + +The code of this project, Cocos2d-x, Sprite3D are all licensed under MIT + +Musics are copyrighted by [Matthew Pablo](http://www.matthewpablo.com/), and licensed under CC-BY 3.0 + +You may not use any art including 2d and 3d from this project for commercial purpose + + +###Sprite3D + + +The Sprite3D code featured in this project can currently load static OBJ model. + +to load a model: +```c++ +auto model = Sprite3D::create("3dmodel.obj", "texture.png"); +``` + +###Toon Shading + +There is no lighting in Cocos2d-x yet. But +To compliment that, we added built-in support for toon-shader, specifically, toon outline: +```c++ +auto model = Sprite3D::create("3dmodel.obj", "texture.png"); +model->setOutline(1.5, Color3B(0,0,0)); // set the outline to be 1.5 point wide, and black +``` + + +###3D API + +3D API are available since Cocos2d-x 3.0 for all Nodes + +```c++ +node->setPosition3D(Vertex3F(x,y,z)); +Vertex3F pos = node->getPosition3D(); + +node->setRotation3D(Vertex3F(x,y,z)); +Vertex3F rot = node->getRotation3D(); //2d rotation is the same as rotating in z axis +``` +3D API are also ported to some actions as well +```c++ +node->runAction(RotateBy::create(Vertex3F(x,y,z))); +``` diff --git a/samples/EarthWarrior3D/Resources/CloseNormal.png b/samples/EarthWarrior3D/Resources/CloseNormal.png new file mode 100755 index 0000000..5657a13 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/CloseNormal.png differ diff --git a/samples/EarthWarrior3D/Resources/CloseSelected.png b/samples/EarthWarrior3D/Resources/CloseSelected.png new file mode 100755 index 0000000..e4c82da Binary files /dev/null and b/samples/EarthWarrior3D/Resources/CloseSelected.png differ diff --git a/samples/EarthWarrior3D/Resources/Flux2.mp3 b/samples/EarthWarrior3D/Resources/Flux2.mp3 new file mode 100755 index 0000000..87d5043 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/Flux2.mp3 differ diff --git a/samples/EarthWarrior3D/Resources/LICENSE_03.png b/samples/EarthWarrior3D/Resources/LICENSE_03.png new file mode 100755 index 0000000..43eb3ec Binary files /dev/null and b/samples/EarthWarrior3D/Resources/LICENSE_03.png differ diff --git a/samples/EarthWarrior3D/Resources/Orbital Colossus_0.mp3 b/samples/EarthWarrior3D/Resources/Orbital Colossus_0.mp3 new file mode 100755 index 0000000..eb7dbb0 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/Orbital Colossus_0.mp3 differ diff --git a/samples/EarthWarrior3D/Resources/Particle.plist b/samples/EarthWarrior3D/Resources/Particle.plist new file mode 100755 index 0000000..a20a1ef --- /dev/null +++ b/samples/EarthWarrior3D/Resources/Particle.plist @@ -0,0 +1,113 @@ + + + + + frames + + defaultTexture.png + + frame + {{143,102},{64,64}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{64,64}} + sourceSize + {64,64} + + engine.jpg + + frame + {{209,129},{25,32}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{25,32}} + sourceSize + {25,32} + + engine2.jpg + + frame + {{209,102},{32,25}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{32,25}} + sourceSize + {32,25} + + toonFlare.png + + frame + {{2,2},{139,127}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{139,127}} + sourceSize + {139,127} + + toonFlare2.png + + frame + {{2,131},{125,125}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{125,125}} + sourceSize + {125,125} + + toonGlow.png + + frame + {{129,168},{120,120}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{120,120}} + sourceSize + {120,120} + + toonSmoke.png + + frame + {{143,2},{110,98}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{110,98}} + sourceSize + {110,98} + + + metadata + + format + 2 + realTextureFileName + Particle.png + size + {255,290} + smartupdate + $TexturePacker:SmartUpdate:9a53de2de5048f80cb6f51c5435ac775:0aa9001dca74ea7885e073f13ec2d231:a81245e6b3ba81a9eb758737b44773a1$ + textureFileName + Particle.png + + + diff --git a/samples/EarthWarrior3D/Resources/Particle.png b/samples/EarthWarrior3D/Resources/Particle.png new file mode 100755 index 0000000..be053ab Binary files /dev/null and b/samples/EarthWarrior3D/Resources/Particle.png differ diff --git a/samples/EarthWarrior3D/Resources/Star_Chaser.mp3 b/samples/EarthWarrior3D/Resources/Star_Chaser.mp3 new file mode 100755 index 0000000..a22265d Binary files /dev/null and b/samples/EarthWarrior3D/Resources/Star_Chaser.mp3 differ diff --git a/samples/EarthWarrior3D/Resources/b1.png b/samples/EarthWarrior3D/Resources/b1.png new file mode 100755 index 0000000..547e1c7 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/b1.png differ diff --git a/samples/EarthWarrior3D/Resources/b2.png b/samples/EarthWarrior3D/Resources/b2.png new file mode 100755 index 0000000..2818054 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/b2.png differ diff --git a/samples/EarthWarrior3D/Resources/boom.mp3 b/samples/EarthWarrior3D/Resources/boom.mp3 new file mode 100755 index 0000000..23c0bd1 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/boom.mp3 differ diff --git a/samples/EarthWarrior3D/Resources/boom2.mp3 b/samples/EarthWarrior3D/Resources/boom2.mp3 new file mode 100755 index 0000000..b5e51a7 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/boom2.mp3 differ diff --git a/samples/EarthWarrior3D/Resources/boss.png b/samples/EarthWarrior3D/Resources/boss.png new file mode 100755 index 0000000..7073a96 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/boss.png differ diff --git a/samples/EarthWarrior3D/Resources/bullets.png b/samples/EarthWarrior3D/Resources/bullets.png new file mode 100755 index 0000000..9836bd2 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/bullets.png differ diff --git a/samples/EarthWarrior3D/Resources/coco.png b/samples/EarthWarrior3D/Resources/coco.png new file mode 100755 index 0000000..a7e368f Binary files /dev/null and b/samples/EarthWarrior3D/Resources/coco.png differ diff --git a/samples/EarthWarrior3D/Resources/credits_03.png b/samples/EarthWarrior3D/Resources/credits_03.png new file mode 100755 index 0000000..4cf8e73 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/credits_03.png differ diff --git a/samples/EarthWarrior3D/Resources/daodan_32.png b/samples/EarthWarrior3D/Resources/daodan_32.png new file mode 100755 index 0000000..edf1e98 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/daodan_32.png differ diff --git a/samples/EarthWarrior3D/Resources/debris.plist b/samples/EarthWarrior3D/Resources/debris.plist new file mode 100755 index 0000000..a0b3be1 --- /dev/null +++ b/samples/EarthWarrior3D/Resources/debris.plist @@ -0,0 +1,116 @@ + + + + + angle + 0 + angleVariance + 180 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + debris + duration + 0.01 + emitterType + 0 + finishColorAlpha + 1 + finishColorBlue + 0.3294117748737335 + finishColorGreen + 0.5843137502670288 + finishColorRed + 0.9725490808486938 + finishColorVarianceAlpha + 0 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 0 + finishParticleSizeVariance + 0 + gravityx + 0 + gravityy + 0 + maxParticles + 2000 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 1 + particleLifespanVariance + 0.1 + radialAccelVariance + 0 + radialAcceleration + 120 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 2507.94091796875 + rotationStart + 0 + rotationStartVariance + 0 + sourcePositionVariancex + 7 + sourcePositionVariancey + 7 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 70 + speedVariance + 40 + startColorAlpha + 1 + startColorBlue + 0.3294117748737335 + startColorGreen + 0.5843137502670288 + startColorRed + 0.9725490808486938 + startColorVarianceAlpha + 0 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 30.13698577880859 + startParticleSizeVariance + 24.49315071105957 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + debris.png + textureImageData + H4sIAAAAAAAAA+2dB3xUZdq+z0wqKUAKHUKAQGgBQk1AICFAKIEAoYUihCQkAVIICaF36U16R4r0JkgVkCqiSFNBxQIioqvr4rqoq67+r8yz83pyJkF2v/3/SDD39/vY45Rz5lzv/d7P856ZzHTqpNXUtMN+WqEKVahCFapQhSpUoQpVqEL9r2XKTU/6RT2FypWz2arCUfjfKlfIj6NC/v+FHkHbziL73MTtj+D/pM8pvysv2oB1sMrJycnZ2bmIRc5WOTo6yr0yBIZRKISfl2wdrqcNajc3t6JFixYrVszT09PLy8vbKrY9PDyKFy/u7u7OYxgLGQLbKVAI36C8gGNjSIIatiVLlixbtmyFChV8fHx8fX0rW1SpUiW2K1asyO3cW6pUKQaCxzMEir8efmHsiB4NHBtDsnz58rD18/OrXr16rVq1AgICAgMDG1jFdp06dWrXrl2jRo2qVasyEDy+dOnS8Gd2uLi45AX/SZ/6E5OBuR44SQI6jF2lShV41qtXr1GjRsHBwS1atAgNDQ0LC2tjVevWrbmF25s1a9a4cWNGgaGBPyOF/0uUKKHg62PnT0tez1xMrnc4oQE6PFy/fn1oAzY8PLxjx45du3bt0aNHr169+ljVu3dvbunWrVunTp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fu4/McbP6nxyd7bjW+fuNP6zqVPoz69dTf27lefjfjsl3vTPnf/fNn9ive3f1H/i+Nftv3y6l/6/uXeV2lf/fz19L96/HXNN9W/eflvIX+79KD3g3vfpn/729/nflfmu63/aPiPMw+7PPz4++Tvf/5h9o9lftz2z6B/Xvip10/3f876xemXFf+q8a9jv3b89cPfkn/77f8BQ84SDBrEAAA= + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/Resources/diji02_v002_128.png b/samples/EarthWarrior3D/Resources/diji02_v002_128.png new file mode 100755 index 0000000..1c75b23 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/diji02_v002_128.png differ diff --git a/samples/EarthWarrior3D/Resources/dijiyuanv001.png b/samples/EarthWarrior3D/Resources/dijiyuanv001.png new file mode 100755 index 0000000..f8cb9c5 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/dijiyuanv001.png differ diff --git a/samples/EarthWarrior3D/Resources/emission.plist b/samples/EarthWarrior3D/Resources/emission.plist new file mode 100755 index 0000000..dd64ba6 --- /dev/null +++ b/samples/EarthWarrior3D/Resources/emission.plist @@ -0,0 +1,112 @@ + + + + + angle + 90 + angleVariance + 0 + blendFuncDestination + 771 + blendFuncSource + 1 + configName + emission + duration + -1 + emitterType + 0 + finishColorAlpha + 0.5 + finishColorBlue + 0.2 + finishColorGreen + 0.2 + finishColorRed + 0.2 + finishColorVarianceAlpha + 1 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 6 + finishParticleSizeVariance + 5.6301383972168 + gravityx + 0 + gravityy + 0 + maxParticles + 20 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 0.12046928524971 + particleLifespanVariance + 0.0591566780209541 + radialAccelVariance + 0 + radialAcceleration + 0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 0 + sourcePositionVariancex + 7 + sourcePositionVariancey + 0 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 600 + speedVariance + 26.32705497741699 + startColorAlpha + 1 + startColorBlue + 0 + startColorGreen + 0.681643104553223 + startColorRed + 1 + startColorVarianceAlpha + 0 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 18.5890407562256 + startParticleSizeVariance + 10 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/Resources/emissionPart.plist b/samples/EarthWarrior3D/Resources/emissionPart.plist new file mode 100755 index 0000000..b6e9258 --- /dev/null +++ b/samples/EarthWarrior3D/Resources/emissionPart.plist @@ -0,0 +1,114 @@ + + + + + angle + 90 + angleVariance + 74.1731338500977 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + emissionPart + duration + -1 + emitterType + 0 + finishColorAlpha + 0 + finishColorBlue + 1 + finishColorGreen + 0.982483446598053 + finishColorRed + 0 + finishColorVarianceAlpha + 0 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 0 + finishParticleSizeVariance + 0 + gravityy + 0 + maxParticles + 100 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 1 + particleLifespanVariance + 0 + radialAccelVariance + 0 + radialAcceleration + 250 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 0 + sourcePositionVariancex + 5 + sourcePositionVariancey + 5 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 225 + speedVariance + 30 + startColorAlpha + 1 + startColorBlue + 1 + startColorGreen + 0.982483446598053 + startColorRed + 0 + startColorVarianceAlpha + 0 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 2 + startParticleSizeVariance + 5 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + emissionPart.png + textureImageData + H4sIAAAAAAAAA+1bB1RURxd+byu9g1RZpINUpVtoKoiKIqJYorisdESqLRINkihGjSHEFo0EC/ZoRCRWLMRoFHuPEIMlNizY4/5z3fvic7MrmJic84vr+Tjj7My997tt5i1L796UE0UFqlD/wUsqldJvgv/CJrTr35KrjBunGfyn/nib/FvIldsMmvXJWzOYejv8X8OZzYsnB74c5N9X5pO36od/wl8Jb3m+DD8BQtgMmHXyfpH3xVvxw9/h3wLe8nxVCFQRaiyoI9hzzDoVBf546354U/4t5M3mzPDUINAk0CLQVgItXKPB8ou8L17rh3+TvxLu8rwZzgxf4KVDoEugR6BPYEBgKAcDfE8P1+rgXsYfjC8U+eFv+6Al/BXkOzvminhrof16yMuIwJjAhMCUwIzAnMACYY5zprjGGPcYoAwdlKnID/K58Eb10Bz/FsRcRY63LsaR4WyGHC0JrAisCWwIbOVgg+9Z4VoL3Mv4Qh9ls/2g8k9zoYX8FXFnYq6OOarD4m2CMbVETsDPgcCJoD2BK4EbgTvCDefa4xoH3GONMsxRJuMHHdSpzsoFhT74J/ylf815ee4QB23MUUMWbxHG0wE5AT9PAi8CXwJ/ggA5+ON7XrjWDfc6oCwRyw+GqFMbbVDmg2ZzQBn/Zrgz+a7NirkZxgpsdSRwQR7eyK0LQRBBKEF3gjCCcEQYzoXimi64xxtluKBMG9RhxsoFxgdqf8cHivi3kDuT78YYF6hbe4wZ2OxD0JkgmKAHQQRBJEEUQTRBDMFARAzOReGaCNwTjDJ8UGZ71GGFOo2lL+vhb/ngNfzZNS+f82zu0KesMT5uGLNOBCEY20jkFkswjCCOQEwgIRiFkOBcHK6JxT2RKCMEZXqjDkfUaaHAB+xaaLYXyPNXEnuB9NV6Z7i3lcpyEnqWh1RWv4EYuz4EAwiGEowkSCBIJcggyCLIIchF5OBcBq5JwD1DUUYflBmIOjxQpw3awPiA3Q/YZ6PSHFDCX547nDPqctwtUL+zVJabUK+Qr5C7/QmGYEyTCcYg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4kjJwecPH1q6Km60/Gnr55JPXPnbO7Zp+c+Os8/P/2CzoWSX8x/Kb3oeHFdnXfdtvrQ+oO/9v/13CXxpeu/Zf32rKHgsublkiuWV8qvel7deq37tdrfh/zecD3j+tMbhTd1by685XDr+9uBtw82DmpsuJN5R3p3xj2Te8vvd7xf3dS36ZcHaQ+ePpz+yOTRise+j2ueDHxy5WneM+GzuX84/lH1POL5eWmaVPo/LX7Mrg5NAAA= + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/Resources/engine.plist b/samples/EarthWarrior3D/Resources/engine.plist new file mode 100755 index 0000000..c16fd2d --- /dev/null +++ b/samples/EarthWarrior3D/Resources/engine.plist @@ -0,0 +1,116 @@ + + + + + angle + 90 + angleVariance + 0 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + engine + duration + -1 + emitterType + 0 + finishColorAlpha + 1 + finishColorBlue + 1 + finishColorGreen + 0.6765730977058411 + finishColorRed + 0 + finishColorVarianceAlpha + 0 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 44 + finishParticleSizeVariance + 0 + gravityx + 0 + gravityy + 0 + maxParticles + 4 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 0.1 + particleLifespanVariance + 0.02 + radialAccelVariance + 0 + radialAcceleration + 0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 0 + sourcePositionVariancex + 2 + sourcePositionVariancey + 0 + sourcePositionx + 160 + sourcePositiony + 240 + speed + 450 + speedVariance + 0 + startColorAlpha + 1 + startColorBlue + 0.1147350147366524 + startColorGreen + 0.1511431336402893 + startColorRed + 1 + startColorVarianceAlpha + 0 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 64 + startParticleSizeVariance + 5 + tangentialAccelVariance + 0 + tangentialAcce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nnT14YdOHcxYyL310acanju/zv7l4uufzblZorL65Ou0Zcq78uvt58Q31j7feu32/rCOz48mbMzVM/pP1w9Zbx1v1/Vf7r5e1ZPwp+bL6ju9Ny1+/u3ntx987+NPyn2/fL7794UPez5OcVv7j88vmvkb+e6hzaefu3it+6fm98qHq48Q//Pw4+GvzoxuPSxy+e1D9VPd30LPjZsedZz++8qH1JvVzyyvVV2+vE19e6Sru6/gdwzHodXhYAAA== + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/Resources/explodeEffect.mp3 b/samples/EarthWarrior3D/Resources/explodeEffect.mp3 new file mode 100755 index 0000000..6c48679 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/explodeEffect.mp3 differ diff --git a/samples/EarthWarrior3D/Resources/f1.png b/samples/EarthWarrior3D/Resources/f1.png new file mode 100755 index 0000000..4fd7bdb Binary files /dev/null and b/samples/EarthWarrior3D/Resources/f1.png differ diff --git a/samples/EarthWarrior3D/Resources/f2.png b/samples/EarthWarrior3D/Resources/f2.png new file mode 100755 index 0000000..e752eda Binary files /dev/null and b/samples/EarthWarrior3D/Resources/f2.png differ diff --git a/samples/EarthWarrior3D/Resources/flare.plist b/samples/EarthWarrior3D/Resources/flare.plist new file mode 100755 index 0000000..5f5dea9 --- /dev/null +++ b/samples/EarthWarrior3D/Resources/flare.plist @@ -0,0 +1,116 @@ + + + + + angle + 0 + angleVariance + 0 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + flare + duration + 0.01 + emitterType + 0 + finishColorAlpha + 0 + finishColorBlue + 1 + finishColorGreen + 1 + finishColorRed + 0.9999960064888 + finishColorVarianceAlpha + 1 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 0 + finishParticleSizeVariance + 0 + gravityx + 0 + gravityy + 0 + maxParticles + 1316.673828125 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 0.6 + particleLifespanVariance + 0.158187055587769 + radialAccelVariance + 0 + radialAcceleration + 0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 65.10166931152344 + sourcePositionVariancex + 0 + sourcePositionVariancey + 0 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 0 + speedVariance + 0 + startColorAlpha + 1 + startColorBlue + 0.3294117748737335 + startColorGreen + 0.5843137502670288 + startColorRed + 0.9725490808486938 + startColorVarianceAlpha + 1 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 100 + startParticleSizeVariance + 50 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + flare.png + textureImageData + H4sIAAAAAAAAA+2dB3xUVdrG70waBEJL6C30joB0pNfQexOVkFBCCSE0QRREFhVYUUREUFFURFCsFLEjVlgERLCL67Lq6rq4rr3MN/+LTzzebyaZhCQzCeDvODczt5x73uc87/O+59xzBwywGlqu2Pcty/KcL+eLisvl+lMJdn3Ol9As53FyvmRVhA23222X81g5X3wVJ06EFX/7Bru+ed0Owa5HqBYnRrLilMLOOYX53nIDJ2FhYXbJilOElcKMl8J6X7mBE0p4eHgGVrJqJ18cFOx7yYs2KUz3lRvtkR0+8Xd8YeOY81j5s52xcUREhCcyMjJgPvF3DjipMOHF7APBrkuwcSKfA06Eleza2KlzsstN+XnPOcGKif9g30OwcEIbwAXig+xyiq9zmudVG4dKO+f0vs6mXQpykU2xZVRUlF3Yzo32yMtz59a9Z7cO1Bu+5T7OJT9k8gn3X6xYMU90dHSucqzzGiZvBRsvqlt26iDscy/Brn9+FekJ6RIV9ZfcbANTv3ANk2OCqXtzEgPLB2Wm5QrLmJnqr/stWbKkJyYmxt7Oy75u+iP4i+uaeAlWH3XG9oHcB3UuVapUBrcUVqzILvI5cXFxtt3yg1N96RdKXuM0qzopVgsUK+yrejuxYmKkoOYKTN3AfYITlZzGxmdbD64Lp9FH0Ul54f8CKdnh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itdX3nu1Y6vPv1a+9eefL3t67sPtD6w62Crgzv/1upvOw+1PrTrjTZv7Dnc7vDeIxcdefZo56MvvNnjzZePJRw78NbAt44cH3H87RPjTpx8O/ntz96Z/s7X78579+f3lrwf8f6KD0p9sO7DKh9u/qjBRw+fbH3ymY97fHzw78P+/t4nSZ988Y/Z//jl1LJ/xvxz3afVP33gsxafPf15r88P/+vif536Iu2Ln79c/u/S/779q/pfPfGfLv85eHr06VNfp3/t+e+qbyp+c///Wv5v37eDv/3wuxnf/fz9ih8q/rD1x7Y/vvLTqJ8+/Xn+L1G/rP+1wa97f+v32/ueGR5PWmJ6oi0FiAjckyZZ1n/vt6yYMZYVe9iyokuc0cP2P9cZDW+diUb8bJ/RzPa/1pa1pYtljXjesvossayNaBDvdhlvQRoN72K5L7wwo/z+b/akC1ucOVdxr6qM+MHj+aaqZUXttaxf0z2en+/weH6911vZdyzr+VlndDj/+jexrMi/dO/fosWBYZdPtBz//g/xLTIKXiEBAA== + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/Resources/fonts/Marker Felt.ttf b/samples/EarthWarrior3D/Resources/fonts/Marker Felt.ttf new file mode 100755 index 0000000..3752ef3 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/fonts/Marker Felt.ttf differ diff --git a/samples/EarthWarrior3D/Resources/gameover.plist b/samples/EarthWarrior3D/Resources/gameover.plist new file mode 100755 index 0000000..77c1282 --- /dev/null +++ b/samples/EarthWarrior3D/Resources/gameover.plist @@ -0,0 +1,113 @@ + + + + + frames + + H_Frame.png + + frame + {{2,380},{640,90}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{640,90}} + sourceSize + {640,90} + + V_Frame.png + + frame + {{2,2},{40,960}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{40,960}} + sourceSize + {40,960} + + flash.png + + frame + {{644,336},{110,103}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{110,103}} + sourceSize + {110,103} + + gameover_backtomenu.png + + frame + {{460,103},{232,93}} + offset + {-1,1} + rotated + + sourceColorRect + {{0,0},{232,93}} + sourceSize + {234,95} + + gameover_playagain.png + + frame + {{555,103},{231,93}} + offset + {5,1} + rotated + + sourceColorRect + {{13,0},{231,93}} + sourceSize + {247,95} + + gameover_score.png + + frame + {{644,44},{250,57}} + offset + {4,0} + rotated + + sourceColorRect + {{9,2},{250,57}} + sourceSize + {260,61} + + gameover_score_bk.png + + frame + {{2,44},{456,334}} + offset + {6,-2} + rotated + + sourceColorRect + {{18,22},{456,334}} + sourceSize + {480,374} + + + metadata + + format + 2 + realTextureFileName + gameover.png + size + {964,472} + smartupdate + $TexturePacker:SmartUpdate:11f2668da9d0917be2363861ecec2d64:e8003d57058ca2add3fb600b1ef3b73c:18314cdd2091d1ee52f21fb1c615ddab$ + textureFileName + gameover.png + + + diff --git a/samples/EarthWarrior3D/Resources/gameover.png b/samples/EarthWarrior3D/Resources/gameover.png new file mode 100755 index 0000000..9aa5cd0 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/gameover.png differ diff --git a/samples/EarthWarrior3D/Resources/gameover_score_num.fnt b/samples/EarthWarrior3D/Resources/gameover_score_num.fnt new file mode 100755 index 0000000..7685924 --- /dev/null +++ b/samples/EarthWarrior3D/Resources/gameover_score_num.fnt @@ -0,0 +1,14 @@ +info face="Arial" size=32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 outline=0 +common lineHeight=32 base=26 scaleW=256 scaleH=256 pages=1 packed=0 alphaChnl=1 redChnl=0 greenChnl=0 blueChnl=0 +page id=0 file="gameover_score_num_0.png" +chars count=10 +char id=48 x=0 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=49 x=35 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=50 x=70 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=51 x=105 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=52 x=140 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=53 x=175 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=54 x=210 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=55 x=0 y=38 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=56 x=35 y=38 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=57 x=70 y=38 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 diff --git a/samples/EarthWarrior3D/Resources/gameover_score_num_0.png b/samples/EarthWarrior3D/Resources/gameover_score_num_0.png new file mode 100755 index 0000000..f4e0dc0 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/gameover_score_num_0.png differ diff --git a/samples/EarthWarrior3D/Resources/glow.plist b/samples/EarthWarrior3D/Resources/glow.plist new file mode 100755 index 0000000..407c5b0 --- /dev/null +++ b/samples/EarthWarrior3D/Resources/glow.plist @@ -0,0 +1,116 @@ + + + + + angle + 0 + angleVariance + 0 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + glow + duration + 0.01 + emitterType + 0 + finishColorAlpha + 0 + finishColorBlue + 0.3294117748737335 + finishColorGreen + 0.5843137502670288 + finishColorRed + 0.9725490808486938 + finishColorVarianceAlpha + 0 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 218.75341796875 + finishParticleSizeVariance + 0 + gravityx + 0 + gravityy + 0 + maxParticles + 144.3172149658203 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 0.4 + particleLifespanVariance + 0.1 + radialAccelVariance + 0 + radialAcceleration + 0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 319.0068359375 + rotationStart + 0 + rotationStartVariance + 29.20376586914062 + sourcePositionVariancex + 0 + sourcePositionVariancey + 0 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 0 + speedVariance + 0 + startColorAlpha + 1 + startColorBlue + 0.3294117748737335 + startColorGreen + 0.5843137502670288 + startColorRed + 0.9725490808486938 + startColorVarianceAlpha + 0 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 116 + startParticleSizeVariance + 73.08219146728516 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + glow.png + textureImageData + H4sIAAAAAAAAA+2dB3wU1drGZzedJJQkhA6h19BL6L2D9CotJAFCCSEkdAUUUcoFpBcRQQQCCIh0EKlSpUlRmiAiIKggUgTE78k8N+89zG6W3SUQ9OO9v7uebDazM//zzPO+58yZoXFjrZCmLdmrvYpX8Spexat4Fa/inxAmm5HSe/fPC9s87Y+UPo6XLpIL7CvmlvEC2P6/Be40HPOTIW++Ym4Zz8jW0fh/CPx5I00u4CnNyclIWbzOMU9pZg7HS4XXMv4FwF9ywob4x6G2LY9kYeJiEcmyWXPStFMaqpVIXsKWSJ2Ifx/tZyecFCs3JVwtwu3JwDv8EzacY/5y0n52GatIhY+QdLcjDKjVTnFa5C8V7WchbBCtygev9uC1h7/0lxO0XxLOTkO2SjhZwNoDXD1rnKOdspAdwivO8FREnp6eXnaHh4eHndgd0nZKCdtRyIakZoOwJVVvb29fPXwSA++kSiLsx24Q9lOZv3jUDkE2WATDBmGwAklSJd7UqVOnSQy0+Y4hpBf4W/nRQN6A3TJv2tb2C+NstU/thGzDhIUwIatgGenSpfP39/fz80ubNi3fSftkqB/Gj/i8dIoqftsiFzNJcdROQLbhEmIRhAAgJAxQQpWEAwIC0usRoId/EoE/YQOfkU4hbTkL0MB3WUWtqjqlaDtEWCDb1rDgVTVMVqRKaGhkcDACAwPZHdhaOiVIHt+YlKqdRv2cONsJ2baGDRYBCMACqqBk4JYxY8bMemTKlClj0sFP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r4F+bHjd8fPbvPn///X9z/R6JvrUAAA== + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/Resources/groundLevel.jpg b/samples/EarthWarrior3D/Resources/groundLevel.jpg new file mode 100755 index 0000000..8c84ed4 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/groundLevel.jpg differ diff --git a/samples/EarthWarrior3D/Resources/hit.mp3 b/samples/EarthWarrior3D/Resources/hit.mp3 new file mode 100755 index 0000000..da48311 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/hit.mp3 differ diff --git a/samples/EarthWarrior3D/Resources/loadingAndHP.plist b/samples/EarthWarrior3D/Resources/loadingAndHP.plist new file mode 100755 index 0000000..d1bd8b9 --- /dev/null +++ b/samples/EarthWarrior3D/Resources/loadingAndHP.plist @@ -0,0 +1,126 @@ + + + + + frames + + fog.png + + frame + {{644,391},{10,570}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{10,570}} + sourceSize + {10,570} + + hp.png + + frame + {{851,2},{60,205}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{60,205}} + sourceSize + {60,205} + + hp_above.png + + frame + {{644,2},{60,205}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{60,205}} + sourceSize + {60,205} + + hp_empty.png + + frame + {{656,480},{116,317}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{116,317}} + sourceSize + {116,317} + + loading_bk.png + + frame + {{2,2},{640,963}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{640,963}} + sourceSize + {640,963} + + loading_progress_bk.png + + frame + {{850,209},{694,72}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{694,72}} + sourceSize + {694,72} + + loading_progress_thumb.png + + frame + {{656,391},{136,87}} + offset + {0,33} + rotated + + sourceColorRect + {{0,9},{136,87}} + sourceSize + {136,171} + + right_top_ui.png + + frame + {{644,64},{204,325}} + offset + {0,3} + rotated + + sourceColorRect + {{0,0},{204,325}} + sourceSize + {204,331} + + + metadata + + format + 2 + realTextureFileName + loadingAndHP.png + size + {924,967} + smartupdate + $TexturePacker:SmartUpdate:8bfd7f3339041af832a641e3dff393bc:19bdda24356f17c17fe67fedafee3eed:c7075d6d293b33f3dbac134af37823d9$ + textureFileName + loadingAndHP.png + + + diff --git a/samples/EarthWarrior3D/Resources/loadingAndHP.png b/samples/EarthWarrior3D/Resources/loadingAndHP.png new file mode 100755 index 0000000..9f8fb0e Binary files /dev/null and b/samples/EarthWarrior3D/Resources/loadingAndHP.png differ diff --git a/samples/EarthWarrior3D/Resources/menuEmission.plist b/samples/EarthWarrior3D/Resources/menuEmission.plist new file mode 100755 index 0000000..e02feca --- /dev/null +++ b/samples/EarthWarrior3D/Resources/menuEmission.plist @@ -0,0 +1,116 @@ + + + + + angle + 40 + angleVariance + 0 + blendFuncDestination + 1 + blendFuncSource + 771 + configName + Untitled 1 + duration + -1 + emitterType + 0 + finishColorAlpha + 0 + finishColorBlue + 0 + finishColorGreen + 0 + finishColorRed + 0 + finishColorVarianceAlpha + 0 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 0 + finishParticleSizeVariance + 0 + gravityx + 0 + gravityy + 0 + maxParticles + 10.54152393341064 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 1 + particleLifespanVariance + 0 + radialAccelVariance + 0 + radialAcceleration + 0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 0 + sourcePositionVariancex + 0 + sourcePositionVariancey + 0 + sourcePositionx + 160 + sourcePositiony + 240 + speed + 50 + speedVariance + 0 + startColorAlpha + 0.5 + startColorBlue + 0.8382235169410706 + startColorGreen + 0.5797151327133179 + startColorRed + 0.4444800615310669 + startColorVarianceAlpha + 0.5052975416183472 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 64 + startParticleSizeVariance + 5 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + defaultTexture.png + textureImageData + H4sIAAAAAAAAA+1bB1RURxd+byu9g1RZpINUpVtoKoiKIqJYorisdESqLRINkihGjSHEFo0EC/ZoRCRWLMRoFHuPEIMlNizY4/5z3fvic7MrmJic84vr+Tjj7My997tt5i1L796UE0UFqlD/wUsqldJvgv/CJrTr35KrjBunGfyn/nib/FvIldsMmvXJWzOYejv8X8OZzYsnB74c5N9X5pO36od/wl8Jb3m+DD8BQtgMmHXyfpH3xVvxw9/h3wLe8nxVCFQRaiyoI9hzzDoVBf546354U/4t5M3mzPDUINAk0CLQVgItXKPB8ou8L17rh3+TvxLu8rwZzgxf4KVDoEugR6BPYEBgKAcDfE8P1+rgXsYfjC8U+eFv+6Al/BXkOzvminhrof16yMuIwJjAhMCUwIzAnMACYY5zprjGGPcYoAwdlKnID/K58Eb10Bz/FsRcRY63LsaR4WyGHC0JrAisCWwIbOVgg+9Z4VoL3Mv4Qh9ls/2g8k9zoYX8FXFnYq6OOarD4m2CMbVETsDPgcCJoD2BK4EbgTvCDefa4xoH3GONMsxRJuMHHdSpzsoFhT74J/ylf815ee4QB23MUUMWbxHG0wE5AT9PAi8CXwJ/ggA5+ON7XrjWDfc6oCwRyw+GqFMbbVDmg2ZzQBn/Zrgz+a7NirkZxgpsdSRwQR7eyK0LQRBBKEF3gjCCcEQYzoXimi64xxtluKBMG9RhxsoFxgdqf8cHivi3kDuT78YYF6hbe4wZ2OxD0JkgmKAHQQRBJEEUQTRBDMFARAzOReGaCNwTjDJ8UGZ71GGFOo2lL+vhb/ngNfzZNS+f82zu0KesMT5uGLNOBCEY20jkFkswjCCOQEwgIRiFkOBcHK6JxT2RKCMEZXqjDkfUaaHAB+xaaLYXyPNXEnuB9NV6Z7i3lcpyEnqWh1RWv4EYuz4EAwiGEowkSCBIJcggyCLIIchF5OBcBq5JwD1DUUYflBmIOjxQpw3awPiA3Q/YZ6PSHFDCX547nDPqctwtUL+z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WRTke2H+16dNex0GP7jocfP3Ciz4kjJwecPH1q6Km60/Gnr55JPXPnbO7Zp+c+Os8/P/2CzoWSX8x/Kb3oeHFdnXfdtvrQ+oO/9v/13CXxpeu/Zf32rKHgsublkiuWV8qvel7deq37tdrfh/zecD3j+tMbhTd1by685XDr+9uBtw82DmpsuJN5R3p3xj2Te8vvd7xf3dS36ZcHaQ+ePpz+yOTRise+j2ueDHxy5WneM+GzuX84/lH1POL5eWmaVPo/LX7Mrg5NAAA= + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/Resources/menu_scene.plist b/samples/EarthWarrior3D/Resources/menu_scene.plist new file mode 100755 index 0000000..1b99254 --- /dev/null +++ b/samples/EarthWarrior3D/Resources/menu_scene.plist @@ -0,0 +1,74 @@ + + + + + frames + + credits.png + + frame + {{436,645},{215,90}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{215,90}} + sourceSize + {215,90} + + license.png + + frame + {{219,645},{215,90}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{215,90}} + sourceSize + {215,90} + + mainmenu_BG.png + + frame + {{2,2},{641,964}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{641,964}} + sourceSize + {641,964} + + start_game.png + + frame + {{2,645},{215,90}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{215,90}} + sourceSize + {215,90} + + + metadata + + format + 2 + realTextureFileName + menu_scene.png + size + {968,737} + smartupdate + $TexturePacker:SmartUpdate:db555b7f132f8136b7898992ccf55fb8:1cac3d4496c65b08a797fffbdefaa627:f7a06ab55076f34b936dd5f32b31eb72$ + textureFileName + menu_scene.png + + + diff --git a/samples/EarthWarrior3D/Resources/menu_scene.png b/samples/EarthWarrior3D/Resources/menu_scene.png new file mode 100755 index 0000000..4c22fce Binary files /dev/null and b/samples/EarthWarrior3D/Resources/menu_scene.png differ diff --git a/samples/EarthWarrior3D/Resources/missileFlare.plist b/samples/EarthWarrior3D/Resources/missileFlare.plist new file mode 100755 index 0000000..903d620 --- /dev/null +++ b/samples/EarthWarrior3D/Resources/missileFlare.plist @@ -0,0 +1,116 @@ + + + + + angle + 0 + angleVariance + 0 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + missileFlare + duration + -1 + emitterType + 0 + finishColorAlpha + 1 + finishColorBlue + 0.4078431725502014 + finishColorGreen + 0.658823549747467 + finishColorRed + 0.9647059440612793 + finishColorVarianceAlpha + 1 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 14.76712322235107 + finishParticleSizeVariance + 35.52054595947266 + gravityx + 0 + gravityy + 0 + maxParticles + 5 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 0.3673266470432281 + particleLifespanVariance + 0 + radialAccelVariance + 0 + radialAcceleration + 0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 65.10166931152344 + sourcePositionVariancex + 0 + sourcePositionVariancey + 0 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 0 + speedVariance + 0 + startColorAlpha + 1 + startColorBlue + 0.4011987745761871 + startColorGreen + 0.6524861454963684 + startColorRed + 0.9845572113990784 + startColorVarianceAlpha + 1 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 26.98630142211914 + startParticleSizeVariance + 23.47945213317871 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + missileFlare.png + textureImageData + H4sIAAAAAAAAA+2dB3xUVdrG70waBEJL6C30joB0pNfQexOVkFBCCSE0QRREFhVYUUREUFFURFCsFLEjVlgERLCL67Lq6rq4rr3MN/+LTzzebyaZhCQzCeDvODczt5x73uc87/O+59xzBwywGlqu2Pcty/KcL+eLisvl+lMJdn3Ol9As53FyvmRVhA23222X81g5X3wVJ06EFX/7Bru+ed0Owa5HqBYnRrLilMLOOYX53nIDJ2FhYXbJilOElcK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h2k3XhV+Xct2h6y+8/rbrf1uRvOL1lc1Wrlv5y6qkVa//tflf1//Vc8OkGw6tbr36zhsjb0y98fhNnW/auqb0moVrPrl5wM271savXbH2f7dcdstr61qu23Rr9K1zbz25vv/6PbfVvu3G237ZMGXDWxu7bXz49iq3X3/793ck33H0zi537thUddPKTT/dlXLX23f3vnvX5rqb190Tec+8e/5578h7X7mv7X0PbKm0ZeWWX+9Pvf/k1qFb9z/Q5oEHtlXZtnq7e/vc7Z8/OO7Bww/1eGjPjiY77n643MMrH7EemfvIvx4d/+jxx/o9tu/xto/veKLOE7fvjN25Ypdr14Jdp3dP2X1yz5g9R57s++S+vR327nyq6VP3P13j6Y3PlH1m9bPRzy571vPcwue+fT7t+S9fmPzCJ/su2/fei6NfPLZ/yP5DL/V76dWXe7384itdX3nu1Y6vPv1a+9eefL3t67sPtD6w62Crgzv/1upvOw+1PrTrjTZv7Dnc7vDeIxcdefZo56MvvNnjzZePJRw78NbAt44cH3H87RPjTpx8O/ntz96Z/s7X78579+f3lrwf8f6KD0p9sO7DKh9u/qjBRw+fbH3ymY97fHzw78P+/t4nSZ988Y/Z//jl1LJ/xvxz3afVP33gsxafPf15r88P/+vif536Iu2Ln79c/u/S/779q/pfPfGfLv85eHr06VNfp3/t+e+qbyp+c///Wv5v37eDv/3wuxnf/fz9ih8q/rD1x7Y/vvLTqJ8+/Xn+L1G/rP+1wa97f+v32/ueGR5PWmJ6oi0FiAjckyZZ1n/vt6yYMZYVe9iyokuc0cP2P9cZDW+diUb8bJ/RzPa/1pa1pYtljXjesvossayNaBDvdhlvQRoN72K5L7wwo/z+b/akC1ucOVdxr6qM+MHj+aaqZUXttaxf0z2en+/weH6911vZdyzr+VlndDj/+jexrMi/dO/fosWBYZdPtBz//g/xLTIKXiEBAA== + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/Resources/muzzle.png b/samples/EarthWarrior3D/Resources/muzzle.png new file mode 100755 index 0000000..9d6b3b3 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/muzzle.png differ diff --git a/samples/EarthWarrior3D/Resources/num.fnt b/samples/EarthWarrior3D/Resources/num.fnt new file mode 100755 index 0000000..6d530b4 --- /dev/null +++ b/samples/EarthWarrior3D/Resources/num.fnt @@ -0,0 +1,15 @@ +info face="Arial" size=32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 outline=0 +common lineHeight=32 base=26 scaleW=256 scaleH=256 pages=1 packed=0 alphaChnl=1 redChnl=0 greenChnl=0 blueChnl=0 +page id=0 file="num_0.png" +chars count=11 +char id=37 x=0 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=48 x=25 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=49 x=50 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=50 x=75 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=51 x=100 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=52 x=125 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=53 x=150 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=54 x=175 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=55 x=200 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=56 x=225 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=57 x=0 y=35 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 diff --git a/samples/EarthWarrior3D/Resources/num_0.png b/samples/EarthWarrior3D/Resources/num_0.png new file mode 100755 index 0000000..38437a1 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/num_0.png differ diff --git a/samples/EarthWarrior3D/Resources/pkstart.png b/samples/EarthWarrior3D/Resources/pkstart.png new file mode 100755 index 0000000..eca33c0 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/pkstart.png differ diff --git a/samples/EarthWarrior3D/Resources/player_bullet_explosion.png b/samples/EarthWarrior3D/Resources/player_bullet_explosion.png new file mode 100755 index 0000000..d0a97e3 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/player_bullet_explosion.png differ diff --git a/samples/EarthWarrior3D/Resources/playerv002_256.png b/samples/EarthWarrior3D/Resources/playerv002_256.png new file mode 100755 index 0000000..dfe9057 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/playerv002_256.png differ diff --git a/samples/EarthWarrior3D/Resources/potion.jpg b/samples/EarthWarrior3D/Resources/potion.jpg new file mode 100755 index 0000000..a8502a0 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/potion.jpg differ diff --git a/samples/EarthWarrior3D/Resources/potion2.png b/samples/EarthWarrior3D/Resources/potion2.png new file mode 100755 index 0000000..8e095bb Binary files /dev/null and b/samples/EarthWarrior3D/Resources/potion2.png differ diff --git a/samples/EarthWarrior3D/Resources/r1.png b/samples/EarthWarrior3D/Resources/r1.png new file mode 100755 index 0000000..827a772 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/r1.png differ diff --git a/samples/EarthWarrior3D/Resources/r2.png b/samples/EarthWarrior3D/Resources/r2.png new file mode 100755 index 0000000..727a1c6 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/r2.png differ diff --git a/samples/EarthWarrior3D/Resources/score_right_top.png b/samples/EarthWarrior3D/Resources/score_right_top.png new file mode 100755 index 0000000..c203616 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/score_right_top.png differ diff --git a/samples/EarthWarrior3D/Resources/streak.png b/samples/EarthWarrior3D/Resources/streak.png new file mode 100755 index 0000000..9bd8182 Binary files /dev/null and b/samples/EarthWarrior3D/Resources/streak.png differ diff --git a/samples/EarthWarrior3D/Resources/toonSmoke.plist b/samples/EarthWarrior3D/Resources/toonSmoke.plist new file mode 100755 index 0000000..a3adea1 --- /dev/null +++ b/samples/EarthWarrior3D/Resources/toonSmoke.plist @@ -0,0 +1,116 @@ + + + + + angle + 0 + angleVariance + 180 + blendFuncDestination + 771 + blendFuncSource + 1 + configName + toonSmoke + duration + 0.01 + emitterType + 0 + finishColorAlpha + 1 + finishColorBlue + 0.1490601301193237 + finishColorGreen + 0.1490625441074371 + finishColorRed + 0.1490580141544342 + finishColorVarianceAlpha + 0 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 0 + finishParticleSizeVariance + 0 + gravityx + 0 + gravityy + 0 + maxParticles + 1486.301391601562 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 94.9539794921875 + minRadiusVariance + 0 + particleLifespan + 1 + particleLifespanVariance + 0.2 + radialAccelVariance + 0 + radialAcceleration + 110 + rotatePerSecond + 0 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 0 + sourcePositionVariancex + 0 + sourcePositionVariancey + 0 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 123.1806488037109 + speedVariance + 30 + startColorAlpha + 1 + startColorBlue + 0.3294117748737335 + startColorGreen + 0.5843137502670288 + startColorRed + 0.9725490808486938 + startColorVarianceAlpha + 0 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 64 + startParticleSizeVariance + 17.50684928894043 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + toonSmoke.png + textureImageData + H4sIAAAAAAAAA+1dCVxO2Rs+92vf0CJrSWlRsoTKXlqUUNqQNZVKi7TYd4bB2EmLnbHvO4NClGXsO2MypsHwNxljSbj/89y+k2+a0qKV7/U77u1+dz3Pec95z/u855zu3YkpIRtHNWzYkBQl6enpCalp06akXbt2pE2bNv9Kbdu2FbbNmzcn5ubmwnlmZmZCwnX43cLCgpiYmBBra2vSvn174W99fX2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4g7GN4qfH/8+ISjhemLnxB3L6i+buezNcv/lV1bYrNi+Umfl7JXvVgWvurW6y+r9a4zWxK6VXzti7R/rvNel/mj946b1ddfPXv9hQ/iG9I3uG1M2WW3atLn+5nlbRFtitjzZ2m/rpW322w5uN9++eof2jtk7yc6YnX/uGrTrxm6X3Sf2WO/Zvtdw77J9mvtm7ef2j96feSDoQPrBPgcvH+p66MThdof3/dT0pw1HGh5JPFrz6LxjysemHeOTxiS9So5IfnY88PjDEwNP3D3Z++S1lJ4pF065nEo77Xj6ZKptalJah7QjZ9qeOXTW+uyBc5bn9p9vfX7fz61/3nfB8sL+i1YXD15qc+nw5faXj13pdOX4Vfurp685Xzt3vcf1yze8bty62e9m+i3/W49vh95+cWfEney7k+7J3Zv1S41fYu/Xv7/m18a/7ki3TD/6wP7B+d88frv70O/h09+jfn+fMe0PtT9iHzV4tOmxxeMjTxyfXPqz758ZTyOeZj+b/j/1/y17bvJ87182f53P7J2Z8SLyBf/3Dy/rvNzwT6t/Trxye3X/ddjr7Dez3tZ5uzHLOiv1Xa93j7JHvld4H/eh8YfDH10+3uPDeD7CN9JXMAXQQxANGULI3xsIUetDiOYlQpSr5djDgnA5NjzJ6S0UsJ9jMwtiSch6G0K8kglxmkRIImwQuq9BE0wjTxsiol06lsQSNaSlRc69VKlVKfeW51/qEKJwmJAPkTyfvZznP6yjL3ubkOThOXY4pJs5IfLf2XWzsDjnMSqA5JH/A082Cp8utgAA + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/Resources/vanishingPoint.plist b/samples/EarthWarrior3D/Resources/vanishingPoint.plist new file mode 100755 index 0000000..de50d12 --- /dev/null +++ b/samples/EarthWarrior3D/Resources/vanishingPoint.plist @@ -0,0 +1,116 @@ + + + + + angle + 156.7198181152344 + angleVariance + 228.5445098876953 + blendFuncDestination + 771 + blendFuncSource + 1 + configName + Untitled 1 + duration + -1 + emitterType + 1 + finishColorAlpha + 1 + finishColorBlue + 1 + finishColorGreen + 0.9914394021034241 + finishColorRed + 0 + finishColorVarianceAlpha + 0 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 0 + finishParticleSizeVariance + 0 + gravityx + 0 + gravityy + 0 + maxParticles + 317.8510437011719 + maxRadius + 400 + maxRadiusVariance + 302.2260437011719 + minRadius + 0 + minRadiusVariance + 0 + particleLifespan + 1.5 + particleLifespanVariance + 0.61215752363205 + radialAccelVariance + 0 + radialAcceleration + 0 + rotatePerSecond + 0 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 0 + sourcePositionVariancex + 300 + sourcePositionVariancey + 200 + sourcePositionx + 160 + sourcePositiony + 240 + speed + 86.95419311523438 + speedVariance + 56.72089004516602 + startColorAlpha + 1 + startColorBlue + 1 + startColorGreen + 0.9555045962333679 + startColorRed + 0 + startColorVarianceAlpha + 0 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 6 + startParticleSizeVariance + 3 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + defaultTexture.png + textureImageData + H4sIAAAAAAAAA+1bB1RURxd+byu9g1RZpINUpVtoKoiKIqJYorisdESqLRINkihGjSHEFo0EC/ZoRCRWLMRoFHuPEIMlNizY4/5z3fvic7MrmJic84vr+Tjj7My997tt5i1L796UE0UFqlD/wUsqldJvgv/CJrTr35KrjBunGfyn/nib/FvIldsMmvXJWzOYejv8X8OZzYsnB74c5N9X5pO36od/wl8Jb3m+DD8BQtgMmHXyfpH3xVvxw9/h3wLe8nxVCFQRaiyoI9hzzDoVBf546354U/4t5M3mzPDUINAk0CLQVgItXKPB8ou8L17rh3+TvxLu8rwZzgxf4KVDoEugR6BPYEBgKAcDfE8P1+rgXsYfjC8U+eFv+6Al/BXkOzvminhrof16yMuIwJjAhMCUwIzAnMACYY5zprjGGPcYoAwdlKnID/K58Eb10Bz/FsRcRY63LsaR4WyGHC0Jr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HL53AmyCeUD3RauLkifUfBn24ZBI9aeSk6nzr/IL8ho96fLRistrklMk/T3GfMmfK/Y8HflxVYFHwUcGlqT2mrirUKswsPPVJwCeLP+V9mvTpoWkdps2b9nx6/PSfityLSoqezRDP+Okzj8/mfiadOWrmoVnesxbNFsxOn33y866fr5ijO2f8nEtf9P6iolhUPL34/pfDv9xf0rFk8VdqX+V8VTe319zKeTbzZs97Nj9x/okFwQvWLTRfOG3hw6/jvz66KHDR2sUWi4sWP/km6ZvTS3osqSi1Ky35VvBt7reXy2LKapb6Li1fZrqsaNkfy9OX162IWrGn3Ke8fKX5ylmrOKtyVl1bPXR17ZrQNZVrXdYuWWe0rmg9tT5n/e/fjfju5IaIDdUbfTeu/d72+4Wb9DdNr6ArxlU0bk7cXFcZW3lkS88t1VUBVZt+cP1h+VarrQu2GW6btV1te8F26Y7xO5p2Zuy8sSth16Xq4dXndg/afXxPvz2H9kbs/XFf9327a4JqdvzY+cet+/33b/nJ96fNB7wPVBz0OrjpZ6+fNx3yPlRx2OdwZa1fbdWRTke2H+16dNex0GP7jocfP3Ciz4kjJwecPH1q6Km60/Gnr55JPXPnbO7Zp+c+Os8/P/2CzoWSX8x/Kb3oeHFdnXfdtvrQ+oO/9v/13CXxpeu/Zf32rKHgsublkiuWV8qvel7deq37tdrfh/zecD3j+tMbhTd1by685XDr+9uBtw82DmpsuJN5R3p3xj2Te8vvd7xf3dS36ZcHaQ+ePpz+yOTRise+j2ueDHxy5WneM+GzuX84/lH1POL5eWmaVPo/LX7Mrg5NAAA= + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/proj.android/.classpath b/samples/EarthWarrior3D/proj.android/.classpath new file mode 100755 index 0000000..5176974 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/samples/EarthWarrior3D/proj.android/.project b/samples/EarthWarrior3D/proj.android/.project new file mode 100755 index 0000000..639d4c2 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/.project @@ -0,0 +1,65 @@ + + + Moon3D + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + Classes + 2 + COCOS2DX/projects/Moon3D/Classes + + + cocos2dx + 2 + COCOS2DX/cocos2dx + + + extensions + 2 + COCOS2DX/extensions + + + scripting + 2 + COCOS2DX/scripting + + + diff --git a/samples/EarthWarrior3D/proj.android/.settings/org.eclipse.jdt.core.prefs b/samples/EarthWarrior3D/proj.android/.settings/org.eclipse.jdt.core.prefs new file mode 100755 index 0000000..b080d2d --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/samples/EarthWarrior3D/proj.android/AndroidManifest.xml b/samples/EarthWarrior3D/proj.android/AndroidManifest.xml new file mode 100755 index 0000000..c112bdd --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/AndroidManifest.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/EarthWarrior3D/proj.android/README.md b/samples/EarthWarrior3D/proj.android/README.md new file mode 100755 index 0000000..53cb259 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/README.md @@ -0,0 +1,87 @@ +## Prerequisites: + +* Android NDK +* Android SDK **OR** Eclipse ADT Bundle +* Android AVD target installed + +## Building project + +There are two ways of building Android projects. + +1. Eclipse +2. Command Line + +### Import Project in Eclipse + +#### Features: + +1. Complete workflow from Eclipse, including: + * Build C++. + * Clean C++. + * Build and Run whole project. + * Logcat view. + * Debug Java code. + * Javascript editor. + * Project management. +2. True C++ editing, including: + * Code completion. + * Jump to definition. + * Refactoring tools etc. + * Quick open C++ files. + + +#### Setup Eclipse Environment (only once) + + +**NOTE:** This step needs to be done only once to setup the Eclipse environment for cocos2d-x projects. Skip this section if you've done this before. + +1. Download Eclipse ADT bundle from [Google ADT homepage](http://developer.android.com/sdk/index.html) + + **OR** + + Install Eclipse with Java. Add ADT and CDT plugins. + +2. Only for Windows + 1. Install [Cygwin](http://www.cygwin.com/) with make (select make package from the list during the install). + 2. Add `Cygwin\bin` directory to system PATH variable. + 3. Add this line `none /cygdrive cygdrive binary,noacl,posix=0,user 0 0` to `Cygwin\etc\fstab` file. + +3. Set up Variables: + 1. Path Variable `COCOS2DX`: + * Eclipse->Preferences->General->Workspace->**Linked Resources** + * Click **New** button to add a Path Variable `COCOS2DX` pointing to the root cocos2d-x directory. + ![Example](https://lh5.googleusercontent.com/-oPpk9kg3e5w/UUOYlq8n7aI/AAAAAAAAsdQ/zLA4eghBH9U/s400/cocos2d-x-eclipse-vars.png) + + 2. C/C++ Environment Variable `NDK_ROOT`: + * Eclipse->Preferences->C/C++->Build->**Environment**. + * Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. + ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) + * Only for Windows: Add new variables **CYGWIN** with value `nodosfilewarning` and **SHELLOPTS** with value `igncr` + +4. Import libcocos2dx library project: + 1. File->New->Project->Android Project From Existing Code. + 2. Click **Browse** button and open `cocos2d-x/cocos2dx/platform/android/java` directory. + 3. Click **Finish** to add project. + +#### Adding and running from Eclipse + +![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) + +1. File->New->Project->Android Project From Existing Code +2. **Browse** to your project directory. eg: `cocos2d-x/cocos2dx/samples/Cpp/TestCpp/proj.android/` +3. Add the project +4. Click **Run** or **Debug** to compile C++ followed by Java and to run on connected device or emulator. + + +### Running project from Command Line + + $ cd cocos2d-x/samples/Cpp/TestCpp/proj.android/ + $ export NDK_ROOT=/path/to/ndk + $ ./build_native.sh + $ ant debug install + +If the last command results in sdk.dir missing error then do: + + $ android list target + $ android update project -p . -t (id from step 6) + $ android update project -p cocos2d/cocos/2d/platform/android/java/ -t (id from step 6) diff --git a/samples/EarthWarrior3D/proj.android/ant.properties b/samples/EarthWarrior3D/proj.android/ant.properties new file mode 100755 index 0000000..b0971e8 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/ant.properties @@ -0,0 +1,17 @@ +# This file is used to override default values used by the Ant build system. +# +# This file must be checked into Version Control Systems, as it is +# integral to the build system of your project. + +# This file is only used by the Ant script. + +# You can use this to override default values such as +# 'source.dir' for the location of your java source folder and +# 'out.dir' for the location of your output folder. + +# You can also use it define how the release builds are signed by declaring +# the following properties: +# 'key.store' for the location of your keystore and +# 'key.alias' for the name of the key to use. +# The password will be asked during the build when you use the 'release' target. + diff --git a/samples/EarthWarrior3D/proj.android/assets/CloseNormal.png b/samples/EarthWarrior3D/proj.android/assets/CloseNormal.png new file mode 100755 index 0000000..5657a13 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/CloseNormal.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/CloseSelected.png b/samples/EarthWarrior3D/proj.android/assets/CloseSelected.png new file mode 100755 index 0000000..e4c82da Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/CloseSelected.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/Flux2.mp3 b/samples/EarthWarrior3D/proj.android/assets/Flux2.mp3 new file mode 100755 index 0000000..87d5043 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/Flux2.mp3 differ diff --git a/samples/EarthWarrior3D/proj.android/assets/LICENSE_03.png b/samples/EarthWarrior3D/proj.android/assets/LICENSE_03.png new file mode 100755 index 0000000..43eb3ec Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/LICENSE_03.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/Orbital Colossus_0.mp3 b/samples/EarthWarrior3D/proj.android/assets/Orbital Colossus_0.mp3 new file mode 100755 index 0000000..eb7dbb0 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/Orbital Colossus_0.mp3 differ diff --git a/samples/EarthWarrior3D/proj.android/assets/Particle.plist b/samples/EarthWarrior3D/proj.android/assets/Particle.plist new file mode 100755 index 0000000..a20a1ef --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/Particle.plist @@ -0,0 +1,113 @@ + + + + + frames + + defaultTexture.png + + frame + {{143,102},{64,64}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{64,64}} + sourceSize + {64,64} + + engine.jpg + + frame + {{209,129},{25,32}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{25,32}} + sourceSize + {25,32} + + engine2.jpg + + frame + {{209,102},{32,25}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{32,25}} + sourceSize + {32,25} + + toonFlare.png + + frame + {{2,2},{139,127}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{139,127}} + sourceSize + {139,127} + + toonFlare2.png + + frame + {{2,131},{125,125}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{125,125}} + sourceSize + {125,125} + + toonGlow.png + + frame + {{129,168},{120,120}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{120,120}} + sourceSize + {120,120} + + toonSmoke.png + + frame + {{143,2},{110,98}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{110,98}} + sourceSize + {110,98} + + + metadata + + format + 2 + realTextureFileName + Particle.png + size + {255,290} + smartupdate + $TexturePacker:SmartUpdate:9a53de2de5048f80cb6f51c5435ac775:0aa9001dca74ea7885e073f13ec2d231:a81245e6b3ba81a9eb758737b44773a1$ + textureFileName + Particle.png + + + diff --git a/samples/EarthWarrior3D/proj.android/assets/Particle.png b/samples/EarthWarrior3D/proj.android/assets/Particle.png new file mode 100755 index 0000000..be053ab Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/Particle.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/Star_Chaser.mp3 b/samples/EarthWarrior3D/proj.android/assets/Star_Chaser.mp3 new file mode 100755 index 0000000..a22265d Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/Star_Chaser.mp3 differ diff --git a/samples/EarthWarrior3D/proj.android/assets/b1.png b/samples/EarthWarrior3D/proj.android/assets/b1.png new file mode 100755 index 0000000..547e1c7 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/b1.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/b2.png b/samples/EarthWarrior3D/proj.android/assets/b2.png new file mode 100755 index 0000000..2818054 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/b2.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/boom.mp3 b/samples/EarthWarrior3D/proj.android/assets/boom.mp3 new file mode 100755 index 0000000..23c0bd1 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/boom.mp3 differ diff --git a/samples/EarthWarrior3D/proj.android/assets/boom2.mp3 b/samples/EarthWarrior3D/proj.android/assets/boom2.mp3 new file mode 100755 index 0000000..b5e51a7 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/boom2.mp3 differ diff --git a/samples/EarthWarrior3D/proj.android/assets/boss.png b/samples/EarthWarrior3D/proj.android/assets/boss.png new file mode 100755 index 0000000..7073a96 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/boss.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/bullets.png b/samples/EarthWarrior3D/proj.android/assets/bullets.png new file mode 100755 index 0000000..9836bd2 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/bullets.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/coco.png b/samples/EarthWarrior3D/proj.android/assets/coco.png new file mode 100755 index 0000000..a7e368f Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/coco.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/credits_03.png b/samples/EarthWarrior3D/proj.android/assets/credits_03.png new file mode 100755 index 0000000..4cf8e73 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/credits_03.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/daodan_32.png b/samples/EarthWarrior3D/proj.android/assets/daodan_32.png new file mode 100755 index 0000000..edf1e98 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/daodan_32.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/debris.plist b/samples/EarthWarrior3D/proj.android/assets/debris.plist new file mode 100755 index 0000000..a0b3be1 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/debris.plist @@ -0,0 +1,116 @@ + + + + + angle + 0 + angleVariance + 180 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + debris + duration + 0.01 + emitterType + 0 + finishColorAlpha + 1 + finishColorBlue + 0.3294117748737335 + finishColorGreen + 0.5843137502670288 + finishColorRed + 0.9725490808486938 + finishColorVarianceAlpha + 0 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 0 + finishParticleSizeVariance + 0 + gravityx + 0 + gravityy + 0 + maxParticles + 2000 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 1 + particleLifespanVariance + 0.1 + radialAccelVariance + 0 + radialAcceleration + 120 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 2507.94091796875 + rotationStart + 0 + rotationStartVariance + 0 + sourcePositionVariancex + 7 + sourcePositionVariancey + 7 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 70 + speedVariance + 40 + startColorAlpha + 1 + startColorBlue + 0.3294117748737335 + startColorGreen + 0.5843137502670288 + startColorRed + 0.9725490808486938 + startColorVarianceAlpha + 0 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 30.13698577880859 + startParticleSizeVariance + 24.49315071105957 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + debris.png + textureImageData + H4sIAAAAAAAAA+2dB3xUZdq+z0wqKUAKHUKAQGgBQk1AICFAKIEAoYUihCQkAVIICaF36U16R4r0JkgVkCqiSFNBxQIioqvr4rqoq67+r8yz83pyJkF2v/3/SDD39/vY45Rz5lzv/d7P856ZzHTqpNXUtMN+WqEKVahCFapQhSpUoQpVqEL9r2XKTU/6RT2FypWz2arCUfjfKlfIj6NC/v+FHkHbziL73MTtj+D/pM8pvysv2oB1sMrJycnZ2bmIRc5WOTo6yr0yBIZRKISfl2wdrqcNajc3t6JFixYrVszT09PLy8vbKrY9PDyKFy/u7u7OYxgLGQLbKVAI36C8gGNjSIIatiVLlixbtmyFChV8fHx8fX0rW1SpUiW2K1asyO3cW6pUKQaCxzMEir8efmHsiB4NHBtDsnz58rD18/OrXr16rVq1AgICAgMDG1jFdp06dWrXrl2jRo2qVasyEDy+dOnS8Gd2uLi45AX/SZ/6E5OBuR44SQI6jF2lShV41qtXr1GjRsHBwS1atAgNDQ0LC2tjVevWrbmF25s1a9a4cWNGgaGBPyOF/0uUKKHg62PnT0tez1xMrnc4oQE6PFy/fn1oAzY8PLxjx45du3bt0aNHr169+ljVu3dvbunWrVunTp3atWvHKDRv3hz+devW9ff3F/hkFPAldgzk/zzwb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jfjsl3vTPnf/fNn9ive3f1H/i+Nftv3y6l/6/uXeV2lf/fz19L96/HXNN9W/eflvIX+79KD3g3vfpn/729/nflfmu63/aPiPMw+7PPz4++Tvf/5h9o9lftz2z6B/Xvip10/3f876xemXFf+q8a9jv3b89cPfkn/77f8BQ84SDBrEAAA= + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/proj.android/assets/diji02_v002_128.png b/samples/EarthWarrior3D/proj.android/assets/diji02_v002_128.png new file mode 100755 index 0000000..1c75b23 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/diji02_v002_128.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/dijiyuanv001.png b/samples/EarthWarrior3D/proj.android/assets/dijiyuanv001.png new file mode 100755 index 0000000..f8cb9c5 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/dijiyuanv001.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/emission.plist b/samples/EarthWarrior3D/proj.android/assets/emission.plist new file mode 100755 index 0000000..dd64ba6 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/emission.plist @@ -0,0 +1,112 @@ + + + + + angle + 90 + angleVariance + 0 + blendFuncDestination + 771 + blendFuncSource + 1 + configName + emission + duration + -1 + emitterType + 0 + finishColorAlpha + 0.5 + finishColorBlue + 0.2 + finishColorGreen + 0.2 + finishColorRed + 0.2 + finishColorVarianceAlpha + 1 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 6 + finishParticleSizeVariance + 5.6301383972168 + gravityx + 0 + gravityy + 0 + maxParticles + 20 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 0.12046928524971 + particleLifespanVariance + 0.0591566780209541 + radialAccelVariance + 0 + radialAcceleration + 0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 0 + sourcePositionVariancex + 7 + sourcePositionVariancey + 0 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 600 + speedVariance + 26.32705497741699 + startColorAlpha + 1 + startColorBlue + 0 + startColorGreen + 0.681643104553223 + startColorRed + 1 + startColorVarianceAlpha + 0 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 18.5890407562256 + startParticleSizeVariance + 10 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/proj.android/assets/emissionPart.plist b/samples/EarthWarrior3D/proj.android/assets/emissionPart.plist new file mode 100755 index 0000000..b6e9258 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/emissionPart.plist @@ -0,0 +1,114 @@ + + + + + angle + 90 + angleVariance + 74.1731338500977 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + emissionPart + duration + -1 + emitterType + 0 + finishColorAlpha + 0 + finishColorBlue + 1 + finishColorGreen + 0.982483446598053 + finishColorRed + 0 + finishColorVarianceAlpha + 0 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 0 + finishParticleSizeVariance + 0 + gravityy + 0 + maxParticles + 100 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 1 + particleLifespanVariance + 0 + radialAccelVariance + 0 + radialAcceleration + 250 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 0 + sourcePositionVariancex + 5 + sourcePositionVariancey + 5 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 225 + speedVariance + 30 + startColorAlpha + 1 + startColorBlue + 1 + startColorGreen + 0.982483446598053 + startColorRed + 0 + startColorVarianceAlpha + 0 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 2 + startParticleSizeVariance + 5 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + emissionPart.png + textureImageData + H4sIAAAAAAAAA+1bB1RURxd+byu9g1RZpINUpVtoKoiKIqJYorisdESqLRINkihGjSHEFo0EC/ZoRCRWLMRoFHuPEIMlNizY4/5z3fvic7MrmJic84vr+Tjj7My997tt5i1L796UE0UFqlD/wUsqldJvgv/CJrTr35KrjBunGfyn/nib/FvIldsMmvXJWzOYejv8X8OZzYsnB74c5N9X5pO36od/wl8Jb3m+DD8BQtgMmHXyfpH3xVvxw9/h3wLe8nxVCFQRaiyoI9hzzDoVBf546354U/4t5M3mzPDUINAk0CLQVgItXKPB8ou8L17rh3+TvxLu8rwZzgxf4KVDoEugR6BPYEBgKAcDfE8P1+rgXsYfjC8U+eFv+6Al/BXkOzvminhrof16yMuIwJjAhMCUwIzAnMACYY5zprjGGPcYoAwdlKnID/K58Eb10Bz/FsRcRY63LsaR4WyGHC0JrAisCWwIbOVgg+9Z4VoL3Mv4Qh9ls/2g8k9zoYX8FXFnYq6OOarD4m2CMbVETsDPgcCJoD2BK4EbgTvCDefa4xoH3GONMsxRJuMHHdSpzsoFhT74J/ylf815ee4QB23MUUMWbxHG0wE5AT9PAi8CXwJ/ggA5+ON7XrjWDfc6oCwRyw+GqFMbbVDmg2ZzQBn/Zrgz+a7NirkZxgpsdSRwQR7eyK0LQRBBKEF3gjCCcEQYzoXimi64xxtluKBMG9RhxsoFxgdqf8cHivi3kDuT78YYF6hbe4wZ2OxD0JkgmKAHQQRBJEEUQTRBDMFARAzOReGaCNwTjDJ8UGZ71GGFOo2lL+vhb/ngNfzZNS+f82zu0KesMT5uGLNOBCEY20jkFkswjCCOQEwgIRiFkOBcHK6JxT2RKCMEZXqjDkfUaaHAB+xaaLYXyPNXEnuB9NV6Z7i3lcpyEnqWh1RWv4EYuz4EAwiGEowkSCBIJcggyCLIIchF5OBcBq5JwD1DUUYflBmIOjxQpw3awPiA3Q/YZ6PSHFDCX547nDPqctwtUL+zVJabUK+Qr5C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0GP7jocfP3Ciz4kjJwecPH1q6Km60/Gnr55JPXPnbO7Zp+c+Os8/P/2CzoWSX8x/Kb3oeHFdnXfdtvrQ+oO/9v/13CXxpeu/Zf32rKHgsublkiuWV8qvel7deq37tdrfh/zecD3j+tMbhTd1by685XDr+9uBtw82DmpsuJN5R3p3xj2Te8vvd7xf3dS36ZcHaQ+ePpz+yOTRise+j2ueDHxy5WneM+GzuX84/lH1POL5eWmaVPo/LX7Mrg5NAAA= + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/proj.android/assets/engine.plist b/samples/EarthWarrior3D/proj.android/assets/engine.plist new file mode 100755 index 0000000..c16fd2d --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/engine.plist @@ -0,0 +1,116 @@ + + + + + angle + 90 + angleVariance + 0 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + engine + duration + -1 + emitterType + 0 + finishColorAlpha + 1 + finishColorBlue + 1 + finishColorGreen + 0.6765730977058411 + finishColorRed + 0 + finishColorVarianceAlpha + 0 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 44 + finishParticleSizeVariance + 0 + gravityx + 0 + gravityy + 0 + maxParticles + 4 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 0.1 + particleLifespanVariance + 0.02 + radialAccelVariance + 0 + radialAcceleration + 0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 0 + sourcePositionVariancex + 2 + sourcePositionVariancey + 0 + sourcePositionx + 160 + sourcePositiony + 240 + speed + 450 + speedVariance + 0 + startColorAlpha + 1 + startColorBlue + 0.1147350147366524 + startColorGreen + 0.1511431336402893 + startColorRed + 1 + startColorVarianceAlpha + 0 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 64 + startParticleSizeVariance + 5 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + engine.png + textureImageData + H4sIAAAAAAAAA51XB0AU19a+03dne4WFrfTepBcFKYKAKFVRFFxWirAg1RZ7UIGIsRC7sURFE000ohJj7MYSC7HEGozPqNEkJMZe+O/MgpK85P/f/y7fLoeZe88593SSk4EbANxCBIC/BbOYXyhAUYDgACMATgKcYP5Ee+2DNAYA/pfz7CkcBQTK7rCgm2X3OXYhKOQMQTLAKUaEZS/CskX/BKRbrT+LBgQL3AIEwVggOEpgGAMUozCcC4FAEByAoQgG3qCbM9QXg2+6uWA9YAQiFAMoAiEBQrDAUBTHcRICY8DBCS5K0BAIyUUoApAoIHFAIAxYjhZBUH8U6eaM96CbP2SLwrsTrClwFMcgAASJIxQFOBxA8wCf3wsCwOMxoGnApQGHZkzHnMWYmyBvjdStM8oCmhonLJwRAmdU5ZIIn4MK+YhEiEoliEyGKJRAYY3IrYHMCsgViEyBSRW4VAF4IkDzAZcHKA4rq5ftGPMxd4PXRHEEx1HG6hwc4xKYkMbFfFwuwa2VpI0KV6sJnR7T2RFaBqTGjqu1pzUGnsZAKW1JhTUmkwGRkLkUyUZaj8cZ06FspDA3gPIxgseFzFGJEFPKcRtrXKshDHaEvSPu5II5ueDOrhCkswfH2Y12dhc4uXHtnCidAbO1BUo5EAsBh7SEWe+whQFAEBhJ4ihJ4Hw+KVdgCitgbYMbHDEHV+DoTnj44p7epL8/GRiIBfjjgUF0aKgoLFwSFqqICFdGhMqD+vDdHUlbJS7iQVYwLlnDMPpjGIKirKFwHHC4gC+CnIHWABzcUG9/1D8MD+tPxyZyYuP4g5KF6al0ehqdmS4enmWVM9w6J1uVnalMG6RIilPEhCsDfMR6Dc3n4WweWZyNEGwGQQNxuQD6y9oW8/DihvfjJySJ0ocJh+dJ8ottKmpUVbW6qVMM9XXahjmq+jrbxjmGeQ32jXPcmubaT51oU1aozMkSRfXFDAbAFaJM5Pd4mSQZ15MUkMpIBydZWITtoCGanFE2pkKVeZyq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Phtytu1c+Ll97f3aD3wb8+3R8wnnT14YdOHcxYyL310acanju/zv7l4uufzblZorL65Ou0Zcq78uvt58Q31j7feu32/rCOz48mbMzVM/pP1w9Zbx1v1/Vf7r5e1ZPwp+bL6ju9Ny1+/u3ntx987+NPyn2/fL7794UPez5OcVv7j88vmvkb+e6hzaefu3it+6fm98qHq48Q//Pw4+GvzoxuPSxy+e1D9VPd30LPjZsedZz++8qH1JvVzyyvVV2+vE19e6Sru6/gdwzHodXhYAAA== + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/proj.android/assets/explodeEffect.mp3 b/samples/EarthWarrior3D/proj.android/assets/explodeEffect.mp3 new file mode 100755 index 0000000..6c48679 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/explodeEffect.mp3 differ diff --git a/samples/EarthWarrior3D/proj.android/assets/f1.png b/samples/EarthWarrior3D/proj.android/assets/f1.png new file mode 100755 index 0000000..4fd7bdb Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/f1.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/f2.png b/samples/EarthWarrior3D/proj.android/assets/f2.png new file mode 100755 index 0000000..e752eda Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/f2.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/flare.plist b/samples/EarthWarrior3D/proj.android/assets/flare.plist new file mode 100755 index 0000000..5f5dea9 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/flare.plist @@ -0,0 +1,116 @@ + + + + + angle + 0 + angleVariance + 0 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + flare + duration + 0.01 + emitterType + 0 + finishColorAlpha + 0 + finishColorBlue + 1 + finishColorGreen + 1 + finishColorRed + 0.9999960064888 + finishColorVarianceAlpha + 1 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 0 + finishParticleSizeVariance + 0 + gravityx + 0 + gravityy + 0 + maxParticles + 1316.673828125 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 0.6 + particleLifespanVariance + 0.158187055587769 + radialAccelVariance + 0 + radialAcceleration + 0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 65.10166931152344 + sourcePositionVariancex + 0 + sourcePositionVariancey + 0 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 0 + speedVariance + 0 + startColorAlpha + 1 + startColorBlue + 0.3294117748737335 + startColorGreen + 0.5843137502670288 + startColorRed + 0.9725490808486938 + startColorVarianceAlpha + 1 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 100 + startParticleSizeVariance + 50 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + flare.png + textureImageData + H4sIAAAAAAAAA+2dB3xUVdrG70waBEJL6C30joB0pNfQexOVkFBCCSE0QRREFhVYUUREUFFURFCsFLEjVlgERLCL67Lq6rq4rr3MN/+LTzzebyaZhCQzCeDvODczt5x73uc87/O+59xzBwywGlqu2Pcty/KcL+eLisvl+lMJdn3Ol9As53FyvmRVhA23222X81g5X3wVJ06EFX/7Bru+ed0Owa5HqBYnRrLilMLOOYX53nIDJ2FhYXbJilOElcKMl8J6X7mBE0p4eHgGVrJqJ18cFOx7yYs2KUz3lRvtkR0+8Xd8YeOY81j5s52xcUREhCcyMjJgPvF3DjipMOHF7APBrkuwcSKfA06Eleza2KlzsstN+XnPOcGKif9g30OwcEIbwAXig+xyiq9zmudVG4dKO+f0vs6mXQpykU2xZVRUlF3Yzo32yMtz59a9Z7cO1Bu+5T7OJT9k8gn3X6xYMU90dHSucqzzGiZvBRsvqlt26iDscy/Brn9+FekJ6RIV9ZfcbANTv3ANk2OCqXtzEgPLB2Wm5QrLmJnqr/stWbKkJyYmxt7Oy75u+iP4i+uaeAlWH3XG9oHcB3UuVapUBrcUVqzILvI5cXF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yq6VP3P13j6Y3PlH1m9bPRzy571vPcwue+fT7t+S9fmPzCJ/su2/fei6NfPLZ/yP5DL/V76dWXe7384itdX3nu1Y6vPv1a+9eefL3t67sPtD6w62Crgzv/1upvOw+1PrTrjTZv7Dnc7vDeIxcdefZo56MvvNnjzZePJRw78NbAt44cH3H87RPjTpx8O/ntz96Z/s7X78579+f3lrwf8f6KD0p9sO7DKh9u/qjBRw+fbH3ymY97fHzw78P+/t4nSZ988Y/Z//jl1LJ/xvxz3afVP33gsxafPf15r88P/+vif536Iu2Ln79c/u/S/779q/pfPfGfLv85eHr06VNfp3/t+e+qbyp+c///Wv5v37eDv/3wuxnf/fz9ih8q/rD1x7Y/vvLTqJ8+/Xn+L1G/rP+1wa97f+v32/ueGR5PWmJ6oi0FiAjckyZZ1n/vt6yYMZYVe9iyokuc0cP2P9cZDW+diUb8bJ/RzPa/1pa1pYtljXjesvossayNaBDvdhlvQRoN72K5L7wwo/z+b/akC1ucOVdxr6qM+MHj+aaqZUXttaxf0z2en+/weH6911vZdyzr+VlndDj/+jexrMi/dO/fosWBYZdPtBz//g/xLTIKXiEBAA== + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/proj.android/assets/fonts/Marker Felt.ttf b/samples/EarthWarrior3D/proj.android/assets/fonts/Marker Felt.ttf new file mode 100755 index 0000000..3752ef3 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/fonts/Marker Felt.ttf differ diff --git a/samples/EarthWarrior3D/proj.android/assets/gameover.plist b/samples/EarthWarrior3D/proj.android/assets/gameover.plist new file mode 100755 index 0000000..77c1282 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/gameover.plist @@ -0,0 +1,113 @@ + + + + + frames + + H_Frame.png + + frame + {{2,380},{640,90}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{640,90}} + sourceSize + {640,90} + + V_Frame.png + + frame + {{2,2},{40,960}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{40,960}} + sourceSize + {40,960} + + flash.png + + frame + {{644,336},{110,103}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{110,103}} + sourceSize + {110,103} + + gameover_backtomenu.png + + frame + {{460,103},{232,93}} + offset + {-1,1} + rotated + + sourceColorRect + {{0,0},{232,93}} + sourceSize + {234,95} + + gameover_playagain.png + + frame + {{555,103},{231,93}} + offset + {5,1} + rotated + + sourceColorRect + {{13,0},{231,93}} + sourceSize + {247,95} + + gameover_score.png + + frame + {{644,44},{250,57}} + offset + {4,0} + rotated + + sourceColorRect + {{9,2},{250,57}} + sourceSize + {260,61} + + gameover_score_bk.png + + frame + {{2,44},{456,334}} + offset + {6,-2} + rotated + + sourceColorRect + {{18,22},{456,334}} + sourceSize + {480,374} + + + metadata + + format + 2 + realTextureFileName + gameover.png + size + {964,472} + smartupdate + $TexturePacker:SmartUpdate:11f2668da9d0917be2363861ecec2d64:e8003d57058ca2add3fb600b1ef3b73c:18314cdd2091d1ee52f21fb1c615ddab$ + textureFileName + gameover.png + + + diff --git a/samples/EarthWarrior3D/proj.android/assets/gameover.png b/samples/EarthWarrior3D/proj.android/assets/gameover.png new file mode 100755 index 0000000..9aa5cd0 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/gameover.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/gameover_score_num.fnt b/samples/EarthWarrior3D/proj.android/assets/gameover_score_num.fnt new file mode 100755 index 0000000..7685924 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/gameover_score_num.fnt @@ -0,0 +1,14 @@ +info face="Arial" size=32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 outline=0 +common lineHeight=32 base=26 scaleW=256 scaleH=256 pages=1 packed=0 alphaChnl=1 redChnl=0 greenChnl=0 blueChnl=0 +page id=0 file="gameover_score_num_0.png" +chars count=10 +char id=48 x=0 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=49 x=35 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=50 x=70 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=51 x=105 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=52 x=140 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=53 x=175 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=54 x=210 y=0 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=55 x=0 y=38 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=56 x=35 y=38 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=57 x=70 y=38 width=34 height=37 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 diff --git a/samples/EarthWarrior3D/proj.android/assets/gameover_score_num_0.png b/samples/EarthWarrior3D/proj.android/assets/gameover_score_num_0.png new file mode 100755 index 0000000..f4e0dc0 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/gameover_score_num_0.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/glow.plist b/samples/EarthWarrior3D/proj.android/assets/glow.plist new file mode 100755 index 0000000..407c5b0 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/glow.plist @@ -0,0 +1,116 @@ + + + + + angle + 0 + angleVariance + 0 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + glow + duration + 0.01 + emitterType + 0 + finishColorAlpha + 0 + finishColorBlue + 0.3294117748737335 + finishColorGreen + 0.5843137502670288 + finishColorRed + 0.9725490808486938 + finishColorVarianceAlpha + 0 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 218.75341796875 + finishParticleSizeVariance + 0 + gravityx + 0 + gravityy + 0 + maxParticles + 144.3172149658203 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 0.4 + particleLifespanVariance + 0.1 + radialAccelVariance + 0 + radialAcceleration + 0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 319.0068359375 + rotationStart + 0 + rotationStartVariance + 29.20376586914062 + sourcePositionVariancex + 0 + sourcePositionVariancey + 0 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 0 + speedVariance + 0 + startColorAlpha + 1 + startColorBlue + 0.3294117748737335 + startColorGreen + 0.5843137502670288 + startColorRed + 0.9725490808486938 + startColorVarianceAlpha + 0 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 116 + startParticleSizeVariance + 73.08219146728516 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + glow.png + textureImageData + H4sIAAAAAAAAA+2dB3wU1drGZzedJJQkhA6h19BL6L2D9CotJAFCCSEkdAUUUcoFpBcRQQQCCIh0EKlSpUlRmiAiIKggUgTE78k8N+89zG6W3SUQ9OO9v7uebDazM//zzPO+58yZoXFjrZCmLdmrvYpX8Spexat4Fa/inxAmm5HSe/fPC9s87Y+UPo6XLpIL7CvmlvEC2P6/Be40HPOTIW++Ym4Zz8jW0fh/CPx5I00u4CnNyclIWbzOMU9pZg7HS4XXMv4FwF9ywob4x6G2LY9kYeJiEcmyWXPStFMaqpVIXsKWSJ2Ifx/tZyecFCs3JVwtwu3JwDv8EzacY/5y0n52GatIhY+QdLcjDKjVTnFa5C8V7WchbBCtygev9uC1h7/0lxO0XxLOTkO2SjhZwNoDXD1rnKOdspAdwivO8FREnp6eXnaHh4eHndgd0nZKCdtRyIakZoOwJVVvb29fPXwSA++kSiLsx24Q9lOZv3jUDkE2WATDBmGwAklSJd7UqVOnSQy0+Y4hpBf4W/nRQN6A3TJv2tb2C+NstU/thGzDhIUwIatgGenSpfP39/fz80ubNi3fSftkqB/Gj/i8dIoqftsiFzNJcdRO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cP/tDihzOXwi5d/7H/j48uj/rJ96fpV3Jcib9a8uqWa3WuHfn59Z8vX4++/vDG6F/S/fLBrwV+XfNbtd8O3mx78/KtmFt//z7+dqbbi/8o/ceOO03vnL/b5+7De2PvZ7q/5M+QP/c8aPPgysOBjzwezfyr4F+bHjd8fPbvPn///X9z/R6JvrUAAA== + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/proj.android/assets/groundLevel.jpg b/samples/EarthWarrior3D/proj.android/assets/groundLevel.jpg new file mode 100755 index 0000000..8c84ed4 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/groundLevel.jpg differ diff --git a/samples/EarthWarrior3D/proj.android/assets/hit.mp3 b/samples/EarthWarrior3D/proj.android/assets/hit.mp3 new file mode 100755 index 0000000..da48311 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/hit.mp3 differ diff --git a/samples/EarthWarrior3D/proj.android/assets/loadingAndHP.plist b/samples/EarthWarrior3D/proj.android/assets/loadingAndHP.plist new file mode 100755 index 0000000..d1bd8b9 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/loadingAndHP.plist @@ -0,0 +1,126 @@ + + + + + frames + + fog.png + + frame + {{644,391},{10,570}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{10,570}} + sourceSize + {10,570} + + hp.png + + frame + {{851,2},{60,205}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{60,205}} + sourceSize + {60,205} + + hp_above.png + + frame + {{644,2},{60,205}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{60,205}} + sourceSize + {60,205} + + hp_empty.png + + frame + {{656,480},{116,317}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{116,317}} + sourceSize + {116,317} + + loading_bk.png + + frame + {{2,2},{640,963}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{640,963}} + sourceSize + {640,963} + + loading_progress_bk.png + + frame + {{850,209},{694,72}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{694,72}} + sourceSize + {694,72} + + loading_progress_thumb.png + + frame + {{656,391},{136,87}} + offset + {0,33} + rotated + + sourceColorRect + {{0,9},{136,87}} + sourceSize + {136,171} + + right_top_ui.png + + frame + {{644,64},{204,325}} + offset + {0,3} + rotated + + sourceColorRect + {{0,0},{204,325}} + sourceSize + {204,331} + + + metadata + + format + 2 + realTextureFileName + loadingAndHP.png + size + {924,967} + smartupdate + $TexturePacker:SmartUpdate:8bfd7f3339041af832a641e3dff393bc:19bdda24356f17c17fe67fedafee3eed:c7075d6d293b33f3dbac134af37823d9$ + textureFileName + loadingAndHP.png + + + diff --git a/samples/EarthWarrior3D/proj.android/assets/loadingAndHP.png b/samples/EarthWarrior3D/proj.android/assets/loadingAndHP.png new file mode 100755 index 0000000..9f8fb0e Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/loadingAndHP.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/menuEmission.plist b/samples/EarthWarrior3D/proj.android/assets/menuEmission.plist new file mode 100755 index 0000000..e02feca --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/menuEmission.plist @@ -0,0 +1,116 @@ + + + + + angle + 40 + angleVariance + 0 + blendFuncDestination + 1 + blendFuncSource + 771 + configName + Untitled 1 + duration + -1 + emitterType + 0 + finishColorAlpha + 0 + finishColorBlue + 0 + finishColorGreen + 0 + finishColorRed + 0 + finishColorVarianceAlpha + 0 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 0 + finishParticleSizeVariance + 0 + gravityx + 0 + gravityy + 0 + maxParticles + 10.54152393341064 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 1 + particleLifespanVariance + 0 + radialAccelVariance + 0 + radialAcceleration + 0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 0 + sourcePositionVariancex + 0 + sourcePositionVariancey + 0 + sourcePositionx + 160 + sourcePositiony + 240 + speed + 50 + speedVariance + 0 + startColorAlpha + 0.5 + startColorBlue + 0.8382235169410706 + startColorGreen + 0.5797151327133179 + startColorRed + 0.4444800615310669 + startColorVarianceAlpha + 0.5052975416183472 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 64 + startParticleSizeVariance + 5 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + defaultTexture.png + textureImageData + H4sIAAAAAAAAA+1bB1RURxd+byu9g1RZpINUpVtoKoiKIqJYorisdESqLRINkihGjSHEFo0EC/ZoRCRWLMRoFHuPEIMlNizY4/5z3fvic7MrmJic84vr+Tjj7My997tt5i1L796UE0UFqlD/wUsqldJvgv/CJrTr35KrjBunGfyn/nib/FvIldsMmvXJWzOYejv8X8OZzYsnB74c5N9X5pO36od/wl8Jb3m+DD8BQtgMmHXyfpH3xVvxw9/h3wLe8nxVCFQRaiyoI9hzzDoVBf546354U/4t5M3mzPDUINAk0CLQVgItXKPB8ou8L17rh3+TvxLu8rwZzgxf4KVDoEugR6BPYEBgKAcDfE8P1+rgXsYfjC8U+eFv+6Al/BXkOzvminhrof16yMuIwJjAhMCUwIzAnMACYY5zprjGGPcYoAwdlKnID/K58Eb10Bz/FsRcRY63LsaR4WyGHC0JrAisCWwIbOVgg+9Z4VoL3Mv4Qh9ls/2g8k9zoYX8FXFnYq6OOarD4m2CMbVETsDPgcCJoD2BK4EbgTvCDefa4xoH3GONMsxRJuMHHdSpzsoFhT74J/ylf815ee4QB23MUUMWbxHG0wE5AT9PAi8CXwJ/ggA5+ON7XrjWDfc6oCwRyw+GqFMbbVDmg2ZzQBn/Zrgz+a7NirkZxgpsdSRwQR7eyK0LQRBBKEF3gjCCcEQYzoXimi64xxtluKBMG9RhxsoFxgdqf8cHivi3kDuT78YYF6hbe4wZ2OxD0JkgmKAHQQRBJEEUQTRBDMFARAzOReGaCNwTjDJ8UGZ71GGFOo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QNZVrXdYuWWe0rmg9tT5n/e/fjfju5IaIDdUbfTeu/d72+4Wb9DdNr6ArxlU0bk7cXFcZW3lkS88t1VUBVZt+cP1h+VarrQu2GW6btV1te8F26Y7xO5p2Zuy8sSth16Xq4dXndg/afXxPvz2H9kbs/XFf9327a4JqdvzY+cet+/33b/nJ96fNB7wPVBz0OrjpZ6+fNx3yPlRx2OdwZa1fbdWRTke2H+16dNex0GP7jocfP3Ciz4kjJwecPH1q6Km60/Gnr55JPXPnbO7Zp+c+Os8/P/2CzoWSX8x/Kb3oeHFdnXfdtvrQ+oO/9v/13CXxpeu/Zf32rKHgsublkiuWV8qvel7deq37tdrfh/zecD3j+tMbhTd1by685XDr+9uBtw82DmpsuJN5R3p3xj2Te8vvd7xf3dS36ZcHaQ+ePpz+yOTRise+j2ueDHxy5WneM+GzuX84/lH1POL5eWmaVPo/LX7Mrg5NAAA= + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/proj.android/assets/menu_scene.plist b/samples/EarthWarrior3D/proj.android/assets/menu_scene.plist new file mode 100755 index 0000000..1b99254 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/menu_scene.plist @@ -0,0 +1,74 @@ + + + + + frames + + credits.png + + frame + {{436,645},{215,90}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{215,90}} + sourceSize + {215,90} + + license.png + + frame + {{219,645},{215,90}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{215,90}} + sourceSize + {215,90} + + mainmenu_BG.png + + frame + {{2,2},{641,964}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{641,964}} + sourceSize + {641,964} + + start_game.png + + frame + {{2,645},{215,90}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{215,90}} + sourceSize + {215,90} + + + metadata + + format + 2 + realTextureFileName + menu_scene.png + size + {968,737} + smartupdate + $TexturePacker:SmartUpdate:db555b7f132f8136b7898992ccf55fb8:1cac3d4496c65b08a797fffbdefaa627:f7a06ab55076f34b936dd5f32b31eb72$ + textureFileName + menu_scene.png + + + diff --git a/samples/EarthWarrior3D/proj.android/assets/menu_scene.png b/samples/EarthWarrior3D/proj.android/assets/menu_scene.png new file mode 100755 index 0000000..4c22fce Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/menu_scene.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/missileFlare.plist b/samples/EarthWarrior3D/proj.android/assets/missileFlare.plist new file mode 100755 index 0000000..903d620 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/missileFlare.plist @@ -0,0 +1,116 @@ + + + + + angle + 0 + angleVariance + 0 + blendFuncDestination + 1 + blendFuncSource + 1 + configName + missileFlare + duration + -1 + emitterType + 0 + finishColorAlpha + 1 + finishColorBlue + 0.4078431725502014 + finishColorGreen + 0.658823549747467 + finishColorRed + 0.9647059440612793 + finishColorVarianceAlpha + 1 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 14.76712322235107 + finishParticleSizeVariance + 35.52054595947266 + gravityx + 0 + gravityy + 0 + maxParticles + 5 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 300 + minRadiusVariance + 0 + particleLifespan + 0.3673266470432281 + particleLifespanVariance + 0 + radialAccelVariance + 0 + radialAcceleration + 0 + rotatePerSecond + 360 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 65.10166931152344 + sourcePositionVariancex + 0 + sourcePositionVariancey + 0 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 0 + speedVariance + 0 + startColorAlpha + 1 + startColorBlue + 0.4011987745761871 + startColorGreen + 0.6524861454963684 + startColorRed + 0.9845572113990784 + startColorVarianceAlpha + 1 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 26.98630142211914 + startParticleSizeVariance + 23.47945213317871 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + missileF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/RzPa/1pa1pYtljXjesvossayNaBDvdhlvQRoN72K5L7wwo/z+b/akC1ucOVdxr6qM+MHj+aaqZUXttaxf0z2en+/weH6911vZdyzr+VlndDj/+jexrMi/dO/fosWBYZdPtBz//g/xLTIKXiEBAA== + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/proj.android/assets/muzzle.png b/samples/EarthWarrior3D/proj.android/assets/muzzle.png new file mode 100755 index 0000000..9d6b3b3 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/muzzle.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/num.fnt b/samples/EarthWarrior3D/proj.android/assets/num.fnt new file mode 100755 index 0000000..6d530b4 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/num.fnt @@ -0,0 +1,15 @@ +info face="Arial" size=32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 outline=0 +common lineHeight=32 base=26 scaleW=256 scaleH=256 pages=1 packed=0 alphaChnl=1 redChnl=0 greenChnl=0 blueChnl=0 +page id=0 file="num_0.png" +chars count=11 +char id=37 x=0 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=48 x=25 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=49 x=50 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=50 x=75 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=51 x=100 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=52 x=125 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=53 x=150 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=54 x=175 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=55 x=200 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=56 x=225 y=0 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 +char id=57 x=0 y=35 width=24 height=34 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=15 diff --git a/samples/EarthWarrior3D/proj.android/assets/num_0.png b/samples/EarthWarrior3D/proj.android/assets/num_0.png new file mode 100755 index 0000000..38437a1 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/num_0.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/pkstart.png b/samples/EarthWarrior3D/proj.android/assets/pkstart.png new file mode 100755 index 0000000..eca33c0 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/pkstart.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/player_bullet_explosion.png b/samples/EarthWarrior3D/proj.android/assets/player_bullet_explosion.png new file mode 100755 index 0000000..d0a97e3 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/player_bullet_explosion.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/playerv002_256.png b/samples/EarthWarrior3D/proj.android/assets/playerv002_256.png new file mode 100755 index 0000000..dfe9057 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/playerv002_256.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/potion.jpg b/samples/EarthWarrior3D/proj.android/assets/potion.jpg new file mode 100755 index 0000000..a8502a0 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/potion.jpg differ diff --git a/samples/EarthWarrior3D/proj.android/assets/potion2.png b/samples/EarthWarrior3D/proj.android/assets/potion2.png new file mode 100755 index 0000000..8e095bb Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/potion2.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/r1.png b/samples/EarthWarrior3D/proj.android/assets/r1.png new file mode 100755 index 0000000..827a772 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/r1.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/r2.png b/samples/EarthWarrior3D/proj.android/assets/r2.png new file mode 100755 index 0000000..727a1c6 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/r2.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/score_right_top.png b/samples/EarthWarrior3D/proj.android/assets/score_right_top.png new file mode 100755 index 0000000..c203616 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/score_right_top.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/streak.png b/samples/EarthWarrior3D/proj.android/assets/streak.png new file mode 100755 index 0000000..9bd8182 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/assets/streak.png differ diff --git a/samples/EarthWarrior3D/proj.android/assets/toonSmoke.plist b/samples/EarthWarrior3D/proj.android/assets/toonSmoke.plist new file mode 100755 index 0000000..a3adea1 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/toonSmoke.plist @@ -0,0 +1,116 @@ + + + + + angle + 0 + angleVariance + 180 + blendFuncDestination + 771 + blendFuncSource + 1 + configName + toonSmoke + duration + 0.01 + emitterType + 0 + finishColorAlpha + 1 + finishColorBlue + 0.1490601301193237 + finishColorGreen + 0.1490625441074371 + finishColorRed + 0.1490580141544342 + finishColorVarianceAlpha + 0 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 0 + finishParticleSizeVariance + 0 + gravityx + 0 + gravityy + 0 + maxParticles + 1486.301391601562 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 94.9539794921875 + minRadiusVariance + 0 + particleLifespan + 1 + particleLifespanVariance + 0.2 + radialAccelVariance + 0 + radialAcceleration + 110 + rotatePerSecond + 0 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 0 + sourcePositionVariancex + 0 + sourcePositionVariancey + 0 + sourcePositionx + 0 + sourcePositiony + 0 + speed + 123.1806488037109 + speedVariance + 30 + startColorAlpha + 1 + startColorBlue + 0.3294117748737335 + startColorGreen + 0.5843137502670288 + startColorRed + 0.9725490808486938 + startColorVarianceAlpha + 0 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 64 + startParticleSizeVariance + 17.50684928894043 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + toonSmoke.png + textureImageData + H4sIAAAAAAAAA+1dCVxO2Rs+92vf0CJrSWlRsoTKXlqUUNqQNZVKi7TYd4bB2EmLnbHvO4NClGXsO2MypsHwNxljSbj/89y+k2+a0qKV7/U77u1+dz3Pec95z/u855zu3YkpIRtHNWzYkBQl6enpCalp06akXbt2pE2bNv9Kbdu2FbbNmzcn5ubmwnlmZmZCwnX43cLCgpiYmBBra2vSvn174W99fX2Hli1bHqbHzlpaWqa1bt06tVWrVkLCPj2WSn87Q/9ONjQ09KTnCtfiHrg37oF7N2rUSHgmEt4B5+EcbBs3bkzofYS/scX7t2jRQjiOY+zdJb8Fx5s0aSLcH8/DdXgGjuE6PAPHJa/BObgvrinrVJa4sW/U1dXN/S6a1yHAguJwhj4/iZ6XRRNPr+Pp3zw9zlO8hC0SjuE3nEPTW1yDa4ExfU4U7ol7U/yF50lx+zLckKBb+A4DAwMnikUK/a4U+vtb4GBlZcV36NCB79KlC+/h4cEPHjyYHz58OD9hwgT+u+++46dNm8ZPnDiRj4qK4v38/HgvLy/eyclJuAbX0vsCzyx635M0nTI2NvbG9yBfmzVrVihueE+m+wXhBn3G+38LuCHPWP1Fv28AzeNjNO+yGVYODg78oEGD+Hnz5vFJSUn8r7/+yr98+ZJ/+/Ytn52dzX/48IH/+PGjsEXCMfz2zz//8A8fPuRPnDjBL1y4kPf39xdwpPnLdDWb5lsSLS+hwArPp8/LFze8K9VZYmpqKug+Pe8Mq5+xxd9Mn+nfubhBp+k1Xx1uyBfcE3lHv+Enuv8OekG/j+/Tpw8/f/58/vLly3xWVhb/pQIsr1+/zsfFxfEDBgwQ9BB1Kk3QwSN0OxXvhHyE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Sch6G0K8kglxmkRIImwQuq9BE0wjTxsiol06lsQSNaSlRc69VKlVKfeW51/qEKJwmJAPkTyfvZznP6yjL3ubkOThOXY4pJs5IfLf2XWzsDjnMSqA5JH/A082Cp8utgAA + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/proj.android/assets/vanishingPoint.plist b/samples/EarthWarrior3D/proj.android/assets/vanishingPoint.plist new file mode 100755 index 0000000..de50d12 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/assets/vanishingPoint.plist @@ -0,0 +1,116 @@ + + + + + angle + 156.7198181152344 + angleVariance + 228.5445098876953 + blendFuncDestination + 771 + blendFuncSource + 1 + configName + Untitled 1 + duration + -1 + emitterType + 1 + finishColorAlpha + 1 + finishColorBlue + 1 + finishColorGreen + 0.9914394021034241 + finishColorRed + 0 + finishColorVarianceAlpha + 0 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 0 + finishParticleSizeVariance + 0 + gravityx + 0 + gravityy + 0 + maxParticles + 317.8510437011719 + maxRadius + 400 + maxRadiusVariance + 302.2260437011719 + minRadius + 0 + minRadiusVariance + 0 + particleLifespan + 1.5 + particleLifespanVariance + 0.61215752363205 + radialAccelVariance + 0 + radialAcceleration + 0 + rotatePerSecond + 0 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 0 + rotationStart + 0 + rotationStartVariance + 0 + sourcePositionVariancex + 300 + sourcePositionVariancey + 200 + sourcePositionx + 160 + sourcePositiony + 240 + speed + 86.95419311523438 + speedVariance + 56.72089004516602 + startColorAlpha + 1 + startColorBlue + 1 + startColorGreen + 0.9555045962333679 + startColorRed + 0 + startColorVarianceAlpha + 0 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 6 + startParticleSizeVariance + 3 + tangentialAccelVariance + 0 + tangentialAcceleration + 0 + textureFileName + defaultTexture.png + textureImageData + H4sIAAAAAAAAA+1bB1RURx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oeHFdnXfdtvrQ+oO/9v/13CXxpeu/Zf32rKHgsublkiuWV8qvel7deq37tdrfh/zecD3j+tMbhTd1by685XDr+9uBtw82DmpsuJN5R3p3xj2Te8vvd7xf3dS36ZcHaQ+ePpz+yOTRise+j2ueDHxy5WneM+GzuX84/lH1POL5eWmaVPo/LX7Mrg5NAAA= + yCoordFlipped + 1 + + diff --git a/samples/EarthWarrior3D/proj.android/build-cfg.json b/samples/EarthWarrior3D/proj.android/build-cfg.json new file mode 100755 index 0000000..611f232 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/build-cfg.json @@ -0,0 +1,13 @@ +{ + "ndk_module_path" :[ + "../cocos2d", + "../cocos2d/cocos", + "../cocos2d/external" + ], + "copy_resources": [ + { + "from": "../Resources", + "to": "" + } + ] +} diff --git a/samples/EarthWarrior3D/proj.android/build.xml b/samples/EarthWarrior3D/proj.android/build.xml new file mode 100755 index 0000000..d172fd6 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/build.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/EarthWarrior3D/proj.android/build_native.py b/samples/EarthWarrior3D/proj.android/build_native.py new file mode 100755 index 0000000..13a3b37 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/build_native.py @@ -0,0 +1,166 @@ +#!/usr/bin/python +# build_native.py +# Build native codes + + +import sys +import os, os.path +import shutil +from optparse import OptionParser + +def get_num_of_cpu(): + ''' The build process can be accelerated by running multiple concurrent job processes using the -j-option. + ''' + try: + platform = sys.platform + if platform == 'win32': + if 'NUMBER_OF_PROCESSORS' in os.environ: + return int(os.environ['NUMBER_OF_PROCESSORS']) + else: + return 1 + else: + from numpy.distutils import cpuinfo + return cpuinfo.cpu._getNCPUs() + except Exception: + print "Can't know cpuinfo, use default 1 cpu" + return 1 + +def check_environment_variables_sdk(): + ''' Checking the environment ANDROID_SDK_ROOT, which will be used for building + ''' + + try: + SDK_ROOT = os.environ['ANDROID_SDK_ROOT'] + except Exception: + print "ANDROID_SDK_ROOT not defined. Please define ANDROID_SDK_ROOT in your environment" + sys.exit(1) + + return SDK_ROOT + +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 do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode): + + 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) + + num_of_cpu = get_num_of_cpu() + + if ndk_build_param == None: + command = '%s -j%d -C %s %s' % (ndk_path, num_of_cpu, app_android_root, ndk_module_path) + else: + command = '%s -j%d -C %s %s %s' % (ndk_path, num_of_cpu, app_android_root, ''.join(str(e) for e in ndk_build_param), ndk_module_path) + if os.system(command) != 0: + raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!") + elif android_platform is not None: + sdk_tool_path = os.path.join(sdk_root, "tools/android") + cocoslib_path = os.path.join(cocos_root, "cocos/2d/platform/android/java") + command = '%s update lib-project -t %s -p %s' % (sdk_tool_path,android_platform,cocoslib_path) + if os.system(command) != 0: + raise Exception("update cocos lib-project [ " + cocoslib_path + " ] fails!") + command = '%s update project -t %s -p %s -s' % (sdk_tool_path,android_platform,app_android_root) + if os.system(command) != 0: + raise Exception("update project [ " + app_android_root + " ] fails!") + buildfile_path = os.path.join(app_android_root, "build.xml") + command = 'ant clean %s -f %s -Dsdk.dir=%s' % (build_mode,buildfile_path,sdk_root) + 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(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 + 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) + +def build(ndk_build_param,android_platform,build_mode): + + ndk_root = check_environment_variables() + sdk_root = None + select_toolchain_version() + + current_dir = os.path.dirname(os.path.realpath(__file__)) + cocos_root = os.path.join(current_dir, "../cocos2d") + + app_android_root = current_dir + copy_resources(app_android_root) + + if android_platform is not None: + sdk_root = check_environment_variables_sdk() + if android_platform.isdigit(): + android_platform = 'android-'+android_platform + else: + print 'please use vaild android platform' + exit(1) + + if build_mode is None: + build_mode = 'debug' + elif build_mode != 'release': + build_mode = 'debug' + + do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode) + +# -------------- main -------------- +if __name__ == '__main__': + + parser = OptionParser() + parser.add_option("-n", "--ndk", dest="ndk_build_param", help='parameter for ndk-build') + parser.add_option("-p", "--platform", dest="android_platform", + help='parameter for android-update.Without the parameter,the script just build dynamic library for project. Valid android-platform are:[10|11|12|13|14|15|16|17|18|19]') + parser.add_option("-b", "--build", dest="build_mode", + help='the build mode for java project,debug[default] or release.Get more information,please refer to http://developer.android.com/tools/building/building-cmdline.html') + (opts, args) = parser.parse_args() + + build(opts.ndk_build_param,opts.android_platform,opts.build_mode) diff --git a/samples/EarthWarrior3D/proj.android/jni/Android.mk b/samples/EarthWarrior3D/proj.android/jni/Android.mk new file mode 100755 index 0000000..a44806f --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/jni/Android.mk @@ -0,0 +1,46 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := cocos2dcpp_shared + +LOCAL_MODULE_FILENAME := libcocos2dcpp + +LOCAL_SRC_FILES := hellocpp/main.cpp \ + ../../Classes/AppDelegate.cpp \ + ../../Classes/HelloWorldScene.cpp \ + ../../Classes/AirCraft.cpp \ + ../../Classes/GameEntity.cpp \ + ../../Classes/GameLayer.cpp \ + ../../Classes/Player.cpp \ + ../../Classes/PublicApi.cpp \ + ../../Classes/Enemies.cpp \ + ../../Classes/Bullets.cpp \ + ../../Classes/Effects.cpp \ + ../../Classes/Explosion.cpp \ + ../../Classes/GameControllers.cpp \ + ../../Classes/3d/Mesh.cpp \ + ../../Classes/3d/MeshCache.cpp \ + ../../Classes/3d/Sprite3D.cpp \ + ../../Classes/LoadingScene.cpp \ + ../../Classes/MainMenuScene.cpp \ + ../../Classes/GameOverLayer.cpp \ + ../../Classes/ParticleManager.cpp \ + ../../Classes/Plane.cpp \ + ../../Classes/LicenseLayer.cpp \ + ../../Classes/FriendControlScene.cpp \ + ../../Classes/Reward.cpp \ + ../../Classes/FriendPlayer.cpp \ + + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes + +LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static +LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static +LOCAL_WHOLE_STATIC_LIBRARIES += box2d_static + +include $(BUILD_SHARED_LIBRARY) + +$(call import-module,2d) +$(call import-module,audio/android) +$(call import-module,Box2D) diff --git a/samples/EarthWarrior3D/proj.android/jni/Application.mk b/samples/EarthWarrior3D/proj.android/jni/Application.mk new file mode 100755 index 0000000..8298026 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/jni/Application.mk @@ -0,0 +1,3 @@ +APP_STL := gnustl_static +APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -DCOCOS2D_DEBUG=1 -std=c++11 -fsigned-char +APP_ABI :=armeabi armeabi-v7a x86 diff --git a/samples/EarthWarrior3D/proj.android/jni/JNIMediator.cpp b/samples/EarthWarrior3D/proj.android/jni/JNIMediator.cpp new file mode 100755 index 0000000..b0e6188 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/jni/JNIMediator.cpp @@ -0,0 +1,977 @@ +#include +#include "com_intel_csdk_wrapper_JNIMediator.h" +#include "STC_RESULTS.h" +#include +#include +#include "include/STCAPI.h" +#include "include/osal.h" +#include +#include +#include +#include +#include +#include "include/uuid.h" +#include + +#define STC_INVITE_STATUS_DISCONNECTED 25 + + + + +typedef struct BLAH { + JavaVM *jvm; + jobject jobj; + jclass jclazz; + int responseLength; +}jniStruct; + +/// Structure to have all the Peer Device information +typedef struct SESSION { + STCSessionUpdate info; + int responseLength; +} session; + +static session s_sessions[100]; +static session s_localSession; +static std::string s_applicationId; +static std::string s_myClientId; +static STCApplicationId* applicationId; +static STC_HANDLE s_sdkHandle; + +static jniStruct s_jni_struct = {0}; +static int s_sock = STC_INVALID_SOCKET; +static bool s_IsUnboxed = false; + + +void RegisterLocalSession(); +// start Callback function used in CCF +void CALLBACK onInviteRequestCallback(PSTCInviteRequest message, PVOID callbackArg); +void CALLBACK onPeerUpdateCallback(PSTCSessionUpdate update, PVOID callbackArg); +void CALLBACK onLocalSessionUpdateCallback(PSTCSessionUpdate update, PVOID callbackArg); +void CALLBACK onInviteCompleteCallback(PSTCInviteComplete message, PVOID callbackArg); +void CALLBACK onStreamEventUpdateCallback(PSTCStreamEvent message, PVOID callbackArg); +void CALLBACK onNodeUpdate(PSTCDiscoveryNodeCredentialsUpdate Update, PVOID callbackArg); +// End of callback function used in CCF + + +/* + * Class: com_intel_csdk_JNILayer + * Method: STCInit + * Signature: ([JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)J + */ + +/* +extern "C" JNIEXPORT jlong JNICALL Java_com_intel_csdk_JNILayer_STCInit +(JNIEnv *env, jobject obj, jlongArray inSdkHandle, jstring inOriginPath, jstring inUuid, jstring inClientId, jstring inClientSecret) +*/ + +extern "C" JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeInit + (JNIEnv *env, jobject obj, jstring inOriginPath, jstring inUuid, jstring inClientId, jstring inClientSecret) +{ + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Entering JNIMediator_nativeInit"); + env->GetJavaVM(&s_jni_struct.jvm); + s_jni_struct.jobj = reinterpret_cast(env->NewGlobalRef(obj)); + jclass clazz =env->FindClass("com/intel/csdk/wrapper/JNIMediator"); + s_jni_struct.jclazz = reinterpret_cast(env->NewGlobalRef(clazz)); + int hResult = 0; + if (!inUuid || !inClientId || !inClientSecret) + { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Error in Argument"); + return -10; + } + +/**Allocating J parameters to C parameters**/ + const char* strOriginPath = (*env).GetStringUTFChars(inOriginPath, NULL);///Need to set the path of the app + const char* strUUID = (*env).GetStringUTFChars(inUuid, NULL); //Appliaction ID + const char* strClientId = (*env).GetStringUTFChars(inClientId, NULL); //Client ID + const char* strClientSecret = (*env).GetStringUTFChars(inClientSecret, NULL); //Client Secret + int iconSize = 10; + + GUID myApplicationId; + StringToUuid(strUUID, &myApplicationId); + + STCApplicationId ApplicationId = {0}; + ApplicationId.applicationId = myApplicationId; + strcpy(ApplicationId.clientId, strClientId); + strcpy(ApplicationId.clientSecret, strClientSecret); + + ApplicationId.applicationIconFormat = 0; + ApplicationId.applicationIconSize = iconSize; + ApplicationId.numPlayers = 2; + strcpy(ApplicationId.applicationName, "NativeChat"); + strcpy(ApplicationId.applicationDescription, "Chat using C SDK in Android"); + strcpy(ApplicationId.inviteIntent, "com.intel.stc.csdk.wrapper.JNIMediator"); + strcpy(ApplicationId.launchActivity, "com.intel.stc.csdk.JNIMediator"); +/**Finished allocating J parameters to C parameters**/ + + hResult = STCInitialize(strOriginPath,&s_sdkHandle, ApplicationId, 0); + if(hResult==0) + { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Initialize success: STCInit()"); + hResult = STCQueryUnboxedState(s_sdkHandle,&s_IsUnboxed) ; + if(hResult == 0){ + if(s_IsUnboxed) + { +// Calling Java : Providing info stating Unboxing is Done + jmethodID methodID = env->GetMethodID(clazz,"requestIdentityDetails","(Z)V"); + env->CallVoidMethod(obj,methodID,false); + RegisterLocalSession(); + + } + else + { + + jmethodID methodID = env->GetMethodID(clazz,"requestIdentityDetails","(Z)V"); + env->CallVoidMethod(obj,methodID,true); + //call java RequestforIdentitydetails(true); Requesting for identity details + + } + }else + { + std::stringstream logdata; + logdata << "[Nativechat] STCQueryUnboxedState Fail hResult: "<< hResult; + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG,logdata.str().c_str() ); + } + + } + else + { + std::stringstream logdata; + logdata << "[Nativechat] Initialize Fail hResult: "<< hResult; + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG,logdata.str().c_str() ); + } + + return hResult; + +} + +//Register the function which will provided details for onLocalSessionUpdateCallback +void RegisterLocalSession() +{ + int stcResult= STC_SUCCESS; + + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Calling STCSetLocalSessionUpdateCallback"); + stcResult = STCSetLocalSessionInfoCallback(s_sdkHandle, onLocalSessionUpdateCallback, (PVOID)&s_jni_struct); + if(stcResult==0) + { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Registering LocalSession Success"); + }else + { + std::stringstream logdata; + logdata << "[Nativechat] STCSetLocalSessionUpdateCallback Fail hResult: "<< stcResult; + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG,logdata.str().c_str() ); + + } +} + +/* + * Class: com_intel_csdk_ApplicationService_JNIMediator + * Method: nativeIdentity + * Signature: (Ljava/lang/String;Ljava/lang/String;[B)J + */ +// +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeIdentity + (JNIEnv *env, jobject obj, jstring userName, jstring deviceName, jbyteArray avatar, jint size) +{ + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] nativeIdentity started"); + std::stringstream logdata; + int stcResult= STC_SUCCESS; + Byte_t *PtrAvatar; + int AvatarSize = 1024; + const char* strUserName = (*env).GetStringUTFChars(userName, NULL); //UserName + const char* strDeviceName = (*env).GetStringUTFChars(deviceName, NULL); //DeviceName + PtrAvatar = (Byte_t*)malloc(size); + DWORD avatarSize = (env)->GetArrayLength (avatar); + PBYTE buf = new BYTE[avatarSize]; + (env)->GetByteArrayRegion (avatar, 0, avatarSize, reinterpret_cast(buf)); + + stcResult = STCSetUserName(s_sdkHandle, strUserName); + if(stcResult==STC_SUCCESS) + { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Calling STCSetDeviceName"); + stcResult = STCSetDeviceName(s_sdkHandle, strDeviceName); + if(stcResult==STC_SUCCESS) + { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Calling STCSetAvatar"); + stcResult = STCSetAvatar(s_sdkHandle, avatarSize,0, buf); + if(!s_IsUnboxed) + { + RegisterLocalSession(); + s_IsUnboxed = true; + } + } + } + + if(stcResult!=STC_SUCCESS) + { + + logdata << "[Nativechat] Error in Setting Identity hResult: "<< stcResult; + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG,logdata.str().c_str() ); + } + + +} + +// Function called when It is registered to STCSetSessionUpdateCallback() +// Notify the application change status of all the remote system which are connected +void CALLBACK onPeerUpdateCallback(PSTCSessionUpdate update, PVOID callbackArg) +{ + bool attached = false; + std::stringstream logdata; + logdata << "[Nativechat] Entering onPeerUpdateCallback UserName: "<< update->szUserName; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG,logdata.str().c_str() ); + jniStruct js_cb = {0};// To call the JNI class + js_cb = *((jniStruct*)callbackArg); + if(!js_cb.jvm) return; + JNIEnv *myEnv = NULL; + int retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal == JNI_EDETACHED) { + retVal = js_cb.jvm->AttachCurrentThread(&myEnv, NULL); + if(retVal != JNI_OK) { + return; + } + if(retVal == JNI_OK) { + attached = true; + retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal != JNI_OK) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to getEnv after attaching to JVM."); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Attached thread to JVM"); + } + } + else if(retVal == JNI_OK) { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Already attached thread to JVM"); + } + else if(retVal == JNI_EVERSION) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Wrong version of JNI to attach to JVM"); + } + else if(retVal == JNI_ERR) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] JNI Error"); + } + if(!myEnv) return; + //Setting Calling Java Function " onPeerDiscovery" name + jmethodID methodId = myEnv->GetMethodID(js_cb.jclazz, "onPeerDiscovery","(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[B[Ljava/lang/Object;ZZZ)V"); + //(UUID,USERNAME,DEVICENAME,Avatar,AppliationIDs,isAvailable,isAvailableCloud,isAvailableProximity); + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "Setting Calling Java Function :sessionUpdate name"); + if(update) { + jstring jUserName = myEnv->NewStringUTF(std::string(update->szUserName).c_str()); + jstring jDeviceName = myEnv->NewStringUTF(std::string(update->szSessionName).c_str()); + jstring jSessionId = myEnv->NewStringUTF(UuidToString(update->sessionId).c_str()); + jint jAvatarLength = update->avatarSize; + jobjectArray jMessageArray; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "Setting values from update coming from CCF Framework"); + jbyteArray jAvatar = myEnv->NewByteArray(update->avatarSize); + jMessageArray = (jobjectArray)myEnv->NewObjectArray(update->applicationCount, myEnv->FindClass("java/lang/String"), myEnv->NewStringUTF("")); + for(int i=0; iapplicationCount; i++) { + myEnv->SetObjectArrayElement(jMessageArray, i, myEnv->NewStringUTF(UuidToString(update->applications[i]).c_str())); + } + myEnv->SetByteArrayRegion(jAvatar, 0, update->avatarSize, (jbyte*)update->avatar); + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Sending sessionUpdate to Java layer of application."); + myEnv->CallVoidMethod(js_cb.jobj, methodId,jSessionId, jUserName, jDeviceName,jAvatar,jMessageArray,update->isAvailable,update->isAvailableCloud,update->isAvailableProximity); + + } + if(attached) retVal = js_cb.jvm->DetachCurrentThread(); + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] sessionUpdate completed."); +} + +void CALLBACK onLocalSessionUpdateCallback(PSTCSessionUpdate update, PVOID callbackArg) +{ + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Callback update localSessionUpdateCallback"); +} + +extern "C" JNIEXPORT jlong JNICALL Java_com_intel_csdk_JNILayer_STCCleanup + (JNIEnv *env, jobject obj, jlong){ + +} +//Function called when it is registered to STCListenForInvites() +// Receives the Invite Request from the Remote systems +// Sends the responds to the remote system stating accepting the connection + +void CALLBACK onInviteRequestCallback(PSTCInviteRequest message, PVOID callbackArg) +{ + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Entering inviteRequestCallback()"); + + int sTemp = STC_INVALID_SOCKET; + if(s_sock != sTemp){ + std::stringstream logdata; + STC_RESULT stcResult = STC_SUCCESS; + HSTCINVITE hInvite = message->hInvite; + bool temp = false; + stcResult = STCSendInviteResponse(s_sdkHandle,hInvite,temp); + if(stcResult != STC_SUCCESS){ + logdata << "[Nativechat] onInviteRequestCallback --> invitation rejected due to existing connection. "<GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal == JNI_EDETACHED) { + retVal = js_cb.jvm->AttachCurrentThread(&myEnv, NULL); + if(retVal != JNI_OK) { + return; + } + if(retVal == JNI_OK) { + attached = true; + retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal != JNI_OK) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to getEnv after attaching to JVM."); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Attached thread to JVM"); + } + } + else if(retVal == JNI_OK) { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Already attached thread to JVM"); + } + else if(retVal == JNI_EVERSION) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Wrong version of JNI to attach to JVM"); + } + else if(retVal == JNI_ERR) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] JNI Error"); + } + if(!myEnv) return; + jmethodID methodId = myEnv->GetMethodID(js_cb.jclazz, "onInvitationReceived", "(Ljava/lang/String;J)V"); + + if(message) { + jstring jSessionId = myEnv->NewStringUTF(UuidToString(message->sessionId).c_str()); + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Sending invite to Java layer of application."); + // calling java function onInvitationReceived + myEnv->CallVoidMethod(js_cb.jobj, methodId, jSessionId, message->hInvite); + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] invite sent"); + } + else { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Invite associated with session is NULL."); + } + if(attached) retVal = js_cb.jvm->DetachCurrentThread(); + if(retVal != JNI_OK && attached) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to detach thread from JVM"); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Returning from inviteRequestCallback()"); +} + +//Updating the application regarding the status of Peer connection. +void sendToJavaChat(std::string message) { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, std::string("[Nativechat] Received Message: " + message).c_str()); + jniStruct js_cb = s_jni_struct; + bool attached = false; + if(!js_cb.jvm) return; + JNIEnv *myEnv = NULL; + int retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal == JNI_EDETACHED) { + retVal = js_cb.jvm->AttachCurrentThread(&myEnv, NULL); + if(retVal != JNI_OK) { + return; + } + if(retVal == JNI_OK) { + attached = true; + retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal != JNI_OK) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to getEnv after attaching to JVM."); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Attached thread to JVM"); + } + } + else if(retVal == JNI_OK) { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Already attached thread to JVM"); + } + else if(retVal == JNI_EVERSION) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Wrong version of JNI to attach to JVM"); + } + else if(retVal == JNI_ERR) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] JNI Error"); + } + if(!myEnv) return; + jstring jMessage = myEnv->NewStringUTF(message.c_str()); + jmethodID methodId = myEnv->GetMethodID(js_cb.jclazz, "peerConnectionStatus", "(Ljava/lang/String;J)V"); + jlong temp = 25; + myEnv->CallVoidMethod(js_cb.jobj, methodId, jMessage, temp); + if(attached) retVal = js_cb.jvm->DetachCurrentThread(); + if(retVal != JNI_OK && attached) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to detach thread from JVM"); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] remote session disconnected"); +} + +//Receiving the text data from the remote user and sending it to the Application +void sendMessageToApp( std::string message) { + jniStruct js_cb = s_jni_struct; + + bool attached = false; + if(!js_cb.jvm) return; + JNIEnv *myEnv = NULL; + int retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal == JNI_EDETACHED) { + retVal = js_cb.jvm->AttachCurrentThread(&myEnv, NULL); + if(retVal != JNI_OK) { + return; + } + if(retVal == JNI_OK) { + attached = true; + retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal != JNI_OK) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to getEnv after attaching to JVM."); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Attached thread to JVM"); + } + } + else if(retVal == JNI_OK) { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Already attached thread to JVM"); + } + else if(retVal == JNI_EVERSION) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Wrong version of JNI to attach to JVM"); + } + else if(retVal == JNI_ERR) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] JNI Error"); + } + if(!myEnv) return; + + jstring jMessage = myEnv->NewStringUTF(message.c_str()); + jmethodID methodId = myEnv->GetMethodID(js_cb.jclazz, "onReceiveMsg", "(Ljava/lang/String;)V"); + myEnv->CallVoidMethod(js_cb.jobj, methodId, jMessage); + if(attached) retVal = js_cb.jvm->DetachCurrentThread(); + if(retVal != JNI_OK && attached) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to detach thread from JVM"); + } +} + +//Thread which will receive the chat text provided by remote user + +void recvChat() { + + +__android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] onReceiveMsg sent"); + + std::string local = ""; + char buffer[256] = {0}; + int bytesRead = recv(s_sock, buffer, sizeof(buffer)-1, 0); + while(bytesRead > 0) { + + std::stringstream logdata; + logdata << "[Nativechat] Chat Receive text : invitation to: " << buffer; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, logdata.str().c_str()); + sendMessageToApp(buffer); + + if( buffer[bytesRead-1] == -1) { + sendToJavaChat("Lost connection"); + break; + } + ::memset(&buffer, 0, 256); + bytesRead = recv(s_sock, buffer, sizeof(buffer)-1, 0); + } + + if(bytesRead <= 0) { + sendToJavaChat("Remote User left the conversation"); + + } + else { + sendToJavaChat("Socket connection has been disconnected."); + + } + + + s_sock = STC_INVALID_SOCKET; +} + +// Function called when It is registered to STCSetInviteCallback +//Functioned called When the connection handshake is completed and the application is now ready to communicate with the remote device +void CALLBACK onInviteCompleteCallback(PSTCInviteComplete message, PVOID callbackArg) +{ + + std::stringstream logdata; + logdata << "[Nativechat] inviteCompleteCallback : invitation to: " << message->statusCode; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, logdata.str().c_str()); + // Creating socket only when statucode is INVITE_COMPLETE or INVITE_ACCEPTED + if(message->statusCode == STC_INVITE_STATUS_INVITE_COMPLETE || message->statusCode == STC_INVITE_STATUS_INVITE_ACCEPTED) { + STC_RESULT stcResult = STC_SUCCESS; + if(STC_SUCCESS == (stcResult = STCConnectSocket(message->sdkHandle, &s_sock, message->hStream))) { + + std::thread mythread(recvChat); + mythread.detach(); + logdata.str(""); + logdata << "Called STCConnectSocket() with: SockRet= " << s_sock << " sdkHandle= " << message->sdkHandle << " hStream= " << message->hStream; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, std::string("[Nativechat] " + logdata.str()).c_str() ); + } + }// end of Creating socket + jniStruct js_cb = {0}; + js_cb = *((jniStruct*)callbackArg); + bool attached = false; + if(!js_cb.jvm) return; + JNIEnv *myEnv = NULL; + int retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal == JNI_EDETACHED) { + retVal = js_cb.jvm->AttachCurrentThread(&myEnv, NULL); + if(retVal != JNI_OK) { + return; + } + if(retVal == JNI_OK) { + attached = true; + retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal != JNI_OK) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to getEnv after attaching to JVM."); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Attached thread to JVM"); + } + } + else if(retVal == JNI_OK) { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Already attached thread to JVM"); + } + else if(retVal == JNI_EVERSION) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Wrong version of JNI to attach to JVM"); + } + else if(retVal == JNI_ERR) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] JNI Error"); + } + if(!myEnv) return; + jstring jSessionId = myEnv->NewStringUTF(UuidToString(message->sessionId).c_str()); + jmethodID methodId = myEnv->GetMethodID(js_cb.jclazz, "peerConnectionStatus", "(Ljava/lang/String;J)V"); + myEnv->CallVoidMethod(js_cb.jobj, methodId, jSessionId, message->statusCode); + if(attached) retVal = js_cb.jvm->DetachCurrentThread(); + if(retVal != JNI_OK && attached) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to detach thread from JVM"); + } + // Tell java land to go to chat view. +__android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Returning from inviteCompleteCallback()"); + +} + + +void CALLBACK onStreamEventUpdateCallback(PSTCStreamEvent message, PVOID callbackArg) +{ + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Callback update streamEventUpdateCallback"); +} + +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativePeerInvitation + * Signature: (Ljava/lang/String;)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativePeerInvitation + (JNIEnv *env, jobject obj, jstring sessionId) +{ + std::stringstream logdata; + const char* strUUID = (*env).GetStringUTFChars(sessionId, NULL); + STC_RESULT stcResult = STC_SUCCESS; + HSTCINVITE hInvite; + GUID remoteSessionId; + StringToUuid(strUUID, &remoteSessionId); + GUID myApplicationId; + StringToUuid(s_applicationId.c_str(), &myApplicationId); + int timeout = 60;//60 sec + + logdata << "[Nativechat] Sending invitation to: " << strUUID; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, logdata.str().c_str()); + + char* myData = "NATIVE CHAT BLOB"; + stcResult = STCSendInviteRequestEx((STC_HANDLE)s_sdkHandle, &hInvite, remoteSessionId, myApplicationId, timeout, (BYTE*)myData, strlen(myData)); + if(stcResult == STC_SUCCESS) { + logdata << "[Nativechat] invitation Send Sucessfuly to : " << strUUID; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, logdata.str().c_str()); + } + else + { + logdata << "[Nativechat] invitation Send failed to : " <ReleaseStringUTFChars(sessionId, strUUID); + return stcResult; +} + + +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativeInviteStatus + * Signature: (Ljava/util/UUID;Z)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeInviteStatus + (JNIEnv *env, jobject obj,jstring string, jlong handle, jboolean IsconnectionStatus){ + std::stringstream logdata; + STC_RESULT stcResult = STC_SUCCESS; + HSTCINVITE hInvite = handle; + stcResult = STCSendInviteResponse(s_sdkHandle,hInvite,IsconnectionStatus); + if(stcResult == STC_SUCCESS) + { + logdata << "[Nativechat] STCSendInviteResponse Return value : "<ReleaseStringUTFChars(chattext, strMessage); + return sent; +} + +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeDisconnectPeer + (JNIEnv *env, jobject obj, jobject jobj){ + + std::stringstream logdata; + int retval = shutdown(s_sock,SHUT_RDWR); + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "CLosing the socket connection"); + logdata << "[Nativechat] CLosing the socket connection Return value : "<GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal == JNI_EDETACHED) { + retVal = js_cb.jvm->AttachCurrentThread(&myEnv, NULL); + if(retVal != JNI_OK) { + return; + } + if(retVal == JNI_OK) { + attached = true; + retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal != JNI_OK) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to getEnv after attaching to JVM."); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] NodePublishStatus Attached thread to JVM"); + } + } + else if(retVal == JNI_OK) { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Already attached thread to JVM"); + } + else if(retVal == JNI_EVERSION) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Wrong version of JNI to attach to JVM"); + } + else if(retVal == JNI_ERR) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] JNI Error"); + } + if(!myEnv) return; + jstring jMessage = myEnv->NewStringUTF(Nodename.c_str()); + jmethodID methodId = myEnv->GetMethodID(js_cb.jclazz, "nodeStatusUpdates", "(Ljava/lang/String;I)V"); + + myEnv->CallVoidMethod(js_cb.jobj, methodId, jMessage, publishtype); + if(attached) retVal = js_cb.jvm->DetachCurrentThread(); + if(retVal != JNI_OK && attached) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to detach thread from JVM"); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Send nodeStatusUpdates to Android"); + +} +void JoinNode(std::string Nodename) +{ + std::stringstream logdata; + int stcResult= STC_SUCCESS; + DWORD ServiceStatus; + stcResult = STCQueryDiscoveryNodeServiceStatus(s_sdkHandle, &ServiceStatus); + if(stcResult == S_OK) + { + if(ServiceStatus==STC_SERVICESTATUS_SERVICEONLINE) + { + DWORD SubscriptionResult =0 ; + STCDiscoveryNodeCredentials nodedetails={0}; + GUID myApplicationId; + StringToUuid(s_applicationId.c_str(), &myApplicationId); + nodedetails.nodeFlags = STC_NODE_TYPE_PUBLISH; + nodedetails.applicationId = myApplicationId; +// const char* nodeName = (*env).GetStringUTFChars(node, NULL); //Nodename + strcpy(nodedetails.data,Nodename.c_str()); + logdata << "[Nativechat] Cloud Service is online --> Joining node ---------->1 : "< Joining node ---------->2 : "<discoveryNodeCredentials.data<<" the lasterror:"<lastError<<" The satus :"<status; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, logdata.str().c_str()); + + switch(Update->lastError) + { + case STC_NODE_ERROR_NOERROR: + { + switch(Update->status) + { + + case STC_DISCOVERYNODESTATUS_PUBLISHED : + {// Add the node name into the list + char Nodename[1024]; + strcpy(Nodename,Update->discoveryNodeCredentials.data); + std::string strNodename(Nodename); + NodePublishStatus(STC_DISCOVERYNODESTATUS_PUBLISHED,strNodename); + return; + + } + + case STC_DISCOVERYNODESTATUS_DELETED : + { + char Nodename[1024]; + strcpy(Nodename,Update->discoveryNodeCredentials.data); + std::string strNodename(Nodename); + NodePublishStatus(STC_DISCOVERYNODESTATUS_DELETED,strNodename); + break; + } + + }//End of switch Update->status + + break; + } + case STC_NODE_ERROR_NODEEXISTS: + { +// CString msg; +// msg.Format(L" The node %s trying to be created already exists.",convertFromUTF8(Update->discoveryNodeCredentials.data).c_str()); +// ::MessageBox(Local_Hwnd_dlg,msg,L"File Transfer",MB_OK); + // Removing the Node from the list + logdata << "[Nativechat] The node "<< Update->discoveryNodeCredentials.data<<" created already : Please join the node"; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, logdata.str().c_str()); + + char Nodename[1024]; + strcpy(Nodename,Update->discoveryNodeCredentials.data); + JoinNode(Nodename); + break; + } + case STC_NODE_ERROR_NODENOTFOUND: + { +// CString msg; +// msg.Format(L" The node %s does not exist.Please create the node",convertFromUTF8(Update->discoveryNodeCredentials.data).c_str()); +// ::MessageBox(Local_Hwnd_dlg,msg,L"File Transfer",MB_OK); + + + logdata << "[Nativechat] The node "<< Update->discoveryNodeCredentials.data<<" doesnt exist Please create the node"; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, logdata.str().c_str()); + // Removing the Node from the list + break; + } + case STC_NODE_ERROR_INSUFFICIENTPRIVILEGES://Insufficient privileges. + case STC_NODE_ERROR_INTERNALERROR:// The process performed on the node has experienced an internal error. If the problem persists, please contact a member of the CCF team. + case STC_NODE_ERROR_UNKNOWNERROR ://The process performed on the node has experienced an unknown error. If the problem persists, please contact a member of the CCF team. + break; + } + +} + + + +JNIEXPORT jint JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeConnectNode + (JNIEnv *env, jobject obj, jstring node, jboolean visible){ + std::stringstream logdata; + int stcResult= STC_SUCCESS; + DWORD ServiceStatus; + + stcResult = STCQueryDiscoveryNodeServiceStatus(s_sdkHandle, &ServiceStatus); + if(stcResult == S_OK) + { + if(ServiceStatus==STC_SERVICESTATUS_SERVICEONLINE) + { + + STCDiscoveryNodeCredentials nodedetails={0}; + GUID myApplicationId; + StringToUuid(s_applicationId.c_str(), &myApplicationId); + nodedetails.nodeFlags = STC_NODE_TYPE_PUBLISH; + nodedetails.applicationId = myApplicationId; + const char* nodeName = (*env).GetStringUTFChars(node, NULL); //Nodename + strcpy(nodedetails.data,nodeName); + logdata << "[Nativechat] Cloud Service is online --> Creating node "< Leaving node "< +#define CSDK_TAG "C_NativeChat" + +#endif +#endif /* STC_RESULTS_H_ */ diff --git a/samples/EarthWarrior3D/proj.android/jni/com_intel_csdk_wrapper_JNIMediator.h b/samples/EarthWarrior3D/proj.android/jni/com_intel_csdk_wrapper_JNIMediator.h new file mode 100755 index 0000000..f522934 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/jni/com_intel_csdk_wrapper_JNIMediator.h @@ -0,0 +1,93 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class com_intel_csdk_wrapper_JNIMediator */ +typedef enum +{ +STC_ERROR_WIFI_NOT_AVAILABLE = -5, +STC_ERROR_BLUETOOTH_NOT_AVAILABLE, +STC_ERROR_INTERNET_NOT_AVAILABLE, +STC_ERROR_APPLICATION_ID, +STC_ERROR_CLIENT_ID, +STC_ERROR_CLIENT_SECRET, +STC_ERROR_ARGUMENT_ERROR, +STC_ERROR_INITIALIZE_FAIL, +STC_ERROR_DISCOVERU_FAIL, +}StcError; + +#ifndef _Included_com_intel_csdk_wrapper_JNIMediator +#define _Included_com_intel_csdk_wrapper_JNIMediator +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativeInit + * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeInit + (JNIEnv *, jobject, jstring, jstring, jstring, jstring); + +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativeIdentity + * Signature: (Ljava/lang/String;Ljava/lang/String;[B)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeIdentity + (JNIEnv *, jobject, jstring, jstring, jbyteArray,jint); + +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativePeerInvitation + * Signature: (Ljava/lang/String;)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativePeerInvitation + (JNIEnv *, jobject, jstring); + +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativeInviteStatus + * Signature: (Ljava/util/UUID;Z)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeInviteStatus + (JNIEnv *, jobject, jstring, jlong, jboolean); + +/* + * Class: com_intel_csdk_wrappjlonger_JNIMediator + * Method: nativeSendMsg + * Signature: (Ljava/lang/String;)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeSendMsg + (JNIEnv *, jobject, jstring); + +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativeDisconnectPeer + * Signature: (Ljava/util/UUID;)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeDisconnectPeer + (JNIEnv *, jobject, jobject); + +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativeDestroyConnection + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeDestroyConnection + (JNIEnv *, jobject); + +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeRegisterDiscovery(); + +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeRegisterCommunication(); + +JNIEXPORT jint JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeConnectNode + (JNIEnv *, jobject, jstring, jboolean); + +JNIEXPORT jint JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeDisconnectNode + (JNIEnv *, jobject, jstring); + +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeQueryCloudStatus(); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/samples/EarthWarrior3D/proj.android/jni/hellocpp/main.cpp b/samples/EarthWarrior3D/proj.android/jni/hellocpp/main.cpp new file mode 100755 index 0000000..5cf943f --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/jni/hellocpp/main.cpp @@ -0,0 +1,77 @@ +#include "AppDelegate.h" +#include "cocos2d.h" +#include "CCEventType.h" +#include "../../../Classes/HelloWorldScene.h" +#include "../../../Classes/MainMenuScene.h" +#include "../../../Classes/FriendControlScene.h" +#include "../../../Classes/GameLayer.h" +#include "platform/android/jni/JniHelper.h" +#include +#include + + +#define LOG_TAG "main" +#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__) + +using namespace cocos2d; + +void cocos_android_app_init (JNIEnv* env, jobject thiz) { + LOGD("cocos_android_app_init"); + AppDelegate *pAppDelegate = new AppDelegate(); +} + +extern "C" { + + void Java_com_cocos2dx_moon3d_AppActivity_SendGift(JNIEnv* env, jobject thiz, jstring type, jstring count){ + const char *sType = env->GetStringUTFChars(type, NULL); + LOGD("Java_com_cocos2dx_moon3d_AppActivity_SendGift type:%s", sType); + + HelloWorld *pScene = (HelloWorld *)Director::getInstance()->getRunningScene(); + if(pScene && pScene->getChildByTag(100) && pScene->getChildByTag(100)->getChildByTag(123)) + { + GameLayer *pLayer = (GameLayer *)pScene->getChildByTag(100)->getChildByTag(123); + pLayer->addNodeAsync(sType); + } + + env->ReleaseStringUTFChars(type, sType); + } + + void Java_com_cocos2dx_moon3d_AppActivity_StartGame(JNIEnv* env, jobject thiz, jstring something){ + const char *sTemp = env->GetStringUTFChars(something, NULL); + + LOGD("Java_org_cocos2dx_cpp_AppActivity_StartGame something:%s", sTemp); + + Scene *pScene = (Scene *)Director::getInstance()->getRunningScene(); + if(pScene && pScene->getChildByTag(1001)) + { + MainMenuScene *pLayer = (MainMenuScene *)pScene->getChildByTag(1001); + pLayer->jniStartGame(sTemp); + } + + env->ReleaseStringUTFChars(something, sTemp); + } + + void Java_com_cocos2dx_moon3d_AppActivity_StartControl(JNIEnv* env, jobject thiz){ + + LOGD("Java_org_cocos2dx_cpp_AppActivity_StartGame something:"); + + Scene *pScene = (Scene *)Director::getInstance()->getRunningScene(); + if(pScene && pScene->getChildByTag(1001)) + { + MainMenuScene *pLayer = (MainMenuScene *)pScene->getChildByTag(1001); + pLayer->jniStartControl(); + } + } + + void Java_com_cocos2dx_moon3d_AppActivity_ReturnMainMenu(JNIEnv* env, jobject thiz){ + + LOGD("Java_org_cocos2dx_cpp_AppActivity_ReturnMainMenu"); + + Scene *pScene = (Scene *)Director::getInstance()->getRunningScene(); + if(pScene && pScene->getChildByTag(1002)) + { + FriendControl *pLayer = (FriendControl *)pScene->getChildByTag(1002); + pLayer->jniReturnMainMenu(); + } + } +} diff --git a/samples/EarthWarrior3D/proj.android/jni/include/compatibility.h b/samples/EarthWarrior3D/proj.android/jni/include/compatibility.h new file mode 100755 index 0000000..c5cac9b --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/jni/include/compatibility.h @@ -0,0 +1,285 @@ +//****************************************************************** +// +// Copyright 2007-2014 Intel Corporation All Rights Reserved. +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// +//****************************************************************** +// File name: +// compatibility.h +// +// Description: +// Header for Intel Common_Library cross-platform compatibility. +// +// +// +//********************************************************************* + + +#ifndef __COMPATIBILITYH__ +#define __COMPATIBILITYH__ + +// Remove this flag to return to using the non-CS output debug logging. +#define USE_STC_DEBUG_LOGGING 1 + +#include +#include +#include +#include +#include +#include +#include + +// Workaround for a re-def issue between stdint.h and intsafe.h in VS-2010 +#if defined(WIN32) || defined(_WIN32) +#undef INT8_MIN +#undef INT16_MIN +#undef INT32_MIN +#undef INT8_MAX +#undef INT16_MAX +#undef INT32_MAX +#undef UINT8_MAX +#undef UINT16_MAX +#undef UINT32_MAX +#undef INT64_MIN +#undef INT64_MAX +#undef UINT64_MAX +#include +#undef INT8_MIN +#undef INT16_MIN +#undef INT32_MIN +#undef INT8_MAX +#undef INT16_MAX +#undef INT32_MAX +#undef UINT8_MAX +#undef UINT16_MAX +#undef UINT32_MAX +#undef INT64_MIN +#undef INT64_MAX +#undef UINT64_MAX +#endif + +#include + +#ifdef _WINRT +#include "debug.h" +#endif + +#if defined(_WINRT) || defined(__APPLE__) +#define _RT(str) str +#define RTCHAR char +#else +#define _RT(str) _T(str) +#define RTCHAR TCHAR +#endif + +#if defined(WIN32) || defined(_WIN32) || defined(WINCE) || defined(_WIN32_WCE) +#include +#include +#include +#include +#else +#include +#include +#include +#include +#include +#include +#include +#if !defined(__ANDROID__) +#include +#include +#endif +// #include +#include "wintypes.h" + +#define GCC_VERSION (__GNUC__*10000+__GNUC_MINOR__*100+__GNUC_PATCHLEVEL__) +#endif + +#define __COMMONLIBDECL__ +#define __COMMONLIBEXTERN__ + +// Make certain that both _DEBUG and DEBUG are defined if either is defined +#if defined(_DEBUG) && !defined(DEBUG) +#define DEBUG +#endif +#if defined(DEBUG) && !defined(_DEBUG) +#define _DEBUG +#endif + +#if (defined(DEBUG) || defined(_DEBUG)) && defined(NDEBUG) +#undef NDEBUG +#endif + +#if defined(WIN32) || defined(_WIN32) || defined(WINCE) || defined(_WIN32_WCE) + +#ifndef min +#define min(x, y) (((x)<(y))? (x): (y)) +#endif +#ifndef max +#define max(x, y) (((x)>(y))? (x): (y)) +#endif + +/* The MS compiler has issues exporting templates with nested types + from a DLL, so this option is not expected to be used.*/ +#ifdef COMMONLIB_RELEASE_DLL +#undef __COMMONLIBDECL__ +#undef __COMMONLIBEXTERN__ +#ifdef __IMPORTDLL__ +#define __COMMONLIBDECL__ __declspec(dllimport) +#define __COMMONLIBEXTERN__ extern +#else +#ifdef __EXPORTDLL__ +#define __COMMONLIBDECL__ __declspec(dllexport) +#define __COMMONLIBEXTERN__ +#else +#define __COMMONLIBDECL__ +#define __COMMONLIBEXTERN__ +#endif +#endif +#endif + +#ifdef __cplusplus +class InterlockLockDebugMsg +{ + public: + InterlockLockDebugMsg(); + ~InterlockLockDebugMsg(); +}; +#define DEBUGMSG_TRANSACT() InterlockLockDebugMsg() +#else +#define DEBUGMSG_TRANSACT() +#endif + +#if !defined(WINCE) && !defined(_WIN32_WCE) +#if (defined(WIN32) || defined(_WIN32)) && !defined(_WINRT) +#if defined(USE_STC_DEBUG_LOGGING) && defined(__cplusplus) +#include "DebugLogging.h" + +#define RETAILMSG(cond, printf_exp) ((cond)? (::Intel::DebugLogging::DbgPrintF printf_exp): 0) +#ifdef DEBUG +#define DEBUGMSG(cond, printf_exp) ((cond)? (::Intel::DebugLogging::DbgPrintF printf_exp): 0) +#else +#define DEBUGMSG(cond, printf_exp) (0) +#endif +#else +/* Create a mapping for RETAILMSG and DEBUGMSG in the non-CE Windows C++ environment */ +#ifdef __cplusplus +extern "C" { +#endif +size_t EXTOutputDebugStringFT(const TCHAR *format, ...); +#ifdef __cplusplus +} +#endif + +#define RETAILMSG(cond, printf_exp) ((cond)? (EXTOutputDebugStringFT printf_exp): 0) +#ifdef DEBUG +#define DEBUGMSG(cond, printf_exp) ((cond)? (EXTOutputDebugStringFT printf_exp): 0) +#else +#define DEBUGMSG(cond, printf_exp) (0) +#endif +#endif +#elif defined(__ANDROID__) || defined(__APPLE__) || defined(_WINRT) +#define RETAILMSG(cond, printf_exp) DebugPrint(cond, printf_exp) +#ifdef DEBUG +#define DEBUGMSG(cond, printf_exp) DebugPrint(cond, printf_exp) +#else +#define DEBUGMSG(cond, printf_exp) (0) +#endif +#endif +#endif +#else /* defined(WIN32) || defined(_WIN32) || defined(WINCE) || defined(_WIN32_WCE) */ + +#define __COMMONLIBDECL__ + +#if !defined(__CYGWIN__) && !defined(__stdcall) +#define __stdcall +#endif + +typedef void *LPVOID; +typedef unsigned int DWORD; +typedef unsigned int BOOL; +typedef unsigned char BYTE; +typedef signed long LONG; +typedef wchar_t TCHAR; +typedef wchar_t OLECHAR; +typedef OLECHAR *BSTR; +typedef const OLECHAR *CONST_BSTR; +typedef void *HANDLE; +typedef void *HMODULE; +typedef void (*FARPROC)(void); +typedef unsigned long long ULONGLONG; + +#if defined(UNICODE) || defined(_UNICODE) +#define _T(str) L##str +#define _stprintf(buf, fmt, args...) swprintf((buf), INT_MAX, (fmt), args) +#define _tcscmp(str1, str2) wcscmp((str1), (str2)) +#define _tcsstr(str1, str2) wcsstr((str1), (str2)) +#define _tcsncpy_s(str1, n1, str2, n2) wcsncpy((str1), (str2), (n2)) +#define _stscanf(str, fmt, args...) swscanf((str), (fmt), args) +#define _tcslen(str) wcslen((str)) +#define _tprintf(fmt, args...) wprintf((fmt), args) +#else +#ifndef _T +#define _T(str) str +#endif +#define _stprintf(buf, fmt, args...) sprintf((buf), (fmt), args) +#define _tcscmp(str1, str2) strcmp((str1), (str2)) +#define _tcsstr(str1, str2) strstr((str1), (str2)) +#define _tcsncpy_s(str1, n1, str2, n2) strncpy((str1), (str2), (n2)) +#define _stscanf(str, fmt, args...) sscanf((str), (fmt), args) +#define _tcslen(str) strlen((str)) +#define _tprintf(fmt, args...) printf((fmt), args) +#endif + +#define RETAILMSG(zone, macro) ((zone)? _tprintf macro: 0) + +#ifdef DEBUG +#define DEBUGMSG(zone, macro) ((zone)? _tprintf macro: 0) +#else +#define DEBUGMSG(zone, macro) ((void)0) +#endif + +#define DEBUGMSG_TRANSACT() + +#define INFINITE 0xFFFFffff +#define WAIT_OBJECT_0 0 + +#define SUCCEEDED(result) ((result)>=0) +#define FAILED(result) ((result)<0) +#define S_FALSE 1 +#define S_OK 0 + +#if !defined(ERROR_SUCCESS) +#define ERROR_SUCCESS 0 +#endif + +// This may or may not function properly on multi-core systems. +/// \todo Improve this behavior or use library functions +#define InterlockedIncrement(value) ((*(value))++) +#define InterlockedDecrement(value) ((*(value))--) + +using std::max; +using std::min; + +#endif /* defined(WIN32) || defined(_WIN32) || defined(WINCE) || defined(_WIN32_WCE) */ + +/// Helper function to swap an array of bytes (used for GUID processing). In general this is +/// used as a replacement for ntohs and ntohl, which are not guaranteed to be available. +/// \todo Move this into a utility class as a static function +void swap_byte_array(void *vec, const size_t bytes); + +#ifndef stc_new +#if defined(WIN32) || defined(_WIN32) || defined(WINCE) || defined(_WIN32_WCE) +#define _CRTDBG_MAP_ALLOC +#include +#endif + +#ifdef DEBUG +#define stc_new new (_CLIENT_BLOCK, __FILE__, __LINE__) +#else +#define stc_new new (std::nothrow) +#endif +#endif + +#endif /*__COMPATIBILITYH__*/ diff --git a/samples/EarthWarrior3D/proj.android/jni/include/guids.h b/samples/EarthWarrior3D/proj.android/jni/include/guids.h new file mode 100755 index 0000000..fe82756 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/jni/include/guids.h @@ -0,0 +1,256 @@ +//****************************************************************** +// +// Copyright 2005-2014 Intel Corporation All Rights Reserved. +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// +//****************************************************************** +// File name: +// guids.h +// +// Description: +// Header for Intel GUID parsing/storage helper functions +// +// +// +//********************************************************************* + + +#pragma once + +#ifndef __GUIDSH__ +#define __GUIDSH__ + +//NOTE: This is a temporary fix. A better solution would be to remove +//the dependency on APIs that are not intended to be public from libraries +//that use these APIs (portable C SDK) +#pragma GCC visibility push(default) + +#include "compatibility.h" + +#if defined(_WIN32) || defined(WIN32) || defined(WINCE) || defined(_WIN32_WCE) +#include "STLSupport.h" +#include "hash.h" +#include +#include +#endif + +#ifdef __ANDROID__ +#include "wintypes.h" +#endif + +#if !defined(_WIN32) && !defined(WIN32) && !defined(WINCE) && !defined(_WIN32_WCE) && !defined(GUID_NULL) +#include "uuid.h" +#define GUID_NULL NULL_GUID +#endif + +// If this is not a WINDOWS or ANDROID platform, define GUID +#if !defined(WIN32) && !defined(WINCE) && !defined(__ANDROID__) && !defined(__CYGWIN__) && !defined(__APPLE__) && !defined(__linux__) +typedef struct GUID +{ + unsigned int Data1; + unsigned short Data2; + unsigned short Data3; + unsigned char Data4[8]; +} GUID_t; +#endif + +#if defined(WIN32) && !defined(_WINRT) +typedef struct _GUID UUID_t; +#endif + +// If we are not using the local STL implementation or the STLPort +#if !defined(USE_STC_STL_LITE) && !defined(USE_STLPORT_STL) + +// ... and if this is a windows platform +#if defined(_WIN32) || defined(WIN32) || defined(WINCE) || defined(_WIN32_WCE) + +/// Specialization of the hash_compare traits template to provide hashing behavior using GUIDs as keys. +template <> class __COMMONLIBDECL__ stdext_dropin::hash_compare +{ + public: + /// Default bucket_size parameter + static const size_t bucket_size = 4; + /// Default minimum number of hash buckets + static const size_t min_buckets = 8; + + /// Functor implementing a hashing function on a GUID. This function uses a straighforward + /// hashing function on the entire GUID value (since some parts of a GUID are MAC-addresses + /// and remain the same on some architectures for multiple GUID instances). + /// \param[in] guid Globally unique identifier to hash. + /// \return 32-bit hash of the passed-in GUID value. + size_t operator()(const GUID &guid) const + { + size_t hash_val = 0; + for (int i = 0; i < sizeof(guid) / sizeof(DWORD); ++i) + { + hash_val <<= 3; + hash_val ^= ((DWORD *)&guid)[i]; + } + return hash_val; + } + + /// Functor implementing a less-than operator between GUIDs. + /// \param[in] guid1 GUID to compare. + /// \param[in] guid2 GUID to compare to guid1. + /// \return true iff guid1 is less than guid2 in the sense of being of a numerically smaller + /// value when the GUIDs are taken to be a 16-byte integers. + bool operator()(const GUID &guid1, const GUID &guid2) const + { + return memcmp(&guid1, &guid2, sizeof(guid1)) < 0; + } +}; + + +namespace std +{ + /// Specialization of the less functor to provide sorting behavior using GUIDs as keys. + /// \todo Convert to use std_dropin + template <> class __COMMONLIBDECL__ less + { + public: + /// Functor implementing a less-than operator between GUIDs. + /// \param[in] guid1 GUID to compare. + /// \param[in] guid2 GUID to compare to guid1. + /// \return true iff guid1 is less than guid2 in the sense of being of a numerically smaller + /// value when the GUIDs are taken to be a 16-byte integers. + bool operator()(const GUID &guid1, const GUID &guid2) const + { + return memcmp(&guid1, &guid2, sizeof(guid1)) < 0; + } + }; +} +#endif +#endif // !USE_STC_STL_LITE + + +#if (defined(_WIN32) || defined(WIN32) || defined(WINCE) || defined(_WIN32_WCE)) && !defined(_WINRT) + +namespace STC_std +{ + // Specialization of the hash functor to provide hashing behavior on the GUID type. + template <> struct hash + { + /// Functor implementing a hashing operator on a GUID type. + /// \param[in] guid GUID to hash. + /// \return 32-bit hash code representing the value of this GUID in the + /// finite group of hash codes. + size_t operator()(const GUID &guid) const + { + size_t hash_val = 0; + for (int i = 0; i < sizeof(guid) / sizeof(DWORD); ++i) + { + hash_val <<= 3; + hash_val ^= ((DWORD *)&guid)[i]; + } + return hash_val; + } + }; + + /// Specialization of the equal_to functor to provide an equality comparison on the GUID type. + template <> struct equal_to + { + /// Functor implementing an equality operator on a GUID type. + /// \param[in] guid1 GUID to compare. + /// \param[in] guid2 GUID to compare to guid1. + /// \return true if guid1==guid2, false otherwise + bool operator()(const GUID &guid1, const GUID &guid2) const + { + return !memcmp(&guid1, &guid2, sizeof(guid1)); + } + }; + + /// Specialization of the less functor to provide sorting behavior using GUIDs as keys. + template <> struct less + { + /// Functor implementing a less-than operator between GUIDs. + /// \param[in] guid1 GUID to compare. + /// \param[in] guid2 GUID to compare to guid1. + /// \return true iff guid1 is less than guid2 in the sense of being of a numerically smaller + /// value when the GUIDs are taken to be a 16-byte integers. + bool operator()(const GUID &guid1, const GUID &guid2) const + { + return memcmp(&guid1, &guid2, sizeof(guid1)) < 0; + } + }; + +} + +namespace Intel +{ + /// A global helper function to write a GUID to the kernel debug message + /// output queue in debug mode (only). + void debugWriteGUID(const GUID &guid); + /// A global helper function to write a GUID to the kernel debug message + /// output queue. + void retailWriteGUID(const GUID &guid); +} +#endif // defined(_WIN32) || defined(WIN32) || defined(WINCE) || defined(_WIN32_WCE) + + +namespace Intel +{ + class GUIDObjectBase + { + public: + GUIDObjectBase(GUID guid = GUID_NULL) : _guid(guid) {} + + inline operator const GUID() const throw() { return _guid; } + inline operator GUID() const throw() { return _guid; } + + static GUID createGUID(); + + inline bool operator==(const GUID &right) const throw() { return memcmp(&_guid, &right, sizeof(GUID)) == 0; } + inline bool operator!=(const GUID &right) const throw() { return memcmp(&_guid, &right, sizeof(GUID)) != 0; } + inline bool operator< (const GUID &right) const throw() { return memcmp(&_guid, &right, sizeof(GUID)) < 0; } + inline bool operator> (const GUID &right) const throw() { return memcmp(&_guid, &right, sizeof(GUID)) > 0; } + inline bool operator<=(const GUID &right) const throw() { return memcmp(&_guid, &right, sizeof(GUID)) <= 0; } + inline bool operator>=(const GUID &right) const throw() { return memcmp(&_guid, &right, sizeof(GUID)) >= 0; } + + inline const GUID &GetGuid() const { return _guid; } + + protected: + inline void SetGuid(const GUID &guid) { _guid = guid; } + private: + GUIDObjectBase(const GUIDObjectBase &); + GUIDObjectBase &operator=(const GUIDObjectBase &); + + private: + /// The object GUID + GUID _guid; + }; +} + + +namespace Intel +{ + /// Global comparison operators on GUID +#if !defined(_WIN32) && !defined(WIN32) && !defined(WINCE) && !defined(_WIN32_WCE) + bool operator==(const GUID &guid1, const GUID &guid2); + bool operator!=(const GUID &guid1, const GUID &guid2); +#endif + + + struct GUIDUtils + { +#if defined(WIN32) || defined(_WIN32) || defined(WINCE) || defined(_WIN32_WCE) + static std::string GUIDToString(const GUID &id); +#else + static std::string GUIDToString(const UUID_t &id); +#endif + + static GUID stringToGUID(const std::string &source); + }; +} + +bool operator<(const GUID &guid1, const GUID &guid2); +std::ostream &operator<<(std::ostream &os, const GUID &g); +std::istream &operator>>(std::istream &is, GUID &g); +GUID operator^(const GUID &guid1, const GUID &guid2); +GUID operator|(const GUID &guid1, const GUID &guid2); +GUID operator&(const GUID &guid1, const GUID &guid2); + + +#pragma GCC visibility pop + +#endif // __GUIDSH__ diff --git a/samples/EarthWarrior3D/proj.android/jni/include/osal.h b/samples/EarthWarrior3D/proj.android/jni/include/osal.h new file mode 100755 index 0000000..eb2376a --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/jni/include/osal.h @@ -0,0 +1,234 @@ +//****************************************************************** +// +// Copyright 2010-2014 Intel Corporation All Rights Reserved. +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// +//****************************************************************** +// File name: +// osal.h +// +// Description: Interface to the Operating System Abstraction Layer (OSAL). This +// module is used to facilitate porting to different OSes. +// +// +//********************************************************************* + +#ifndef __CS_OSAL__ +#define __CS_OSAL__ + +#include "platformtypes.h" + +typedef void *Mutex_t; +typedef void *RemoveLock_t; +typedef void *Thread_t; +typedef void *Event_t; + +// OSAL is only used in the portable stack +#define PORTABLE_STACK 1 + +#define OSAL_MAX(a, b) ((a) > (b)?(a):(b)) +#define OSAL_MIN(a, b) ((a) < (b)?(a):(b)) + +#define OSAL_TIMEOUT_INFINITE (0) +#define OSAL_TIMEOUT (1) +#define OSAL_DEFAULT_STACK_SIZE (0) +#define OSAL_THREAD_CLOSE_MILLISECOND_WAIT (500)_ + +/* Error codes return by this module */ +#define OSAL_ERROR (-200) +#define OSAL_ERROR_INVALID_PARAMETER (-201) +#define OSAL_ERROR_OVERFLOW (-202) +#define OSAL_ERROR_BUSY (-203) + +/* + Description: Prototype for the thread functions (See OSAL_Thread*). + context - optional parameter passed with the call the OSAL_ThreadCreate. + returns - not used + */ +typedef int (*OSAL_ThreadFunction_t)(void *context); + +//TODO In progress +RemoveLock_t OSAL_RemoveLockCreate(const char *name); +void OSAL_RemoveLockWaitAndFree(RemoveLock_t removeLock); +void OSAL_RemoveLockLock(RemoveLock_t removeLock); +void OSAL_RemoveLockRelease(RemoveLock_t removeLock); + +/* + Description: Creates a mutex + name - Name of the mutex (used for debugging error reporting) + returns - A Mutex_t on success. NULL on error. +*/ +Mutex_t OSAL_MutexCreate(const char *name); + +/* + Description: Frees a previously create mutex + mutex - mutex from a successful call to OSAL_MutexCreate. +*/ +void OSAL_MutexFree(Mutex_t mutex); + +/* + Description: Locks a the mutex. + mutex - mutex from a successful call to OSAL_MutexCreate. +*/ +void OSAL_MutexLock(Mutex_t mutex); + +/* + Description: Locks a the mutex + mutex - mutex from a successful call to OSAL_MutexCreate. +*/ +int OSAL_MutexTryLock(Mutex_t mutex); + +/* + Description: Releases a previously locked mutex (call to OSAL_MutexLock). + mutex - mutex from a successful call to OSAL_MutexCreate. +*/ +void OSAL_MutexRelease(Mutex_t mutex); + +#define THREAD_SELF_CLEAN 0x1 + +/* + Description: Creates a thread + startAddress - Function to be run as a thread (see OSAL_ThreadFunction_t). + threadContext - optional parameter (which will be included in OSAL_ThreadFunction_t parameter. + stackSize - Size of the thread stack, or OSAL_DEFAULT_STACK_SIZE; + flags - reserved . + name - Name of the thread (used for debugging error reporting). + return - handle to the thread, NULL on error. +*/ +Thread_t OSAL_ThreadCreate(OSAL_ThreadFunction_t startAddress, void *threadContext, + DWord_t stackSize, int flags = 0, const char *threadName = ""); + +/* + Description: Closes a previously created thread. This function will block waiting for + the thread up to OSAL_THREAD_CLOSE_MILLISECOND_WAIT. After the timeout, + if the thread has not closed the thread context will not be free (error + condition). + handle - Previously created handle (from OSAL_ThreadCreate). +*/ +void OSAL_ThreadClose(Thread_t handle); + +/* + Description: Set the name of the current thread + + name - The name to assign to the current thread + + return - 0 on success, otherwise, and error code + */ +int OSAL_ThreadSetName(const char *name); + + +template +Thread_t StartSharedThread(const T &sharedPtr, OSAL_ThreadFunction_t funct, const char *name, + int flags = 0) +{ + Thread_t retVal = 0; + + // myInterface is a pointer to a shared pointer, because we cannot cast + // a shared pointer to (void *) to pass it to InterfaceThread. When + // the thread terminates, it is responsible for freeing newInterface. + T *myPtr = new T(); + (*myPtr) = sharedPtr; + + retVal = OSAL_ThreadCreate(funct, myPtr, 0, flags, name); + + return retVal; +} + +/* + Description: Sleeps given amount of time. + milliseconds - number of milliseconds to sleep +*/ +void OSAL_Sleep(int milliseconds); + +/* + Description: Find the system current millisecond count + return - arbitrary start value revolving counter; +*/ +DWord_t OSAL_GetTickCount(void); + +/* + Description: Create an event object + name - Name of the event (used for debugging and error reporting) + returns - The Event_t used for all other OSAL_Event functions +*/ +Event_t OSAL_EventCreate(const char *name); + +/* + Description: Free a previously created event object + event - Event_t from a successful call to OSAL_EventCreate. +*/ +void OSAL_EventFree(Event_t event); + +/* + Description: Set an event on a previously created event object + event - Event_t from a successful call to OSAL_EventCreate. + eventFlagsToSet - This value will be logically ORed into the event value. The OSAL_EventWait + will get the combinations of all events set. +*/ +void OSAL_EventSet(Event_t event, DWord_t eventFlagsToSet); + +/* + Description: Wait on an event. + event - Event_t from a successful call to OSAL_EventCreate. + eventFlagsSet - Logical OR of all calls to OSAL_EventSet. Note, this value is not + cleared; therefore, any value passed in will be ORed with any events + values set. + millisecondTimeout - number of milliseconds to wait for the event. This value can be set + to OSAL_TIMEOUT_INFINITE. + returns - Negative value on error, 0 for event, and OSAL_TIMEOUT for timeout. +*/ +int OSAL_EventWait(Event_t event, DWord_t *eventFlagsSet, int millisecondTimeout); + + +/* + Description: Generates a pseudo random number + returns - The random number generated. +*/ +DWord_t OSAL_PseudoRandomWord(); + +/* + Description: gets the cloud.xml file path, that overrides built in settings + returns - wether it got path + */ +extern "C" bool OSAL_GetCloudPath(char *buf, unsigned int length); + +/* + Description: get the proxy host server, port, and URI (if applicable) + returns - whether the command was successful, true does not mean there is a valid proxy (it could be empty) + */ +extern "C" bool OSAL_GetProxyInfo(const char *serverURI, char *proxyHost, int hostlen, + int *proxyPort, char *proxyURI, int urilen); + +/* + Description: get the default directory in which we save agent logs. + returns - the character length of the path. if the length passed is less than the length required + call again passing a buffer and length that match the return of the first call. + */ +extern "C" DWord_t OSAL_GetDefaultAgentLoggingPath(char *buf, unsigned int length); + +/* + Description: get the version of the current OS as a string. + returns - the character length of the version. if the length passed is less than the length required + call again passing a buffer and length that match the return of the first call. + */ +extern "C" DWord_t OSAL_GetOSVersionString(char *buf, unsigned int length); + +/* + Description: get the memory size of the current device, in kilobytes. + returns - the memory size of the current device, in kilobytes, or 0 on error. + */ +extern "C" DWord_t OSAL_GetDeviceMemoryInKilobytes(); + +/* + Description: get the available disk size of the current device, in megabytes. + returns - the available disk size of the current device, in megabytes, or 0 on error. + */ +extern "C" DWord_t OSAL_GetDeviceSpaceInMegabytes(); + +int OSAL_DWordToString(DWord_t dword, char *outString, int outStringLength, int radix); + +// The following is declared extern "C" because iOS needs it +extern "C" bool OSAL_GetLocale(char *locale, int *localeLen); + +#endif diff --git a/samples/EarthWarrior3D/proj.android/jni/include/platformtypes.h b/samples/EarthWarrior3D/proj.android/jni/include/platformtypes.h new file mode 100755 index 0000000..57be781 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/jni/include/platformtypes.h @@ -0,0 +1,31 @@ +//****************************************************************** +// +// Copyright 2010-2014 Intel Corporation All Rights Reserved. +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// +//****************************************************************** +// File name: +// platformtypes.h +// +// Description: +// +// +// +// +//********************************************************************* + + + +#ifndef __CS_PLATFORM_TYPE__ +#define __CS_PLATFORM_TYPE__ + +/* unsigned types */ +typedef unsigned char Byte_t; + +typedef unsigned short Word_t; + +typedef unsigned int DWord_t; + +#endif + diff --git a/samples/EarthWarrior3D/proj.android/jni/include/stcapi.h b/samples/EarthWarrior3D/proj.android/jni/include/stcapi.h new file mode 100755 index 0000000..74cb98f --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/jni/include/stcapi.h @@ -0,0 +1,2396 @@ +//****************************************************************** +// +// Copyright 2011-2014 Intel Corporation All Rights Reserved. +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// +//****************************************************************** +// File name: +// stcapi.h +// +// +//********************************************************************* + +#pragma once + +#if defined(_WIN32) || defined(_WIN64) +#include +#ifdef STCAPI_EXPORTS +#define STC_API __declspec(dllexport) +#else +#define STC_API __declspec(dllimport) +#endif +// Temporarily only available for Windows, remove when portable implemenation available +#define HAVE_APP_SPECIFIC_ADVERTISEMENT +#else +#define SOCKET int* +#include "guids.h" +typedef unsigned short WORD; +typedef void *PVOID; +typedef DWORD *PDWORD; +typedef BYTE *PBYTE; +#define CALLBACK +#define MAX_PATH (260) +#define STC_API + +#if defined(ANDROID) || defined(__linux__) +#define ENABLE_CLOUD_REGISTRATION +#endif + +#endif + +#ifndef __STCAPI_H +#define __STCAPI_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __cplusplus +typedef int bool; +#define TRUE 1 +#define FALSE 0 +#endif + +/** + * @defgroup STCMacros Macros + * + * @brief These defines specify flags that the CCF C/C++ SDK accepts + * or returns in its calls and callback functions. + */ +///@{ + +/** + * @defgroup STCResultCodes STC Result Codes + * + * @brief The result of an STC API call; either success or a reason for failure + */ +///@{ + +#define STC_SUCCESS (S_OK) ///< Returned when method has been completed with success +#define STC_WARNING_DEPRECATED_METHOD (0x00000002) ///< Returned when method's functionality has been removed because of deprecation. +#define STC_ERROR_NOT_INITIALIZED (0x87FF0001) ///< Error returned when STCInitialize() has not been called +#define STC_ERROR_COMPLETE_CALLBACK_NOT_SET (0x87FF0002) ///< Error returned when the callback is not set correctly +#define STC_ERROR_STREAM_CLOSED (0x87FF0003) ///< Error returned when the stream is closed +#define STC_ERROR_INVALID_LISTENING_TYPE (0x87FF0004) ///< Error returned when STCListenForInvites() is called with an invalid "mode" parameter. +#define STC_ERROR_OOB_DATA_SIZE_INVALID (0x87FF0005) ///< Error returned when too large an out-of-band invite data buffer is specified. + +///@} + +/** + * @defgroup STCSessionUpdateTypes STC Session Update Types + * @brief An integer indicating the event that triggered a session update + */ +///@{ + +#define STC_UPDATE_AVAILABLE (1) ///< Remote session is active and ready for connections. +#define STC_UPDATE_EXPIRED (2) ///< Remote session has expired. +#define STC_UPDATE_DISCOVERED (3) ///< Remote session has been discovered. +#define STC_UPDATE_INRANGE (4) ///< Remote session is in range. +#define STC_UPDATE_SHUTDOWN (5) ///< Remote session has shutdown. +#define STC_UPDATE_UNKNOWN (6) ///< Remote session has an unknown update type. This may be due to local version being out of date. + +///@} + +/** + * @defgroup STCStreamEventTypes STC Stream Event Types + * @brief An integer indicating the event that triggered a stream event + * + * When Intel CCF loses all available transports from the local session + * to a remote session, the stream is suspended until communication can + * be reestablished. When communication is reesstablished, CCF will send + * a resume event to tell the application it can expect the stream to + * be able to send and receive data again. + */ +///@{ + +#define STC_STREAM_EVENT_RESUMED (1) ///< A suspended stream has resumed sending data +#define STC_STREAM_EVENT_SUSPENDED (2) ///< A currently open stream has been suspended + +///@} + +/** + * @defgroup STCAvatarTypes STC Avatar Types + * @brief An integer indicating the format of the Avatar + */ +///@{ + +#define STC_FORMAT_NONE (0) ///< No image available. +#define STC_FORMAT_BMP (1) ///< BMP format. + +///@} + +/** + * @defgroup STCDiscoveryFlags STC Discovery Flags + * @brief Flags indicating the discovery properties of a session + * + * A user-supplied custom avatar could contain an image of anything that + * the user chooses. Application authors may choose to handle custom + * avatars differently from built-in avatars if they are concerned about + * the content a user may add to their avatar. + */ +///@{ + +#define STC_DISCOVERY_FLAGS_IS_SELF (0x00000001) ///< The discovered session is "self" (owned by the local user) +#define STC_DISCOVERY_FLAGS_IS_REGISTERED (0x00000002) ///< The discovered session is registered with Intel® Identity Services +#define STC_DISCOVERY_AVATAR_IS_CUSTOM (0x00000010) ///< The discovered session uses a custom, user-defined avatar + +///@} + +/** + * @defgroup STCListenType STC Listen Type + * @brief An integer indicating the mode in which the @ref STCSessionUpdateCallback callback will operate. + */ +///@{ + +#define STC_ACCEPT_NONE (0) ///< Do not accept any invitation. +#define STC_ACCEPT_ONE (1) ///< Accept only one invitation. Ignore all invitations that follow. +#define STC_ACCEPT_MANY (3) ///< Accept multiple invitations. + +///@} + +/** + * @defgroup STCInvitationAndStatusCodes STC Invitation and Status Codes + * @brief An integer indicating the status of a pending invitation. + */ +///@{ + +#define STC_INVITE_STATUS_GADGET_NOT_REGISTERED (2) ///< Application is not registered. +#define STC_INVITE_STATUS_ATTEMPTING_REMOTE_CONNECTION (3) ///< Attempting to create a connection with remote session. +#define STC_INVITE_STATUS_FAILED_REMOTE_CONNECTION (4) ///< Connection with remote session has failed. +#define STC_INVITE_STATUS_WAITING_FOR_GADGET_RESPONSE (5) ///< Connecting in progress. +#define STC_INVITE_STATUS_WAITING_FOR_CONNECT_BACK (6) ///< Connecting is progress. +#define STC_INVITE_STATUS_GADGET_NOT_INSTALLED (7) ///< Application is not installed. +#define STC_INVITE_STATUS_GADGET_LAUNCH_FAILURE (8) ///< Failed to launch the application. +#define STC_INVITE_STATUS_INVITE_IGNORED (9) ///< Invitation has been ignored. +#define STC_INVITE_STATUS_INVITE_TIMEOUT (10) ///< Invitation has timed out. +#define STC_INVITE_STATUS_INVITE_CANCELLED (11) ///< Invitation has been cancelled. +#define STC_INVITE_STATUS_INVITE_ACCEPTED (12) ///< Invitation has been accepted by remote session. +#define STC_INVITE_STATUS_INVITE_REJECTED (13) ///< Invitation has been rejected by remote session. +#define STC_INVITE_STATUS_INVITE_COMPLETE (14) ///< Invitation process completed. + +///@} + +/** + * @defgroup STCDiscoveryNodeServiceStatus STC Discovery Node Service Status + * @brief An integer indicating the status of the service for Discovery Nodes. + */ +///@{ + +#define STC_SERVICESTATUS_SERVICEONLINE (0) ///< Service is online. +#define STC_SERVICESTATUS_NETWORKNOTAVAILABLE (1) ///< Network is not available. --Not implemented in CCF 3.0 Beta +#define STC_SERVICESTATUS_SERVERNOTAVAILABLE (2) ///< Server is not available. --Not implemented in CCF 3.0 Beta +#define STC_SERVICESTATUS_NOTAUTHORIZED (3) ///< Not authorized. --Not implemented in CCF 3.0 Beta +#define STC_SERVICESTATUS_SERVICENOTAVAILABLE (4) ///< Service is not available. + +///@} + +/** + * @defgroup STCDiscoveryNodeStatus STC Discovery Node Status + * @brief An integer indicating the status of a Discovery Node. + */ +///@{ + +#define STC_DISCOVERYNODESTATUS_UNDEFINED (0) ///< Discovery Node status is undefined. +#define STC_DISCOVERYNODESTATUS_CREATING (1) ///< Sending request to create Discovery Node. +#define STC_DISCOVERYNODESTATUS_SUBSCRIBING (2) ///< Discovery Node is being subscribed to. +#define STC_DISCOVERYNODESTATUS_SUBSCRIBED (3) ///< Discovery Node is subscribed to. +#define STC_DISCOVERYNODESTATUS_PUBLISHING (4) ///< Publishing this session to the Discovery Node. +#define STC_DISCOVERYNODESTATUS_PUBLISHED (5) ///< This session has been published to the Discovery Node. +#define STC_DISCOVERYNODESTATUS_RETRACTING (6) ///< Discovery Node is in the process of being deleted. +#define STC_DISCOVERYNODESTATUS_UNSUBSCRIBING (7) ///< Discovery Node is being unsubscribed to. +#define STC_DISCOVERYNODESTATUS_DELETING (8) ///< Sending request to delete this Discovery Node. +#define STC_DISCOVERYNODESTATUS_DELETED (9) ///< This Discovery Node has been deleted. + +///@} + +/** + * @defgroup STCSubscriptionResult STC Subscription Result + * @brief Status Codes for Subscription Result + */ +///@{ + +#define STC_SUBSCRIPTIONRESULT_STCNOTINITIALIZED (-2) ///< CCF has not been initialized. +#define STC_SUBSCRIPTIONRESULT_FAILED (-1) ///< Failure using Discovery Node API. +#define STC_SUBSCRIPTIONRESULT_SUBSCRIPTIONCHANGED (0) ///< Service status for cloud communications has completed succesfully/updated. +#define STC_SUBSCRIPTIONRESULT_SUBSCRIPTIONNOTFOUND (1) ///< Service status for cloud communications was not found. +#define STC_SUBSCRIPTIONRESULT_SUBSCRIPTIONEXISTS (2) ///< Discovery Node already exists. +#define STC_SUBSCRIPTIONRESULT_SUBSCRIPTIONDENIED (3) ///< Service status for cloud communications has denied your request. +#define STC_SUBSCRIPTIONRESULT_PUBLICATIONEXISTS (4) ///< Social Node already exists with same credentials. +#define STC_SUBSCRIPTIONRESULT_PUBLICATIONNOTFOUND (5) ///< Social Node doesn't exist. Check your discovery node credentials and try again. +#define STC_SUBSCRIPTIONRESULT_PUBLICATIONREFERENCENOTFOUND (6) ///< Social Node doesn't exist. Check your discovery node credentials and try again. +#define STC_SUBSCRIPTIONRESULT_SERVICENOTAVAILABLE (7) ///< Service for cloud communications is not available. Please try again later. +#define STC_SUBSCRIPTIONRESULT_NETWORKNOTAVAILABLE (8) ///< Network not found. + +///@} + +/** + * @defgroup STCNodeType STC Node Type + * @brief Status Codes for Node Types + */ +///@{ + +#define STC_NODE_TYPE_NONE (0) ///< If passed as parameter to @ref STCCreateDiscoveryNode or @ref STCJoinDiscoveryNode, the current user will not be visible to any users also marked as STC_NODE_TYPE_NONE. +#define STC_NODE_TYPE_PUBLISH (4) ///< If passed as parameter to @ref STCCreateDiscoveryNode or @ref STCJoinDiscoveryNode, the current user will be visible to all others subscribed to node. + +///@} + +/** + * @defgroup STCNodeLastError STC Discovery Node Last Error + * @brief Last Error cases for Discovery Node Updates + * @remarks Errors are only valid if and only if the + * Discovery Node Status is "Deleted." + */ +///@{ + +#define STC_NODE_ERROR_NOERROR (0) ///< The node update was processed without error. +#define STC_NODE_ERROR_NODEEXISTS (1) ///< The node trying to be created already exists. +#define STC_NODE_ERROR_NODENOTFOUND (2) ///< The node does not exist. +#define STC_NODE_ERROR_INSUFFICIENTPRIVILEGES (3) ///< Insufficient privileges. +#define STC_NODE_ERROR_INTERNALERROR (4) ///< The process performed on the node has experienced an internal error. If the problem persists, please contact a member of the CCF team. +#define STC_NODE_ERROR_UNKNOWNERROR (5) ///< The process performed on the node has experienced an unknown error. If the problem persists, please contact a member of the CCF team. + +///@} + +/** + * @defgroup STCStringLength STC String Length + * @brief Maximum values for lengths of char arrays. + */ +///@{ + +#define STC_MAX_VERSION_LENGTH (250) ///< Maximum length of Platform and SDK Version. +#define STC_MAX_DISCOVERYNODEDATA_LENGTH (250) ///< Maximum length of STCDiscoveryNode Name. +#define STC_MAX_CLIENTID_LENGTH (250) ///< Maximum length of Client Id. +#define STC_MAX_CLIENTSECRET_LENGTH (250) ///< Maximum length of Client Secret. +#define STC_MAX_CHAR_ARRAY_LENGTH (250) ///< General maximum length of char arrays for STCAPI C/C++ SDK. +#define STC_MAX_REDIRECTURI_LENGTH (250) ///< Maximum length of RedirectURI +#define STC_MAX_LASTERROR_LENGTH (250) ///< Maximum length of the Last Error found in Discovery Node Updates. @ref STCDiscoveryNodeUpdateCallback +#define STC_MAX_OOB_INVITE_DATA_SIZE (16384) ///< Maximum supported length of the invitation out-of-band data payload. @ref STCInviteRequest +#ifdef HAVE_APP_SPECIFIC_ADVERTISEMENT +#define STC_MAX_ADVERTISEMENT_DATA_SIZE (8192) ///< Maximum supported length of the advertisement payload. @ref STCSetLocalAdvertisement +#endif + +#if defined(ANDROID) || defined(__linux__) +#define STC_MAX_APP_NAME_LENGTH (41) +#define STC_MAX_APP_DESCRIPTION_LENGTH (241) +#define STC_MAX_INTENT_LENGTH (241) +#define STC_MAX_ACTIVITY_LENGTH (241) +#define STC_MAX_USER_NAME_LENGTH (129) +#define STC_MAX_SESSION_NAME_LENGTH (257) +#endif +///@} + +/** + * @brief Variable types defined to identify handles. + */ +///@{ +typedef long STC_RESULT; +typedef PVOID STC_HANDLE, + *PSTC_HANDLE; ///< Pointer to an SDK handle. A handle can be retrieved by calling STCInit(). +typedef DWORD HSTCINVITE, *PSTCINVITE; ///< Invitation Handle. +typedef PVOID HSTCSTREAM, *PSTCSTREAM; ///< Stream Handle. + +///@} + + + +/** + * @defgroup STCTransportMode STC Transport Mode + * @brief An integer indicating the type of transport available. Types of transports available for STCSetAllowedTransports and STCGetAllowedTransports. + */ +///@{ + +#define STC_TRANSPORT_NONE (0x00) ///< STCSetAllowedTransports or STCGetAllowedTransports to allow no transport. +#define STC_TRANSPORT_BLUETOOTH (0x01) ///< STCSetAllowedTransports or STCGetAllowedTransports to allow Bluetooth transport. +#define STC_TRANSPORT_INET (0x02) ///< STCSetAllowedTransports or STCGetAllowedTransports to allow WiFi or Ethernet transport. +#define STC_TRANSPORT_CLOUD (0x04) ///< STCSetAllowedTransports or STCGetAllowedTransports to allow Cloud transport using STUN and TURN. +#define STC_TRANSPORT_ALL (0xFFFFFFFF) ///< STCSetAllowedTransports or STCGetAllowedTransports to allow all transports. + +//TODO: Future use +//#define STC_TRANSPORT_INET_WIFI (0x00000002) +//#define STC_TRANSPORT_WIFI_DIRECT (0x00000004) +//#define STC_TRANSPORT_CLOUD_P2P (0x00000008) +//#define STC_TRANSPORT_CLOUD_RELAY (0x00000010) +//#define STC_TRANSPORT_TRANSPORT_ALL (0xFFFFFFFF) + +///@} + + +/** + * @defgroup LogLevel Level Types + * @brief The log level ordered from lowest to highest priority + */ +///@{ +typedef enum +{ + LogLevel_None = 0, ///< Always First + LogLevel_Verbose, + LogLevel_Debug, + LogLevel_Info, + LogLevel_Warning, + LogLevel_Error, + LogLevel_Fatal, + LogLevel_Max, ///< Always Last + +} LogLevel; +///@} + + + +/** + * @defgroup LogMode LogMode Types + * @brief Log mode to log to a file or live to Developer Central + */ +///@{ +typedef enum +{ + LogMode_None = 0, ///< Always First + LogMode_Offline, + LogMode_Online, + LogMode_Both, + LogMode_Max, ///< Always Last + +} LogMode; +///@} + +/** + * @defgroup Module Module Types + * @brief Filter the log based on modules + */ +///@{ +typedef enum +{ + Module_None = 0, + Module_Application = 1, + Module_Registration = 2, + Module_ProximityDiscovery = 4, + Module_CloudDiscovery = 8, + Module_Invitation = 16, + Module_DataStream = 32, + Module_AllModules = 0x0000003f, + Module_Max, + +} Module; +///@} + +///@} +/** + * @defgroup STCStruct STC Structure + * @brief This structure is passed when initializing the STC framework by calling @ref STCInit. + * It stores the information necessary for platform and cloud registration. + */ +///@{ +typedef struct _STCAPPLICATIONID +{ + GUID applicationId; ///< The application Id that identifies the application. + char clientId[STC_MAX_CLIENTID_LENGTH]; ///< The identifier for the user (if the application is user-specific) or application (if application not user-specific). + char clientSecret[STC_MAX_CLIENTSECRET_LENGTH]; ///< The passphrase for the user (if the application is user-specific) or application (if application not user-specific). +#if defined(ANDROID) || defined(__linux__) + char applicationName[STC_MAX_APP_NAME_LENGTH]; ///< Name of the application to be presented by dashboard (if present) + char applicationDescription[STC_MAX_APP_DESCRIPTION_LENGTH]; ///< Description of the application to be presented by dashboard (if present) + char inviteIntent[STC_MAX_INTENT_LENGTH]; /// + *

E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid double pointer.) + *
E_FAIL + *
Initialization failed for some unspecified reason + * + */ + +STC_API STC_RESULT STCInit(PSTC_HANDLE sdkHandle, STCApplicationId id, DWORD reserved); +#else + +/** + * @brief This function initializes the STC framework and registers your + * application with the framework. + * + * @remarks @ref STCInit should be the first function called by the application + * or DLL. All API calls made before calling @ref STCInit will return + * @ref STC_ERROR_NOT_INITIALIZED. + * @param [in] applicationPath - Hold the path of the application. + * @param[out] sdkHandle - Returns the handle to an instance of the Intel CCF SDK. + * + * @param[in] id - Holds information about the application such as the + * Application Id, Client Id and Client Secret. + * @param[in] reserved - Reserved for future use. Must be 0. + * + * @return STCInit returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid double pointer.) + *
E_FAIL + *
Initialization failed for some unspecified reason + *
+ */ +STC_API STC_RESULT STCInit(const char *applicationPath, PSTC_HANDLE sdkHandle, STCApplicationId id, + DWORD reserved); +/** + * This function will set the local user name. + * + * @remarks Null terminated user name, max char length = STC_MAX_USER_NAME_LENGTH. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] szUserName - the screen name to be associated with Intel CCF. + * + * @return STCSetUserName returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid double pointer.) + *
E_FAIL + *
Initialization failed for some unspecified reason + *
+ */ +STC_API STC_RESULT STCSetUserName(STC_HANDLE sdkHandle, const char *szUserName); +/** + * This function will set the local device name. + * + * @remarks Null terminated user name, max char length = STC_MAX_USER_NAME_LENGTH. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] szDeviceName - the Device name to be associated with Intel CCF. + * + * @return STCSetDeviceName returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid double pointer.) + *
E_FAIL + *
Initialization failed for some unspecified reason + *
+ */ +STC_API STC_RESULT STCSetDeviceName(STC_HANDLE sdkHandle, const char *szDeviceName); +/** + * This function will set the local user avatar + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * @param[in] avatarSize - The size of the app icon[Avatar]. + * @param[in] avatarType - The format of the app icon[Avatar]. + * @param[in] avatar - The bytes of the local session's avatar. + * + * @return STCSetAvatar returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid double pointer.) + *
E_FAIL + *
Initialization failed for some unspecified reason + *
+ */ +STC_API STC_RESULT STCSetAvatar(STC_HANDLE sdkHandle, DWORD avatarSize, BYTE avatarType, + PBYTE avatar); +/** + * This function will set the local session status[Mood of the user] + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] szStatus - The Status of the Session[Mood of the Session]. + * + * + * @return STCSetStatus returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid double pointer.) + *
E_FAIL + *
Initialization failed for some unspecified reason + *
+ */ +STC_API STC_RESULT STCSetStatus(STC_HANDLE sdkHandle, const char *szStatus); +/** + * This function will provide unboxed state of the app. + * + * @remarks isUnboxed will be true if avatar, session name, and user name have been set. + + * @param[in] sdkHandle - The handle to the instance of the CCF SDK to use for this API. + * + * @param[in] isUnboxed - The Status does APP is unboxed. + * + * + * @return STCSetStatus returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid double pointer.) + *
E_FAIL + *
Initialization failed for some unspecified reason + *
+ */ +STC_API STC_RESULT STCQueryUnboxedState(STC_HANDLE sdkHandle, bool *isUnboxed); + +#endif +/** + * @brief STCInitialize is provided for backwards compatibility with + * earlier versions of Intel CCF. + */ +#define STCInitialize STCInit + +/** + * @brief This function will release all resources associated with the STC + * API. All CCF Framework calls made after calling STCCleanUp() will return + * @ref STC_ERROR_NOT_INITIALIZED. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @return STCCleanUp returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application is not initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
E_FAIL + *
De-Initialization against the CCF service has failed. This possibly due to WINAPI SOCKET_ERROR. According to [WSAGetLastError()](http://msdn.microsoft.com/en-us/library/windows/desktop/ms741580.aspx) may provide a specific error code for further debugging. + *
+ */ +STC_API STC_RESULT STCCleanUp(STC_HANDLE sdkHandle); + +/** + * @brief This function gets the local session Id. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] LocalSessionId A pointer to the local session Id. + * + * @return STCGetLocalSessionId returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCGetLocalSessionId(STC_HANDLE sdkHandle, GUID *LocalSessionId); + +/** + * @brief This function gets the local session's discovery flags. + * + * @remarks Valid session flags are: @ref STC_DISCOVERY_FLAGS_IS_SELF, @ref STC_DISCOVERY_FLAGS_IS_REGISTERED + * and @ref STC_DISCOVERY_AVATAR_IS_CUSTOM + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] flags A set of flags, bitwise OR'ed together describing local session state + * + * @return STCGetLocalSessionFlags returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCGetLocalSessionFlags(STC_HANDLE sdkHandle, PDWORD flags); + +/** + * @brief This function gets the Device GUID for a given Session GUID. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] sessionId The Session GUID whose Device GUID is sought. + * + * @param[out] deviceId A pointer to the remote Device GUID. + * + * @return STCLookupDeviceId returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid pointer.) + *
E_FAIL + *
The sessionId is not a valid GUID or the sessionId is not a known sessionId. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCLookupDeviceId(STC_HANDLE sdkHandle, GUID sessionId, GUID *deviceId); + +/** + * @brief This function gets the version information of STCServ.exe, the + * Intel CCF service running on Windows. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] platformVersion - A pointer to a string that will be populated with the Platform Version by this call. + * Make sure to allocate enough memory to platformVersion. Refer to STC_MAX_VERSION_LENGTH in group of defines: @ref STCStringLength + * + * @return STCQueryPlatformVersion returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle or platformVersion is an invalid pointer.) + *
E_FAIL + *
"STCServ.exe" is/was not properly installed on this machine. More than likely, CCFManager was not installed correctly. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCQueryPlatformVersion(STC_HANDLE sdkHandle, char *platformVersion); + +/** + * @brief This function gets the version information of STCAPI.dll, the Intel CCF + * SDK library that allows for integration with the CCF platform. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] sdkVersion - A pointer to a string that will be populated with SDK Version by this call. + * Make sure to allocate enough memory to sdkVersion. Refer to STC_MAX_VERSION_LENGTH in group of defines: @ref STCStringLength + * + * @return STCQuerySDKVersion returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle or sdkVersion is an invalid pointer.) + *
E_FAIL + *
"STCAPI.dll" is/was not properly installed on this machine. More than likely, CCFManager was not installed correctly. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCQuerySDKVersion(STC_HANDLE sdkHandle, char *sdkVersion); + +/** + * @brief This function allows to send out of band signaling to remote device using session ID. + * + * @param[in] sdkHandle - The handle to the instance of the CCF SDK to use for this API. + * @param[in] sessionId - remote session ID. + * @param[in] pMessage - siganling message. + * + * @return STCSendSignalData returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e., sdkHandle or platformVersion is an invalid pointer.) + *
E_FAIL + *
"STCServ.exe" is/was not properly installed on this machine. More than likely, CCFManager was not installed correctly. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ */ +STC_API STC_RESULT STCSendSignalDataW(STC_HANDLE sdkHandle, GUID sessionId, wchar_t *pMessage); + +STC_API STC_RESULT STCSendSignalDataA(STC_HANDLE sdkHandle, GUID sessionId, char *pMessage); + + + + +/** + * @brief This function allows to choose which transports should be used for Intel CCF connectivity. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * @param[in] transports - The type of transports chosen by the application. NOTE: @ref STC_TRANSPORT_INET will always be enabled. + * + * @return STCSetAllowedTransports returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle or platformVersion is an invalid pointer.) + *
E_FAIL + *
"STCServ.exe" is/was not properly installed on this machine. More than likely, CCFManager was not installed correctly. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ */ +STC_API STC_RESULT STCSetAllowedTransports(STC_HANDLE sdkHandle, DWORD transports); + +/** +* @brief this function returns transports allowed to be used for Intel CCF connectivity. +* +* @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. +* @param[out] transports - The type of transports chosen by the application. NOTE: @ref STC_TRANSPORT_INET will always be enabled. +* +* @return STCGetAllowedTransports returns @ref STC_SUCCESS upon success or a code indicating +* why it failed. The return code may be a STC Result Code +* or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). +* Common error STC_RESULT%s include: +*
+*
E_INVALIDARG +*
One of the parameters passed is invalid (i.e. sdkHandle or platformVersion is an invalid pointer.) +*
E_FAIL +*
"STCServ.exe" is/was not properly installed on this machine. More than likely, CCFManager was not installed correctly. +*
STC_ERROR_NOT_INITIALIZED +*
The application has not been initialized against the Intel CCF service. +*
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" +*
The application needs to re-initialize with the Intel CCF service. +*
+*/ + +STC_API STC_RESULT STCGetAllowedTransports(STC_HANDLE sdkHandle, PDWORD transports); +///@} + +/** + ******************************************************************************************* + * @defgroup DiscoveryAPI Discovery/Session Update + * + * @brief This API alerts the application to changes in remote sessions + * + * Upon registration for Discovery event, the @ref STCSessionUpdateCallback will be triggered + * every time the STC framework discovers a new session or observes a change in a remote session. \ref TutorialDiscovery "How to use". + * + * + * @remarks Session Ids are only valid for the lifetime of Intel CCF platform. + * Suspend/resume, reboot, and restarting the Intel CCF platform invalidates + * the session Id. Some versions of Intel CCF keep the session Id constant + * across system events. Relying on this constancy will create problems + * with other STC releases. The device and session Ids are constant. + * These should be used for purposes of constancy instead of the session GUID. + * + * @note Calling other STC functions from a callback is discouraged + * as it may result in a deadlock. + ******************************************************************************************* + */ + +///@{ + + +/** + * The Intel CCF service calls this callback upon any/all updates to either local or remote + * session updates. + * + * @remarks To get local session info/updates, use @ref STCSetLocalSessionInfoCallback. + * @remarks To get remote session presence/info/updates, use @ref STCSetSessionUpdateCallback. + * + * @param[out] update - A pointer to a @ref _STCSESSIONUPDATE struct containing the most up-to-date + * information about the session. + * + * @param[out] callbackArg - The pointer passed when registering the callback. + * + */ +typedef void (CALLBACK *STCSessionUpdateCallback)(PSTCSessionUpdate update, PVOID callbackArg); + +/** + * This function registers the callback to be associated with any/all updates to + * remote session(s). + * + * @remarks Upon initial registration of this callback, the callback will be called + * immediately and sequentially for each and every currently known session. + * @remarks It is the application's responsibility to maintain the session list. + * @remarks Setting this callback to NULL at any time will end further announcements. + * @remarks Calling the function again with the same callback function will cause the + * STC service to resend the list of remote sessions again. + * @remarks It is the application's responsibility to copy the 'update' struct or its + * contents. This needs to be done to avoid losing data the Intel CCF Service or SDK + * may release or overwrite at anytime after the callback. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that will be called by the Intel CCF service upon any/all + * updates to remote sessions. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetSessionUpdateCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ + +STC_API STC_RESULT STCSetSessionUpdateCallback(STC_HANDLE sdkHandle, + STCSessionUpdateCallback callback, PVOID callbackArg); + + +/** + * This function registers the callback to be associated with any/all updates to the + * local session. + * + * @remarks Upon initial registration of this callback, the callback will be called + * immediately by the Intel CCF service. + * @remarks Setting this callback to NULL at any time will end further announcements. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that will be called by the Intel CCF service upon any/all + * updates to the local session. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetLocalSessionInfoCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetLocalSessionInfoCallback(STC_HANDLE sdkHandle, + STCSessionUpdateCallback callback, PVOID callbackArg); + +#ifdef HAVE_APP_SPECIFIC_ADVERTISEMENT +/** + * The CCF service calls this callback upon any updates to session adverisements. + * + * @remarks If the session has stopped advertising data, update->size will be zero. + * + * @param[out] update - A pointer to a @ref _STCADVERTISEMENTUPDATE struct containing the most recent + * advertised data. + * + * @param[out] callbackArg - The pointer passed when registering the callback. + */ +typedef void(CALLBACK *STCAdvertisementUpdateCallback)(PSTCAdvertisementUpdate update, + PVOID callbackArg); + +/** + * This function registers the callback to be associated with any updates to session + * advertised data. + * + * @remarks Setting this callback to NULL at any time will end further announcements. + * + * @param[in] sdkHandle - The handle to the instance of the CCF SDK to use for this API. + * + * @param[in] callback - Callback that will be called by the CCF service. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetAdvertisementUpdateCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetAdvertisementUpdateCallback(STC_HANDLE sdkHandle, + STCAdvertisementUpdateCallback callback, PVOID callbackArg); + +/** + * @brief Reserved + */ +typedef void STC_ADVERTISEMENT_FILTER; + +/* + * This function registers advertisement data that will be visible to other sessions. + */ + +STC_API STC_RESULT STCSetLocalAdvertisement(STC_HANDLE sdkHandle, GUID type, size_t size, + void *data, STC_ADVERTISEMENT_FILTER *filter); + +/* + * This function clears any previously set advertisement data. To change the data + * advertised, multiple STCSetLocalAdvertisement calls can be made in a row + * (i.e. it is _not_ necessary to clear the advertisement data before setting new data). + * + * Use this function to stop advertising any data. +*/ + +STC_API STC_RESULT STCClearLocalAdvertisement(STC_HANDLE sdkHandle); +#endif +///@} + +/** + ******************************************************************************************* + * @defgroup InvitationAndConnectionAPI Invitation & Connection + * + * @brief This API allows for application control over invitations and connections. + * + * For the purpose of Intel CCF, an invitation is defined as a request to connect. The invitation + * can be accepted, rejected or ignored by the remote session.\ref TutorialInvites "How to use" + * + * @note Calling other STC functions from a callback is discouraged + * as it may result in a deadlock. + ******************************************************************************************* + */ +///@{ + +/** + * The Intel CCF service calls this callback when a remote session + * wishes to connect to the local session. + * + * @remarks The application should respond by calling @ref STCSendInviteResponse, + * either during the callback, or after the callback without the timeout period. + * @remarks It is the application's responsibility to copy the 'message' struct or its + * contents. This needs to be done to avoid losing data the Intel CCF Service or SDK + * may release or overwrite at anytime after the callback. + * + * @param[out] message - A pointer to STCInviteRequest struct. + * + * @param[out] callbackArg - The pointer passed when registering the callback. + * + */ +typedef void (CALLBACK *STCInviteRequestCallback)(PSTCInviteRequest message, PVOID callbackArg); + +/** + * The Intel CCF service calls this callback when an invitation handshake + * completes. It will be called in response to calling + * @ref STCSendInviteResponse or @ref STCSendInviteRequest. If the + * invitation was accepted, a valid HSTCSTREAM will be sent to be used + * for communications with the remote session. + * + * @remarks It is the application's responsibility to copy the 'message' struct or its + * contents. This needs to be done to avoid losing data the Intel CCF service + * or SDK may release or overwrite at anytime after the callback. + * + * @param[out] message - A pointer to STCInviteComplete struct. + * + * @param[out] callbackArg - The pointer passed when registering the callback. + * + */ +typedef void (CALLBACK *STCInviteCompleteCallback)(PSTCInviteComplete message, PVOID callbackArg); + +/** + * The Intel CCF service calls this callback when a stream with a + * a remote session either becomes suspended, or resumes + * from being suspended. + * + * @param[out] message - A pointer to a @ref _STREAMEVENT struct containing a stream event. + * + * @param[out] callbackArg - The pointer passed when registering the callback. + * + */ +typedef void (CALLBACK *STCStreamEventUpdateCallback)(PSTCStreamEvent message, PVOID callbackArg); + +/** + * The Intel CCF service calls this callback for incoming out of band signaling message. + * + * @param[out] update - A pointer to a @ref PSTCSignalingUpdate struct containing a signaling message. + * + * @param[out] callbackArg - The pointer passed when registering the callback. + * + */ +typedef void (CALLBACK *STCSignalingUpdateCallback)(PSTCSignalingUpdate update, PVOID callbackArg); + +/** + * This function enables the application to accept invitation requests + * from remote sessions. The Intel CCF service executes the callback when + * an invitation request is received and allows the application to + * accept or reject the invitation using STCSendInviteResponse(). + * + * @remarks Mode can be defined as operational mode as defined below:\n + * STC_ACCEPT_NONE - No longer accept invitations.\n + * STC_ACCEPT_ONE - Accept one invitation only.\n + * STC_ACCEPT_MANY - Accept until disabled.\n + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that will be called by the Intel CCF service upon any/all incoming invites. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @param[in] mode - Allow multiple invitations per this session, allow only one, or allow none. @ref STCListenType + * + * @return STCListenForInvites returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer or mode is not a valid selection.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCListenForInvites(STC_HANDLE sdkHandle, STCInviteRequestCallback callback, + PVOID callbackArg, BYTE mode); + +/** + * This function registers the callback that will be associated with a successful connection to a remote session. + * + * @remarks This function must be called on both sides, Inviter and Invitee, before calling @ref STCListenForInvites or @ref STCSendInviteRequest. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that the Intel CCF service will call upon a successful connection to a remote session. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetInviteCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetInviteCallback(STC_HANDLE sdkHandle, STCInviteCompleteCallback callback, + PVOID callbackArg); + +/** + * This function registers the callback that will be associated with any stream event/update. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that the Intel CCF service will call upon any stream event/update. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetInviteCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetStreamEventCallback(STC_HANDLE sdkHandle, + STCStreamEventUpdateCallback callback, PVOID callbackArg); + + + +/** + * This function registers the callback that will be associated with any out of band siganling message. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that the Intel CCF service will call upon any stream event/update. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetInviteCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetSignalingUpdateCallback(STC_HANDLE sdkHandle, + STCSignalingUpdateCallback callback, PVOID callbackArg); + + +/** + * This function sets the maximum number of invites per remote session. + * A remote session may only be able to send X amount of invites + * for this app only. Default value of 0 defaults within the SDK. + * + * @remarks In most cases this API function does not need to be called. + * Without calling this, the default value is 0. + * Max incoming invites is set by the service in default mode. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] maxIncomingInvites The maximum number of invites the application is willing to process at one time. + * + * @return STCSetMaxIncomingInvites returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetMaxIncomingInvites(STC_HANDLE sdkHandle, int maxIncomingInvites); + +/** + * This function sends an invitation request to a remote session. The response + * is received using the STCInvitationCompleteCallback that is set + * using STCSetInviteCallback(). + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] hInvite - Handle to the invitation. + * + * @param[out] sessionId - session Id of remote session you are trying to connect. + * + * @param[out] applicationId - Your application Id used during STCInitialize. + * + * @param[in] dwTimeout - Timeout for invitation request. + * + * @return STCSendInviteRequest returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle or hInvite is an invalid pointer.) + *
E_FAIL + *
Possible Reason: The remote session has been lost in the duration of this request. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSendInviteRequest(STC_HANDLE sdkHandle, PSTCINVITE hInvite, GUID sessionId, + GUID applicationId, DWORD dwTimeout); + +/** + * This function sends an invitation request to a remote session. The response + * is received using the STCInvitationCompleteCallback that is set + * using STCSetInviteCallback(). + * + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] hInvite - Handle to the invitation. + * + * @param[out] sessionId - session Id of remote session you are trying to connect. + * + * @param[out] applicationId - Your application Id used during STCInitialize. + * + * @param[in] dwTimeout - Timeout for invitation request. + * + * @param[in] OOBData - Out-of-band data to send with the invitation request. If NULL, no data will be sent. + * + * @param[in] OOBDataSize - Size of the out-of-band data buffer. Sending a buffer of length greater than STC_MAX_OOB_INVITE_DATA_SIZE + * will result in an error. + * + * @return STCSendInviteRequest returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, hInvite, or OOBData is an invalid pointer.) + *
E_FAIL + *
Possible Reason: The remote session has been lost in the duration of this request. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_ERROR_OOB_DATA_SIZE_INVALID + *
The specified out-of-band invitation data buffer is too large. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSendInviteRequestEx(STC_HANDLE sdkHandle, PSTCINVITE hInvite, GUID sessionId, + GUID applicationId, DWORD dwTimeout, const BYTE *OOBData, size_t OOBDataSize); + + +/** + * The application should call this function in response to the + * invitation request given in the STCInviteCompleteCallback. Once + * the invitation is accepted and the stream is established, + * the invitation complete callback will be executed. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] hInvite - The invitation handle passed in from STCInviteRequestCallback. + * + * @param[in] response - TRUE to accept and FALSE to reject. + * + * @return STCSendInviteResponse returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle or hInvite is an invalid pointer.) + *
E_FAIL + *
Possible Reason: The remote session has been lost in the duration of this call. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSendInviteResponse(STC_HANDLE sdkHandle, HSTCINVITE hInvite, bool response); + +///@} + + +/** + ******************************************************************************************* + * @defgroup CommunicationAPI Communication + * + * @brief This API allows you to send and receive data to and from the remote sessions.\ref TutorialComms "How to use" + * + * @note Calling other STC functions from a callback is discouraged + * as it may result in a deadlock. + ******************************************************************************************* + */ +///@{ + +/** + * This function connects the supplied socket to the datasource represented by hSteram. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] sock - A valid WinSock2 socket created for AF_INET, SOCK_STREAM, IPPROTO_TCP. + * + * @param[in] hStream - The stream given in the invite complete callback. + * + * @return STCConnectSocket returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer or the socket is invalid, corrupt, or already connected.) + *
E_FAIL + *
Possible Reason: Socket failed to connect on WINAPI connect function. According to http://msdn.microsoft.com, WSAGetLastError() may provide a specific error code for further debugging. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * @code +// create the socket +sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); +if( sock != INVALID_SOCKET ){ + // Initialize the socket with hstream got from the callback on STCInviteCompleteCallback. + STC_RESULT = STCConnectSocket(sock, hStream); + if(! SUCCEEDED( STC_RESULT ) ) + { + //ERROR:STCConnectSocket connect Failed + return E_HANDLE; + } +} + * @endcode + * + */ +STC_API STC_RESULT STCConnectSocket(STC_HANDLE sdkHandle, SOCKET sock, HSTCSTREAM hStream); + +///@} +#ifdef ENABLE_CLOUD_REGISTRATION +/** + ******************************************************************************************* + * @defgroup CloudCheckAPI Cloud Registration + * + * @brief This API allows you to perform checks and the initial steps needed to + * register and communicate with the Cloud. + * + * @remarks On Windows, it is suggested to use the ISVLib APIs for cloud registration. + * + * @note Calling other STC functions from a callback is discouraged + * as it may result in a deadlock. + ******************************************************************************************* + */ +///@{ + +/** + * @brief This callback is used to obtain the LoginURI from the service. + * + * @param[out] message - A pointer to a @ref _CLOUDLOGINURI struct containing LoginURI from the service. + * + */ +typedef void (CALLBACK *STCCloudURIUpdateCallback)(PSTCCloudLoginURI message, PVOID callbackArg); + +/** + * @brief This callback is used to obtain the LoginURI Properties from the service. + * @note This callback will be returned on any/all updates to the authorization (including registration status). + * + * @param[out] message - A pointer to a @ref _CLOUDAUTHORIZATION struct containing authorization properties. + * + */ + +typedef void (CALLBACK *STCCloudAuthorizationUpdateCallback)(PSTCCloudAuthorization message, + PVOID callbackArg); + +/** + * @brief This callback is used to obtain information about the status of Registration with the Cloud from the service. + * + * @note This callback is guaranteed to only be returned immediately after calling @ref STCQueryRegistrationStatus. + * + * @param[out] message - A pointer to a @ref _CLOUDREGISTRATION struct containing registration properties. + * + */ + +typedef void (CALLBACK *STCCloudRegistrationStatusChangedCallback)(PSTCCloudRegistration message, + PVOID callbackArg); + +/** + * This function registers the callback that will be called in response to @ref STCQueryLoginURI. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that the Intel CCF SDK will call in response to @ref STCQueryLoginURI. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetCloudURIUpdateCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetCloudURIUpdateCallback(STC_HANDLE sdkHandle, + STCCloudURIUpdateCallback callback, PVOID callbackArg); + +/** + * This function registers the callback that will be called in response to any cloud authorization updates. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that the Intel CCF SDK will call in response to @ref STCRegisterWithCloud or + * @ref STCCheckCloudAuthorization. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetCloudAuthorizationUpdateCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetCloudAuthorizationUpdateCallback(STC_HANDLE sdkHandle, + STCCloudAuthorizationUpdateCallback callback, PVOID callbackArg); + +/** + * This function registers the callback that will be called in response to any cloud authorization updates. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that the Intel CCF SDK will call in response to @ref STCQueryRegistrationStatus. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetCloudRegistrationStatusChangedCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetCloudRegistrationStatusChangedCallback(STC_HANDLE sdkHandle, + STCCloudRegistrationStatusChangedCallback callback, PVOID callbackArg); + +/** + * @brief Set the cloud token and query ID to use for connecting to cloud resources. + * + * After calling STCQueryLoginURI, Intel CCF will call the STCCloudURIUpdateCallback + * function passed to STCQueryLoginURI with the login URI as a parameter. + * The registration token and query Id will be included as GET parmeters + * on the login URI. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API + * + * @param[in] registrationToken[STC_MAX_CHAR_ARRAY_LENGTH] - The token for use with registering with cloud + * + * @param[out] queryId - JobId/queryId returns 0 if error. Otherwise it is the jobId. + * + * @return STCRegisterWithCloud returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle or queryId is an invalid pointer.) + *
E_FAIL | E_NOT_VALID_STATE + *
Check internet connectivity. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCRegisterWithCloud(STC_HANDLE sdkHandle, char registrationToken[1024], + PDWORD queryId); + +/** + * @brief This function sets the callback for URI Updates and retrieves the jobId number. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Upon callback, will return the LoginURI Properties. + * + * @param[in] clientID[STC_MAX_CHAR_ARRAY_LENGTH] - The session or application(if applicable) Id registered with FedId. + * + * @param[in] redirectURI[STC_MAX_CHAR_ARRAY_LENGTH] - URI/URL to be used as the redirect from the cloud servers. (i.e. https://www.google.com) + * + * @param[out] queryId - JobId /queryId returns 0 if error. Otherwise it is the jobId. + * + * @return STCQueryLoginURI returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG
+ *
One of the parameters passed is invalid (i.e.sdkHandle or queryId is an invalid pointer.) + * @ref STCInit was called with incorrect parameters for @ref _STCAPPLICATIONID struct. + * One or more of the parameters given in this call were incorrect or invalid. + *
E_FAIL | E_NOT_VALID_STATE
+ *
Check internet connectivity. + *
STC_ERROR_NOT_INITIALIZED
+ *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCQueryLoginURI(STC_HANDLE sdkHandle, char clientID[STC_MAX_CHAR_ARRAY_LENGTH], + char redirectURI[STC_MAX_CHAR_ARRAY_LENGTH], PDWORD queryId); + +/** + * @brief This function is used for expansion of LoginURI properties. + * + * It works in accordance with the STCQueryLoginURI() function. Any + * properties added with this method will be passed once STCQueryLoginURI() is called. + * + * @note Do not add parameters that are already included in the STCQueryLoginURI() function call. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] extendedProperty[] - Array of parameters to be added to LoginURI Properties list. + * + * @param[in] sizeOfArray - Number of properties to be added to the LoginURI properties list. 0 is not a valid. + * + * @return STCAddExtendedProperty returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle or extendedProperty is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCAddExtendedProperty(STC_HANDLE sdkHandle, + STCExtendedProperty *extendedProperty[], int sizeOfArray); + +/** + * @brief This call obtains the status of Registration with the Cloud from the service. The jobId is handed back. + * + * @note This callback is only guaranteed to be returned immediately after making this call. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Upon callback, hands up status information regarding the cloud servers/local service certificates/tokens. + * + * @param[out] queryId - JobId/QueryId returns 0 if error, otherwise it is the jobId. + * + * @return STCQueryRegistrationStatus returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle queryId is an invalid pointer.) + *
E_FAIL | E_NOT_VALID_STATE + *
Check internet connectivity. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCQueryRegistrationStatus(STC_HANDLE sdkHandle, PDWORD queryId); + +/** + * @brief This call obtains the local service's authorization status with the cloud servers. + * @note This callback will be returned on any/all updates to the authorization (including registration status). + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Upon callback, hands up status information regarding the cloud servers/local service certificates/tokens. + * + * @return STCCheckCloudAuthorization returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
E_FAIL | E_NOT_VALID_STATE + *
Check internet connectivity. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCCheckCloudAuthorization(STC_HANDLE sdkHandle, PDWORD queryId); + +///@} + +#endif //ENABLE_CLOUD_REGISTRATION + + + +/** + ******************************************************************************************* + * @defgroup DiscoveryNodeAPI Discovery Node + * + * @brief This API allows creating, joining & leaving the node in Discovery Node services. + * Updates for these functionalities will be provided in STCDiscoveryNodeUpdateCallback() + * by registering the function in STCSetDiscoveryNodeUpdateCallback(). \ref TutorialDiscoveryoverNode "How to Use" + * + * @note Calling other STC functions from a callback is discouraged + * as it may result in a deadlock. + ******************************************************************************************* + */ +///@{ + +/** + * This callback is called from the CCF service whenever an update to a discovery node is available. + * + * @param[out] discoveryNode_Update - A pointer to @ref _STCDISCOVERYNODECREDENTIALSUPDATE struct that contains information pertaining to a specific discovery node. + * + * @param[out] callbackArg - The pointer passed when setting the callback. + * + * @remarks Your application must handle the possible error cases appropriately. @ref STCNodeLastError + * + */ +typedef void (CALLBACK *STCDiscoveryNodeUpdateCallback)(PSTCDiscoveryNodeCredentialsUpdate + discoveryNode_Update, PVOID callbackArg); + +/** + * This function sets the callback that will be called when a discovery node is updated from the cloud. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - The callback to be associated with any/all Discovery Node updates. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetDiscoveryNodeUpdateCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_COMPLETE_CALLBACK_NOT_SET | E_FAIL + *
Invalid pointer to callback. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetDiscoveryNodeUpdateCallback(STC_HANDLE sdkHandle, + STCDiscoveryNodeUpdateCallback callback, PVOID callbackArg); + + +/** + * @brief This function joins the current session to the Discovery Node specified by the discoveryNodeCredentials parameter. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] discoveryNodeCredentials - A populated @ref _STCDISCOVERYNODECREDENTIALS struct to choose the proper node to join (data(Node Name) & nodeFlags are the arguments need to be updated in the struct). + * + * @param[out] SubscriptionResult - A result of type @ref STCSubscriptionResult handed down from the stack regarding the cloud connections. + * + * @remark You may only have one subscription to a specific Discovery Node. + * + * @return STCJoinDiscoveryNode returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, discoveryNodeCredentials, or SubscriptionResult is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCJoinDiscoveryNode(STC_HANDLE sdkHandle, + STCDiscoveryNodeCredentials *discoveryNodeCredentials, PDWORD SubscriptionResult); + +/** + * @brief This function creates a Discovery Node specified by the discoveryNodeCredentials parameter. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] discoveryNodeCredentials - A populated @ref _STCDISCOVERYNODECREDENTIALS struct to choose the proper node to create/join (data(Nodename) & nodeFlags are the arguments need to be updated in the struct). + * + * @param[out] SubscriptionResult - A result of type @ref STCSubscriptionResult handed down from the stack regarding the cloud connections. + * + * @remark You may only have one subscription to a specific Discovery Node. + * + * @return STCCreateDiscoveryNode returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, discoveryNodeCredentials, or SubscriptionResult is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * @code + STC_RESULT STC_RESULT = STC_SUCCESS; + discveroyNodeCredentials structName = {0}; //Initialize struct to 0. + DWORD subscriptionResult = 0; + structName.data = NodeA ; + structName.nodeFlags = STC_NODE_TYPE_PUBLISH; + STC_RESULT = STCCreateDiscoveryNode(&structName, &subscriptionResult); + if(STC_RESULT == STC_SUCCESS) + { + If(subscriptionResult == STC_SUBSCRIPTIONRESULT_SUBSCRIPTIONCHANGED) + { + //Request send to the Discovery Node server to create your discovery Node + } + } + * @endcode + * + */ +STC_API STC_RESULT STCCreateDiscoveryNode(STC_HANDLE sdkHandle, + STCDiscoveryNodeCredentials *discoveryNodeCredentials, PDWORD SubscriptionResult); + +/** + * @brief This function unjoins the current session from the Discovery Node specified by the discoveryNodeCredentials parameter. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] discoveryNodeCredentials - A populated @ref _STCDISCOVERYNODECREDENTIALS struct to choose the proper node to leave (data(Node Name) & nodeFlags are the arguments need to be updated in the struct) + * + * @param[out] SubscriptionResult - A result of type @ref STCSubscriptionResult handed down from the stack regarding the cloud connections. + * + * @return STCLeaveDiscoveryNode returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, discoveryNodeCredentials, or SubscriptionResult is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCLeaveDiscoveryNode(STC_HANDLE sdkHandle, + STCDiscoveryNodeCredentials *discoveryNodeCredentials, PDWORD SubscriptionResult); + +#ifndef ANDROID +/** + * @brief This function indicates which transports are enabled on this device. + * + * @param[in] STC_HANDLE - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] DWORD - Bit values indicating which transports are enabled. + * Possible values are: STC_TRANSPORT_NONE (0x00) + * STC_TRANSPORT_BLUETOOTH (0x01) + * STC_TRANSPORT_ALL (0xFFFFFFFF) + * @return STCActiveDiscoveryIsEnabled returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. This API indicates which transports, in any, are enabled. + * The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * @code + STC_RESULT stcResult; + STCTransport transport; + + STC_RESULT = STCActiveDiscoveryIsEnabled(&sdkHandle, &transport); + * @endcode + * + */ +STC_API STC_RESULT STCActiveDiscoveryIsEnabled(STC_HANDLE sdkHandle, DWORD *pTransport); + +/** + * @brief This function indicates the transports on which we are visible to others. + * + * @param[in] STC_HANDLE - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] DWORD - Bit values indicating the transports on which we are visible to others. + * Possible values are: STC_TRANSPORT_NONE (0x00) + * STC_TRANSPORT_BLUETOOTH (0x01) + * STC_TRANSPORT_ALL (0xFFFFFFFF) + * @return STCActiveDiscoveryIsVisible returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. This API indicating the transports on which we are visible to others. + * The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * @code + STC_RESULT stcResult; + STCTransport transport; + + STC_RESULT = STCActiveDiscoveryIsVisible(&sdkHandle, *pTransport); + * @endcode + * + */ +STC_API STC_RESULT STCActiveDiscoveryIsVisible(STC_HANDLE sdkHandle, DWORD *pTransport); + +/** + * @brief This function enables visiblity on the transports that are functionally enabled. + * + * @param[in] STC_HANDLE - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] STCTransport - Enum bit values indicating the transports where we will be visible to others. + * Possible values are: STC_TRANSPORT_NONE (0x00) + * STC_TRANSPORT_BLUETOOTH (0x01) + * STC_TRANSPORT_ALL (0xFFFFFFFF) + * @return STCActiveDiscoveryEnableVisibility returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. This API indicates which transports, in any, will allow you to be visible + * to others. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
E_FAIL + *
The requested transport failed to make this device become visible. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * @code + STC_RESULT stcResult; + STCTransport transport; + + STC_RESULT = STCActiveDiscoveryEnableVisibility(&sdkHandle, *pTransport); + * @endcode + * + */ +STC_API STC_RESULT STCActiveDiscoveryEnableVisibility(STC_HANDLE sdkHandle, DWORD transport); + +/** + * @brief This function initiates a BlueTooth discovery. + * + * @param[in] STC_HANDLE - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] long - A value indicating how long a scan will run. + * + * @return STCActiveDiscoveryTriggerDiscovery returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. This API starts a BlueTooth discovery only. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
E_FAIL + *
The transport failed to start a discovery process. + *
+ * @code + STC_RESULT stcResult; + STC_HANDLE sdkHandle = NULL; //Initialize. + + STC_RESULT = STCActiveDiscoveryTriggerDiscovery(&sdkHandle, timeout); + * @endcode + * + */ +STC_API STC_RESULT STCActiveDiscoveryTriggerDiscovery(STC_HANDLE sdkHandle, long timeout); +#endif // ANDROID + +/** + * @brief This function gets the status of the Discovery Node Service. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] status - The Discovery Node Service Status + * + * @return STCQueryDiscoveryNodeServiceStatus returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e., sdkHandle or status is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCQueryDiscoveryNodeServiceStatus(STC_HANDLE sdkHandle, PDWORD status); + +///@} + + + +/** + ******************************************************************************************* + * @defgroup Logging Logging APIs + * + * @brief This API allows starting, stopping the Debug Agent and writing log + * + ******************************************************************************************* + */ +///@{ +#if defined(UNICODE) && !defined(STC_NO_UNICODE) +#define STCStartAgent STCStartAgentW +#define STCWriteLog STCWriteLogW + +#define STCSendSignalData STCSendSignalDataW +#else +#define STCStartAgent STCStartAgentA +#define STCWriteLog STCWriteLogA + +#define STCSendSignalData STCSendSignalDataA +#endif +/** + * This function starts the Debug Agent and specifies a log file to write to. + * + * @remarks The following parameters can be used as default values if you don't require extra functionality: + * pFileName = NULL, module = Module_AllModules, logLevel = LogLevel_Info, enableDataLogging = false + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * @param[in] appGuid - The GUID of the application calling this function. + * @param[in] pAppName - A pointer to the wchar_t array with the name of the application calling this function. + * @param[in] loggingMode - A list of flags that determine the logging modes to be used: (defined above) + * Offline logging only = 1 + * Online logging only = 2 + * Both offline and online logging = 3 + * @param[in] pFileName - A pointer to the wchar_t array of the offline logging file name. If pFileName == NULL, a default name is used. + * This parameter must only contain a file name and must not include a path. All logs are save to user's "temp" directory + * @param[in] module - The modules that will act as a filter for logging messages. Consists of several tags as a bitmask. + * @param[in] logLevel - The lowest(inclusive) log level, per tag, to include in the file. + * @param[in] enableDataLogging - A flag, enabling/disabling data logging. + * + * @return STCStartAgentW returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, pAppName, or pFileName is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ + +STC_API STC_RESULT STCStartAgentW(STC_HANDLE sdkHandle, GUID appGuid, wchar_t *pAppName, + LogMode loggingMode, wchar_t *pFileName, Module module, LogLevel logLevel, bool enableDataLogging); + +/** + * This function starts the Debug Agent and specifies a log file to write to. + * + * @remarks The following parameters can be used as default values if you don't require extra functionality: + * pFileName = NULL, module = Module_AllModules, logLevel = LogLevel_Info, enableDataLogging = false + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * @param[in] appGuid - The GUID of the application calling this function. + * @param[in] szAppName - A pointer to the char array with the name of the application calling this function. + * @param[in] loggingMode - A list of flags that determine the logging modes to be used: (defined above) + * Offline logging only = 1 + * Online logging only = 2 + * Both offline and online logging = 3 + * @param[in] szFileName - A pointer to the char array of the offline logging file name. If szFileName == NULL, a default name is used. + * This parameter must only contain a file name and must not include a path. All logs are save to user's "temp" directory + * @param[in] module - The modules that will act as a filter for logging messages. Consists of several tags as a bitmask. + * @param[in] logLevel - The lowest(inclusive) log level, per tag, to include in the file. + * @param[in] enableDataLogging - A flag, enabling/disabling data logging. + * + * @return STCStartAgent returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, pAppName, or pFileName is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ + +STC_API STC_RESULT STCStartAgentA(STC_HANDLE sdkHandle, GUID appGuid, char *szAppName, + LogMode loggingMode, char *szFileName, Module module, LogLevel logLevel, bool enableDataLogging); + +/** +* This function stops the Debug Agent. +* +* @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. +* @param[in] appGuid - The GUID of the application calling this function. +* +* @return STCStopAgent returns @ref STC_SUCCESS upon success or a code indicating +* why it failed. The return code may be a STC Result Code +* or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). +* Common error STC_RESULT%s include: +*
+*
E_INVALIDARG +*
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) +*
STC_ERROR_NOT_INITIALIZED +*
The application has not been initialized against the Intel CCF service. +*
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" +*
The application needs to re-initialize with the Intel CCF service. +*
+* +*/ +STC_API STC_RESULT STCStopAgent(STC_HANDLE sdkHandle, GUID appGuid); + +/** + * This function writes a log entry. + * + * @remarks The following parameters can be used as default values if you don't require extra functionality: + * pMessage = NULL, sizeInBytes = 0, pData = NULL + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * @param[in] appGuid - The GUID of the application calling this function. + * @param[in] module - The tag (source module) of this entry. + * @param[in] logLevel - The log level of this entry. + * @param[in] pMessage - Text message of the log entry (NULL Terminated). + * @param[in] sizeInBytes - The size (in bytes) of the data (optional) that may be associated with this message. May Be Zero. + * @param[in] pData - A pointer to binary data. May Be NULL. + * + * @return STCWriteLogW returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, pMessage, or pData is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCWriteLogW(STC_HANDLE sdkHandle, GUID appGuid, Module module, + LogLevel logLevel, wchar_t *pMessage, int sizeInBytes, char *pData); + +/** + * This function writes a log entry. + * + * @remarks The following parameters can be used as default values if you don't require extra functionality: + * pMessage = NULL, sizeInBytes = 0, pData = NULL + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * @param[in] appGuid - The GUID of the application calling this function. + * @param[in] module - The tag (source module) of this entry. + * @param[in] logLevel - The log level of this entry. + * @param[in] szMessage - Text message of the log entry (NULL Terminated). + * @param[in] sizeInBytes - The size (in bytes) of the data (optional) that may be associated with this message. May Be Zero. + * @param[in] pData - A pointer to binary data. May Be NULL. + * + * @return STCWriteLog returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, pMessage, or pData is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCWriteLogA(STC_HANDLE sdkHandle, GUID appGuid, Module module, + LogLevel logLevel, char *szMessage, int sizeInBytes, char *pData); +///@} + +/** +* INTEL(R) CONFIDENTIAL +*/ + +///@} + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/samples/EarthWarrior3D/proj.android/jni/include/uuid.h b/samples/EarthWarrior3D/proj.android/jni/include/uuid.h new file mode 100755 index 0000000..f0a3f44 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/jni/include/uuid.h @@ -0,0 +1,103 @@ +//****************************************************************** +// +// Copyright 2010-2014 Intel Corporation All Rights Reserved. +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// +//****************************************************************** +// File name: +// uuid.h +// +// Description: Helper UUID funtions +// +// +// +//********************************************************************* + +#ifndef __CS_UUID__H +#define __CS_UUID__H + +//NOTE: This is a temporary fix. A better solution would be to remove +//the dependency on APIs that are not intended to be public from libraries +//that use these APIs (portable C SDK) +#pragma GCC visibility push(default) + +#include +#include + +#define UUID_STRING_SIZE (37) //AAAABBBB-CCCC-DDDD-EEEE-001122334455 + + +#ifdef _WINRT + +// The UUID definition comes from windows +#include "stcdef.h" + +#else //_WINRT + +typedef struct UUID_t +{ + uint32_t data1; + uint16_t data2; + uint16_t data3; + uint8_t data4[8]; +} UUID_t; + +#define DECLARE_GUID(name) extern "C" const UUID_t name + +#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) extern "C" const UUID_t name = { l,w1,w2, {b1,b2,b3,b4,b5,b6,b7,b8} } + + +//#define DECLARE_GUID(name) extern const UUID_t name = { l,w1,w2, {b1,b2,b3,b4,b5,b6,b7,b8} } + +#define IS_UUID_EQUAL(_x, _y) ((_x.data1 == _y.data1) && (_x.data2 == _y.data2) && (_x.data3 == _y.data3) && (_x.data4[0] == _y.data4[0]) && (_x.data4[1] == _y.data4[1]) && (_x.data4[2] == _y.data4[2]) && (_x.data4[3] == _y.data4[3]) && (_x.data4[4] == _y.data4[4]) && (_x.data4[5] == _y.data4[5]) && (_x.data4[6] == _y.data4[6]) && (_x.data4[7] == _y.data4[7])) +#define IS_UUID_NULL(_x) ((_x.data1 == 0) && (_x.data2 == 0) && (_x.data3 == 0) && (_x.data4[0] == 0) && (_x.data4[1] == 0) && (_x.data4[2] == 0) && (_x.data4[3] == 0) && (_x.data4[4] == 0) && (_x.data4[5] == 0) && (_x.data4[6] == 0) && (_x.data4[7] == 0)) + +#define ASSIGN_UUID_TO_UUID(_dst, _src) ((UUID_t *)_src)->data1 = ((UUID_t *)_dst)->data1; \ + ((UUID_t *)_src)->data2 = ((UUID_t *)_dst)->data2; \ + ((UUID_t *)_src)->data3 = ((UUID_t *)_dst)->data3; \ + ((UUID_t *)_src)->data4[0] = ((UUID_t *)_dst)->data4[0]; \ + ((UUID_t *)_src)->data4[1] = ((UUID_t *)_dst)->data4[1]; \ + ((UUID_t *)_src)->data4[2] = ((UUID_t *)_dst)->data4[2]; \ + ((UUID_t *)_src)->data4[3] = ((UUID_t *)_dst)->data4[3]; \ + ((UUID_t *)_src)->data4[4] = ((UUID_t *)_dst)->data4[4]; \ + ((UUID_t *)_src)->data4[5] = ((UUID_t *)_dst)->data4[5]; \ + ((UUID_t *)_src)->data4[6] = ((UUID_t *)_dst)->data4[6]; \ + ((UUID_t *)_src)->data4[7] = ((UUID_t *)_dst)->data4[7]; + +#endif // _WINRT + + +DECLARE_GUID(NULL_GUID); + +typedef char UUIDString_t[UUID_STRING_SIZE]; + +/* + * Converts a uuid string to the qwarq ipc uuid + */ +int StringToUuid(const char *guidString, UUID_t *out); + +/* + * Converts a uuid string to the transport uuid + */ +//int UuidStringToTransportUuid(char *guidString, UUID_t *out); + +/* + * Converts a uuid to a string + */ +void UuidToString(const UUID_t &uuid, char *guidString, bool lowerCase = false); + + +std::string UuidToString(const UUID_t &uuid, bool lowerCase = false); + +/** + * Generate a UUID. + */ +void OSAL_GenerateUUID(UUID_t *uuid); + +void DebugMessageUuid(const UUID_t &uuid); + +typedef std::list GuidList_t; + +#pragma GCC visibility pop +#endif diff --git a/samples/EarthWarrior3D/proj.android/jni/include/wintypes.h b/samples/EarthWarrior3D/proj.android/jni/include/wintypes.h new file mode 100755 index 0000000..749027a --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/jni/include/wintypes.h @@ -0,0 +1,31 @@ +//****************************************************************** +// +// Copyright 2013-2014 Intel Corporation All Rights Reserved. +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// +//****************************************************************** +// File name: +// wintypes.h +// +// Description: +// +// +// +// +//********************************************************************* + +#pragma once +#ifndef __WINTYPES_H +#define __WINTYPES_H + +#include "uuid.h" + +typedef unsigned char BYTE, *PBYTE; +typedef unsigned char UINT8; +typedef UUID_t GUID; +typedef unsigned long ULONG; +typedef const wchar_t *LPCWSTR; +typedef char CHAR; +typedef wchar_t WCHAR; +#endif diff --git a/samples/EarthWarrior3D/proj.android/libs/android-support-v4.jar b/samples/EarthWarrior3D/proj.android/libs/android-support-v4.jar new file mode 100755 index 0000000..9056828 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/libs/android-support-v4.jar differ diff --git a/samples/EarthWarrior3D/proj.android/libs/stclibcc.jar b/samples/EarthWarrior3D/proj.android/libs/stclibcc.jar new file mode 100755 index 0000000..4883b4b Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/libs/stclibcc.jar differ diff --git a/samples/EarthWarrior3D/proj.android/local.properties b/samples/EarthWarrior3D/proj.android/local.properties new file mode 100755 index 0000000..b5705f9 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/local.properties @@ -0,0 +1,10 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. + +# location of the SDK. This is only used by Ant +# For customization when using a Version Control System, please read the +# header note. +sdk.dir=/Users/su1livan/Desktop/adt-bundle-mac-x86_64-20131030/sdk diff --git a/samples/EarthWarrior3D/proj.android/proguard-project.txt b/samples/EarthWarrior3D/proj.android/proguard-project.txt new file mode 100755 index 0000000..f2fe155 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/samples/EarthWarrior3D/proj.android/res/drawable-hdpi/cloud.png b/samples/EarthWarrior3D/proj.android/res/drawable-hdpi/cloud.png new file mode 100755 index 0000000..d3c34ac Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/res/drawable-hdpi/cloud.png differ diff --git a/samples/EarthWarrior3D/proj.android/res/drawable-hdpi/generic_avatar50x50.png b/samples/EarthWarrior3D/proj.android/res/drawable-hdpi/generic_avatar50x50.png new file mode 100755 index 0000000..94f29bd Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/res/drawable-hdpi/generic_avatar50x50.png differ diff --git a/samples/EarthWarrior3D/proj.android/res/drawable-hdpi/icon.png b/samples/EarthWarrior3D/proj.android/res/drawable-hdpi/icon.png new file mode 100755 index 0000000..8aa4767 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/res/drawable-hdpi/icon.png differ diff --git a/samples/EarthWarrior3D/proj.android/res/drawable-hdpi/sessionitem.png b/samples/EarthWarrior3D/proj.android/res/drawable-hdpi/sessionitem.png new file mode 100755 index 0000000..804be4e Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/res/drawable-hdpi/sessionitem.png differ diff --git a/samples/EarthWarrior3D/proj.android/res/drawable-ldpi/icon.png b/samples/EarthWarrior3D/proj.android/res/drawable-ldpi/icon.png new file mode 100755 index 0000000..17ce11a Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/res/drawable-ldpi/icon.png differ diff --git a/samples/EarthWarrior3D/proj.android/res/drawable-mdpi/icon.png b/samples/EarthWarrior3D/proj.android/res/drawable-mdpi/icon.png new file mode 100755 index 0000000..3780aac Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/res/drawable-mdpi/icon.png differ diff --git a/samples/EarthWarrior3D/proj.android/res/layout/select.xml b/samples/EarthWarrior3D/proj.android/res/layout/select.xml new file mode 100755 index 0000000..2098898 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/res/layout/select.xml @@ -0,0 +1,22 @@ + + + + + + + + + \ No newline at end of file diff --git a/samples/EarthWarrior3D/proj.android/res/layout/session_row.xml b/samples/EarthWarrior3D/proj.android/res/layout/session_row.xml new file mode 100755 index 0000000..63fe471 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/res/layout/session_row.xml @@ -0,0 +1,31 @@ + + + + + + + + + \ No newline at end of file diff --git a/samples/EarthWarrior3D/proj.android/res/layout/unbox_layout.xml b/samples/EarthWarrior3D/proj.android/res/layout/unbox_layout.xml new file mode 100755 index 0000000..89a0cf6 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/res/layout/unbox_layout.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/EarthWarrior3D/proj.android/res/values-zh-rCN/strings.xml b/samples/EarthWarrior3D/proj.android/res/values-zh-rCN/strings.xml new file mode 100755 index 0000000..dfa8dfd --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/res/values-zh-rCN/strings.xml @@ -0,0 +1,150 @@ + + + + + + "英特尔® 连接中心" + + + + "是" + "否" + Cancel + Please wait… + Continue + "名称:" + "无法启动摄像头!" + "很抱歉,无法打开该图像。" + "现在注册此设备?" + "操作失败: 无法选择在线图像。请下载图像至此设备。" + + avatar + + + + + "更新注册信息" + "此设备的英特尔® 连接中心凭据将过期。请点击或单击此处以重新注册此设备。" + "此设备在英特尔® 连接中心上的注册信息将过期。注册信息会向其他用户证明您的身份。注册需要连接互联网。" + "此设备的英特尔® 连接中心凭据已过期。请注册此设备。" + + + + + + Register with Intel Identity Cloud Services good, allows online discovery, secure, my devices, makes you a better person + Create an account + Sign In + Skip Sign In + + + Enter Screen Name + This is the name you will be seen as. + Screen Name: + Screen Name + You can enter a nickname or your real name. This name will be shown to other people running Intel® Connect Center. + + + Choose your profile picture + Choose a profile picture to represent you. You can choose one of the pictures shown here, or browse to select your own custom picture. This profile picture will be shown to other people running Intel® Connect Center. + Browse for a picture + Take a photo + Profile Picture + Please copy the picture to the local storage before choosing as an avatar or choose from local storage. + + + Enter Device Name + Device Name: + Device Name + Done + + + Successful + OK + + + "注册" + "使用英特尔® 连接中心时,注册提供了更安全的体验。" + "完成注册过程必须要有互联网连接。" + "立即注册" + "稍后注册" + "取消注册" + "正在验证您的互联网连接" + "无法连接至云服务。" + "登录" + "正在注册" + + + + "让此区域的人员知道您是谁。 "\n"英特尔® 连接中心将向此区域的人员显示您的姓名,使他们可以邀请您一起玩游戏或运行应用程序。" + "添加代表您的资料图片。 "\n"此区域的人员将看到此图片,他们将能够更快速地找到您。" + "选择资料图片" + + "立即开始" + Enter Username… + "重新验证您的设备" + "无法联系英特尔® 云服务。请确定您具有互联网连接并且防火墙配置正确。" + Signing In… + + + Registration Failed + Unable to connect to the Internet. + Please make sure that you have an Internet Connection. + Try Again + No Internet Connection + No Internet Connection + + + + Checking for Platform … + "确定" + "用户名无效" + "您的用户名必须至少包含一个有效字符。" + + + + Enter Username… + Enter Status Message… + Moon3D + Simple chat app description. + has invited you to simple chat. + Invitation to simplechat has timed out. + %s invited you to Chat. + FriendInitiatorActivity + Settings + Do you want invite + + + + %1$s wants to be your friend. Friends can connect to each other over the Internet. + Could not complete friend request. %1$s may not be available. + Accept + Ignore + OK + Asking %1$s to be your friend... + Could not make %1$s your friend. Try later. + Making friends with %1$s... + Could not complete friend request. %1$s may not be available. + You do not have an Internet connection. An Internet connection is required to make friends. + Would you like to invite %1$s to be your friend? + You and %1$s are now friends + OK + Cancel + Yes + No + Could not make %1$s your friend. Try later. + Making friends with %1$s... + %1$s wants to be your friend. Friends can connect to each other over the Internet. + You and %1$s are now friends + Received Friend Invitation + Sent Friend Invitation + Could not make %1$s your friend. %1$s does not have an Internet connection. Try later. + Could not make %1$s your friend. Try later. + You do not have an Internet connection. An Internet connection is required to make friends. + Accept + Ignore + Retry + + 附近的玩家\n请选择 + diff --git a/samples/EarthWarrior3D/proj.android/res/values/strings.xml b/samples/EarthWarrior3D/proj.android/res/values/strings.xml new file mode 100755 index 0000000..5126914 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/res/values/strings.xml @@ -0,0 +1,5 @@ + + + Moon3D + Other Player\n Please choose one + diff --git a/samples/EarthWarrior3D/proj.android/src/com/cocos2dx/moon3d/AppActivity.java b/samples/EarthWarrior3D/proj.android/src/com/cocos2dx/moon3d/AppActivity.java new file mode 100755 index 0000000..49ab08c --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/src/com/cocos2dx/moon3d/AppActivity.java @@ -0,0 +1,383 @@ +/**************************************************************************** +Copyright (c) 2008-2010 Ricardo Quesada +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2011 Zynga Inc. +Copyright (c) 2013-2014 Chukong Technologies Inc. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ +package com.cocos2dx.moon3d; + + +import java.io.ByteArrayOutputStream; + +import org.cocos2dx.lib.Cocos2dxActivity; + +import com.cocos2dx.moon3d.FriendViewByCCF; +import com.cocos2dx.moon3d.R; +import com.intel.csdk.listeners.P2PEventListener; +import com.intel.csdk.wrapper.NodeStatus; + +import android.annotation.SuppressLint; +import android.app.AlertDialog; +import android.app.Dialog; +import android.app.ProgressDialog; +import android.content.ComponentName; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.ServiceConnection; +import android.content.SharedPreferences; +import android.content.SharedPreferences.Editor; +import android.content.res.Configuration; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.Bitmap.CompressFormat; +import android.os.Bundle; +import android.os.Handler; +import android.os.IBinder; +import android.os.Message; +import android.util.Base64; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.EditText; +import android.widget.Toast; + +@SuppressLint("HandlerLeak") +public class AppActivity extends Cocos2dxActivity implements P2PEventListener { + private String mServiceIntent = "org.cocos2dx.cpp.ApplicationService"; + private Handler mHandler = new MyHandler(); + private boolean isBound; + private static final String LOGC = "Moon3d"; + private ApplicationServiceConnection mConnection = new ApplicationServiceConnection(); + private ApplicationService mService; + private SharedPreferences mPreference; + public static AppActivity sAppActivity = null; + private Dialog inviteDialog = null; + + private static native void SendGift(String type); + + private static native void StartGame(String something); + + private static native void StartControl(); + + private static native void ReturnMainMenu(); + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + mPreference = getSharedPreferences(LOGC, Context.MODE_PRIVATE); + startService(new Intent(mServiceIntent)); + + mPreference = getSharedPreferences("NativeChat", Context.MODE_PRIVATE); + sAppActivity = this; + } + + @Override + protected void onResume() { + Log.i(LOGC, "resuming"); + doBindService(); + super.onResume(); + } + + + @Override + protected void onPause() { + Log.i(LOGC, "pausing"); + doUnbindService(); + super.onPause(); + } + + /* private method to do the binding */ + private void doBindService() { + if(!isBound) + { + Log.i(LOGC, "binding service"); + Intent servIntent = new Intent(mServiceIntent); + isBound = bindService(servIntent, mConnection, 0); + if( !isBound ) + Log.i(LOGC, "service did not bind."); + } + } + + /* private method to do the unbinding */ + private void doUnbindService() { + if(isBound) + { + Log.i(LOGC, "unbinding service "); + isBound = false; + unbindService(mConnection); + } + } + + /*** + * Must be called by the 'starting activity'. Can be called more than once, but + * should not be called anytime after 'shutdown' has been called. + */ + protected void doStartService() { + Log.i(LOGC, "starting service"); + Intent servIntent = new Intent(mServiceIntent); + startService(servIntent); + } + + /*** + * Called to indicate that the application is finally existing. + */ + protected void doStopService() { + Log.i(LOGC, "shutting down"); + Intent servIntent = new Intent(mServiceIntent); + + mConnection.serviceExited(); + doUnbindService(); + stopService(servIntent); + } + + @Override + public void onBackPressed() + { + Log.i(LOGC, "back pressed"); + /*if(discoveryNodeFrag!=null){ + discoveryNodeFrag.removeAllDiscoveryNode(); + }*/ + finish(); + doStopService(); + super.onBackPressed(); + } + + //To save the users details in preference file. + private void setPreferences(String userName, String deviceName, String avatar){ + Editor edit = mPreference.edit(); + edit.putString("UserName", userName); + edit.putString("DeviceName", deviceName); + edit.putString("Avatar", avatar); + edit.commit(); + mService.setUserDetails(); + Log.i(LOGC, "Shared preference saved "); + } + + //Display dialog to input userName and Device Name from local user to complete unboxing process. + private void completeUnboxing(){ + + Log.i(LOGC, "Identity set up started "); + + final AlertDialog.Builder alert = new AlertDialog.Builder(this); + alert.setTitle("Input your details:"); + alert.setCancelable(false); + + LayoutInflater inflater = (LayoutInflater)this.getApplicationContext() + .getSystemService(Context.LAYOUT_INFLATER_SERVICE); + View parent = inflater.inflate(R.layout.unbox_layout, null); + final EditText userName = (EditText)parent.findViewById(R.id.userName); + userName.setText(android.os.Build.MANUFACTURER+" "+android.os.Build.MODEL); + final EditText deviceName = (EditText)parent.findViewById(R.id.deviceName); + deviceName.setText("Android "+ (isTablet(this)?"Tablet" : "Phone")); + alert.setView(parent); + + alert.setPositiveButton("Save", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int whichButton) { + String user = userName.getText().toString().trim(); + String device = deviceName.getText().toString().trim(); + + Bitmap bitmap = BitmapFactory.decodeResource(AppActivity.this.getResources(), R.drawable.generic_avatar50x50); + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + bitmap.compress(CompressFormat.PNG, 0, bos); + byte [] avatar = bos.toByteArray(); + String saveAvatar = Base64.encodeToString(avatar, Base64.DEFAULT); + + Log.i(LOGC, "User Input completed -----> "); + + setPreferences(user!=null && !user.equals("")?user:android.os.Build.MANUFACTURER+android.os.Build.MODEL,device!=null && !device.equals("")?device:"Android",saveAvatar); + } + }); + alert.show(); + } + + //Validating device is a Tablet or Phone. + private boolean isTablet(Context context) { + return (context.getResources().getConfiguration().screenLayout + & Configuration.SCREENLAYOUT_SIZE_MASK) + >= Configuration.SCREENLAYOUT_SIZE_LARGE; + } + + /* ServiceConnection implementation to bind Service and Activity class*/ + public class ApplicationServiceConnection implements ServiceConnection + { + boolean serviceStopped = false; + + public void onServiceConnected(ComponentName className, IBinder binder) + { + synchronized(this) { + Log.i(LOGC, "service connected."); + if(mService == null){ + mService = (ApplicationService)((ApplicationService.LocalBinder)binder).getService(); + mService.setHandler(mHandler); + mService.intializeJNIPlatform(); + + FriendViewByCCF.getInstance().initInstance(AppActivity.this, mService); + mService.setChatListener(AppActivity.this); + } + } + } + + public void onServiceDisconnected(ComponentName className) + { + Log.i(LOGC, "service disconnected."); + mService.stopSelf(); + } + + public void serviceExited() + { + synchronized(this) { + serviceStopped = true; + } + } + } + + /** + * This handler class is used to handle Activity events. + * + */ + private class MyHandler extends Handler{ + @Override + public void handleMessage(Message msg) { + if(msg.what !=4) FriendViewByCCF.getInstance().hideWindow(); + + super.handleMessage(msg); + + switch(msg.what){ + + case 0: + //Set your identity. + completeUnboxing(); + break; + case 1: + //Invite received + inviteAlert(); + break; + case 2: + //Send invitation + inviteDialog = ProgressDialog.show(AppActivity.this, "", "Waiting for connection"); + break; + case 3: + //Sent invitation acknowledgment. + if(inviteDialog!=null && inviteDialog.isShowing()){ + inviteDialog.dismiss(); + } + + StartGame(""); + break; + case 4: + //Peer update + FriendViewByCCF.getInstance().sessionListChanged(); + break; + case 5: + //Invitation rejected or timeout + if(inviteDialog!=null && inviteDialog.isShowing()){ + inviteDialog.dismiss(); + if(msg.arg1 == 0){ + Toast.makeText(AppActivity.this, "Invitation timeout!!", Toast.LENGTH_SHORT).show(); + }else{ + Toast.makeText(AppActivity.this, "Invitation rejected!!", Toast.LENGTH_SHORT).show(); + } + } + break; + case 6: + //Cloud service not available +// cloudCustomDialog(); + break; + + case 7: + //Node status updates + NodeStatus temp = mService.getNodeStatus(); + if(temp.getNodeStatus() == 5){ + //discoveryNodeFrag.addDiscoveryNode(temp); + }else if(temp.getNodeStatus() == 9){ + //discoveryNodeFrag.removeDiscoveryNode(temp); + } + break; + } + + } + } + + public static void showFriend(String inviteUuid) { + Log.i(LOGC, "showFriend in AppActivity"); + + AppActivity.sAppActivity.mHandler.post(new Runnable() { + public void run() { + if(FriendViewByCCF.getInstance().isWindowVisible()) + FriendViewByCCF.getInstance().hideWindow(); + else + FriendViewByCCF.getInstance().showWindow(); + } + }); + } + + //Invitation dialog to receive input from user + private void inviteAlert(){ + final AlertDialog.Builder builder = new AlertDialog.Builder(this); + + mHandler.post(new Runnable() { + + public void run() { + + builder.setPositiveButton("Accept", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + mService.sendInviteResponse(true); + + StartControl(); + } + }); + builder.setNegativeButton("Ignore", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + mService.sendInviteResponse(false); + } + }); + + builder.setTitle("Earth Warrior invite"); + builder.setMessage("Accept connection from "+mService.getInviterDetails()+" ?"); + builder.setCancelable(false); + builder.show(); + } + }); + } + + @Override + public void P2PMessageUpdate(String msg) { + SendGift(msg); + } + + @Override + public void disconnectP2P() { + ReturnMainMenu(); + } + + public static void friendControl(String type) { + AppActivity.sAppActivity.mService.sendMsg2JNI(type); + } + + public static void remoteDisconnectJni() { + AppActivity.sAppActivity.mService.disconnectConnection(); + } +} + + diff --git a/samples/EarthWarrior3D/proj.android/src/com/cocos2dx/moon3d/ApplicationService.java b/samples/EarthWarrior3D/proj.android/src/com/cocos2dx/moon3d/ApplicationService.java new file mode 100755 index 0000000..c8a0a19 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/src/com/cocos2dx/moon3d/ApplicationService.java @@ -0,0 +1,338 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package com.cocos2dx.moon3d; + +import java.util.UUID; + +import android.app.Service; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.os.Binder; +import android.os.Handler; +import android.os.IBinder; +import android.os.Message; +import android.util.Base64; +import android.util.Log; + +import com.intel.csdk.adapter.PeerAdapter; +import com.intel.csdk.listeners.P2PEventListener; +import com.intel.csdk.listeners.JNIListener; +import com.intel.csdk.wrapper.Connection; +import com.intel.csdk.wrapper.Discovery; +import com.intel.csdk.wrapper.Initialization; +import com.intel.csdk.wrapper.NodeStatus; +import com.intel.csdk.wrapper.Peer; + +/** + * This is a service class which will listen to wrapper classes like Initialization, Discovery, + * and Connection module. + * This service is responsible for following functionalities: + *

Initializing the application. + *

To register the discovery process and will discover other sessions. + *

To register the connection process to communicate with other sessions. + *

sending and receiving Invitation. + *

Sending and receiving messages. + *

+ * + */ +public class ApplicationService extends Service implements JNIListener{ + + private LocalBinder mBinder = new LocalBinder(); + private Handler mHandler; + private static final String LOGC = "Moon3d"; + private Initialization mInitialize = null; + SharedPreferences mPreference; + private PeerAdapter mPeerAdapter = new PeerAdapter(this); + private Discovery mDiscovery = null; + private Connection mConnect = null; + /** + * Binder class used to bind the service with Activity. + * + */ + public class LocalBinder extends Binder { + ApplicationService getService() { + // Return this instance of LocalService so clients can call public methods + return ApplicationService.this; + } + } + + /*Service life cycle callback, on binding the service.*/ + @Override + public IBinder onBind(Intent intent) { + + return mBinder; + } + + /*This method will set the Hanlder passed through Activity.*/ + public void setHandler(Handler handle){ + mHandler = handle; + } + + //To validate the user details saved in preference file. + private boolean validatePreferences(){ + if(mPreference.contains("UserName") && mPreference.contains("DeviceName")){ + return true; + } + return false; + } + + /** + * This method will pass the user details to Initialization wrapper. + */ + public void setUserDetails(){ + String userName = mPreference.getString("UserName", "No Data available"); + String deviceName = mPreference.getString("DeviceName", "No Data available"); + String temp = mPreference.getString("Avatar", "No Data available"); + byte[] avatar = Base64.decode(temp, Base64.DEFAULT); + mInitialize.initialize("7A1B397B-B576-44C4-943F-1BEF4F490C06", "WqODOHahg3xw6WVB0BbTMi9yazTkBoQG", "i8wP2TGxoVjINdX6", userName, deviceName, avatar); + } + + //To receive identity details from user by passing the event to activity, + private void receiveInputFromUser(Initialization init){ + mPreference = getSharedPreferences(LOGC, Context.MODE_PRIVATE); + + if(validatePreferences()){ + setUserDetails(); + }else{ + Message msg = Message.obtain(); + msg.what = 0; + mHandler.sendMessage(msg); + Log.i(LOGC, "Showing dialog to receive input from user."); + } + } + + /** + * This method is used to initialize the Initialization wrapper + */ + public void intializeJNIPlatform(){ + if(mInitialize == null){ + mInitialize = new Initialization(getApplicationContext(),ApplicationService.this); + receiveInputFromUser(mInitialize); + } + } + + @Override + public void onPeerUpdated(Peer peer) { + + Log.i(LOGC, "onPeerUpdated: "+peer.getName()); + final UUID app_id = UUID.fromString("7A1B397B-B576-44C4-943F-1BEF4F490C06"); + for(UUID hasapp : peer.getAppList()){ + if(hasapp.compareTo(app_id)==0){ + if(peer.getAvailability()){ + mPeerAdapter.add(peer); + }else{ + mPeerAdapter.remove(peer); + } + break; + } + } + Message msg = Message.obtain(); + msg.what = 4; + mHandler.sendMessage(msg); + } + + public void invitePeer(Peer peer){ + Log.i(LOGC, "Inviting Peer: "+peer.getName()); + mConnect.requestP2PConnection(peer); + Message msg = Message.obtain(); + msg.what = 2; + mHandler.sendMessage(msg); + mInviteHandler = new InviteHandler(peer, -1); + } + + public PeerAdapter getPeerAdapter(){ + return mPeerAdapter; + } + + @Override + public void onP2PConnectionStatus(Peer peer, long value) { + + if(peer!=null) + Log.i(LOGC, "peer: "+peer.getName()+" Connection status: "+value); + + switch((int)value){ + + case 10: + //Invitation timeout + Message msg10 = Message.obtain(); + msg10.what = 5; + msg10.arg1 = 0; + mHandler.sendMessage(msg10); + break; + case 12: + //Invitation accepted. + Message msg12 = Message.obtain(); + msg12.what = 3; + mHandler.sendMessage(msg12); + break; + case 13: + //Invitation rejected + Message msg13 = Message.obtain(); + msg13.what = 5; + msg13.arg1 = 1; + mHandler.sendMessage(msg13); + break; + case 14: + //Invitation completed. + Message msg14 = Message.obtain(); + msg14.what = 3; + mHandler.sendMessage(msg14); + break; + case 25: + //Invitation disconnected + if(mP2PListener!=null){ + mP2PListener.disconnectP2P(); + } + break; + + } + + } + + @Override + public void receiveP2PMessage(String msg) { + + Log.i(LOGC, "peer Msg: "+ msg); + if(mP2PListener!=null){ + mP2PListener.P2PMessageUpdate(msg); + } + } + + @Override + public void onP2PConnectionRequest(Peer peer, long handle) { + Message msg = Message.obtain(); + msg.what = 1; + mHandler.sendMessage(msg); +// mInviter = peer; + mInviteHandler = new InviteHandler(peer, handle); + } + + private InviteHandler mInviteHandler; + private class InviteHandler{ + private Peer mPeer; + private long mHandle; + public InviteHandler(Peer peer, long handle) { + mPeer = peer; + mHandle = handle; + } + public long getConnectionHandle(){ + return mHandle; + } + public Peer getPeer(){ + return mPeer; + } + } + + public String getInviterDetails(){ + return mInviteHandler.getPeer().getName(); + } + + public void sendInviteResponse(boolean value){ + mConnect.notifyP2PRequestACK(mInviteHandler.getPeer(), mInviteHandler.getConnectionHandle(), value); + } + + @Override + public void onJNIStatusUpdate(JNIStatus status) { + + if(status.equals(JNIStatus.INITIALIZED)){ + mDiscovery = new Discovery(mInitialize); + mDiscovery.startDiscovery(); + mConnect = new Connection(mInitialize); + mConnect.notifyRegisterCommunication(); + } + + } + + private P2PEventListener mP2PListener; + public void setChatListener(P2PEventListener listener){ + mP2PListener = listener; + } + + public void sendMsg2JNI(String msg){ + if(mConnect!=null){ + mConnect.sendP2PMessage(msg); + } + } + + public void disconnectConnection(){ + if(mConnect!=null && mInviteHandler!=null){ + mConnect.disconnectP2PConnection(mInviteHandler.getPeer()); + } + } + + public void connectDN(String node, boolean visible) { + if(mDiscovery!=null){ + if(validateCloudServerStatus()){ + mDiscovery.connectToNode(node, visible); + } + } + } + + public void disconnectDN(NodeStatus node) { + if(mDiscovery!=null){ + if(validateCloudServerStatus()){ + mDiscovery.disconnectFromNode(node); + } + } + } + + //This method will be used for validating Cloud server is up and running + //before making connectNode and leaveNode calls. + private boolean validateCloudServerStatus(){ + if(mDiscovery.queryCloudStatus() == 0){ + return true; + }else{ + Message msg = Message.obtain(); + msg.what = 6; + mHandler.sendMessage(msg); + return false; + } + } + + @Override + public void onDiscoveryNodeStatus(NodeStatus status) { + + setNodeStatus(status); + Message msg = Message.obtain(); + msg.what = 7; + mHandler.sendMessage(msg); + + } + + private NodeStatus mNodeStatus; + private void setNodeStatus(NodeStatus nodeStatus){ + mNodeStatus = nodeStatus; + } + + public NodeStatus getNodeStatus(){ + return mNodeStatus; + } + +} diff --git a/samples/EarthWarrior3D/proj.android/src/com/cocos2dx/moon3d/FriendViewByCCF.java b/samples/EarthWarrior3D/proj.android/src/com/cocos2dx/moon3d/FriendViewByCCF.java new file mode 100755 index 0000000..aac957d --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/src/com/cocos2dx/moon3d/FriendViewByCCF.java @@ -0,0 +1,75 @@ +package com.cocos2dx.moon3d; + +import com.cocos2dx.moon3d.R; +import com.cocobox.library.floatwindow.JoyFloatInterface; +import com.cocobox.library.floatwindow.SuspensionWindow; + +import android.view.LayoutInflater; +import android.view.View; +import android.widget.ListView; +import android.widget.LinearLayout.LayoutParams; + +public class FriendViewByCCF { + private static FriendViewByCCF _instance = null; + ApplicationService applicationService; + private SuspensionWindow mSuspensionWindow = null; + + public static FriendViewByCCF getInstance() { + if(null == _instance) { + _instance = new FriendViewByCCF(); + } + + return _instance; + } + + public void initInstance(AppActivity activity, ApplicationService service) { + + if(mSuspensionWindow != null) return; + + JoyFloatInterface.initialize(activity); + + applicationService = service; + + View view = LayoutInflater.from(activity).inflate(R.layout.select, null); + + ListView lview = (ListView) view.findViewById(R.id.sessionListView); + + lview.setAdapter(service.getPeerAdapter()); + + mSuspensionWindow = JoyFloatInterface.newSuspensionWindow(view, 0, 0, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); + } + + public void sessionListChanged() { + + if (applicationService != null) + { + applicationService.getPeerAdapter().notifyDataSetChanged(); + } + } + + public void showWindow() { + if (null != mSuspensionWindow && mSuspensionWindow.isVisible()) + return; + + if (null != mSuspensionWindow && !mSuspensionWindow.isVisible()) + { + mSuspensionWindow.show(); + return; + } + } + + public void hideWindow() { + if (null == mSuspensionWindow || !mSuspensionWindow.isVisible()) + return; + + mSuspensionWindow.hide();; + } + + public boolean isWindowVisible() { + if(null == mSuspensionWindow) { + return false; + } + + return mSuspensionWindow.isVisible(); + } +} diff --git a/samples/EarthWarrior3D/proj.android/src/com/intel/csdk/adapter/PeerAdapter.java b/samples/EarthWarrior3D/proj.android/src/com/intel/csdk/adapter/PeerAdapter.java new file mode 100755 index 0000000..ae06070 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/src/com/intel/csdk/adapter/PeerAdapter.java @@ -0,0 +1,166 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package com.intel.csdk.adapter; + +import java.util.ArrayList; +import java.util.List; + +import android.content.Context; +import android.graphics.BitmapFactory; +import android.view.LayoutInflater; +import android.view.View; +import android.view.View.OnClickListener; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.ImageView; +import android.widget.TextView; + +import com.cocos2dx.moon3d.ApplicationService; +import com.cocos2dx.moon3d.R; +import com.intel.csdk.wrapper.Peer; + +/*** + * Manages the data from the service to show the session list. + *

+ * This code shows use of the StcSession. How to get the name. How to get the avatar. + * How to get the list of applications that the session has. c3 specific content is + * concentrated in the two methods getView and setNewSessionList. + */ +public class PeerAdapter extends BaseAdapter { + + public List mPeerList = new ArrayList(); + ApplicationService mService; + + public PeerAdapter(ApplicationService service) { + mService = service; + } + + /*** + * Creates the view for one item in the list. + */ + @Override + public View getView(int position, View convertView, ViewGroup parent) + { + if (convertView == null) { + + LayoutInflater inflater = (LayoutInflater)parent.getContext() + .getSystemService(Context.LAYOUT_INFLATER_SERVICE); + convertView = inflater.inflate(R.layout.session_row, null); + } else + convertView.setVisibility(View.VISIBLE); + + Peer curSession = null; + synchronized (mPeerList) { + if (position >= 0 && position < mPeerList.size()) + curSession = (Peer)getItem(position); + } + + if( curSession == null ) { + convertView.setVisibility(View.GONE); + return convertView; + } + + // get the avatar from the session and put it into the image view + ImageView avatar = (ImageView)convertView.findViewById(R.id.row_userAvatar); + byte [] data = curSession.getAvatar(); + avatar.setImageBitmap(BitmapFactory.decodeByteArray(data, 0, data.length)); + + // get the name from the session and put it into the text view + TextView userName = (TextView)convertView.findViewById(R.id.row_userName); + userName.setText(curSession.getName()); + + ImageView cloudIcon = (ImageView)convertView.findViewById(R.id.row_userCloud); + // Attach the cloud image,if user is discovered over the cloud. + if(cloudIcon != null && curSession.isAvailableCloud()) { + cloudIcon.setVisibility(View.VISIBLE); + } + else if(cloudIcon != null) { + cloudIcon.setVisibility(View.GONE); + } + + // setup a click handler to pass invites up to the service. + final Peer session = curSession; + convertView.setOnClickListener(new OnClickListener() { + public void onClick(View v) { + mService.invitePeer(session); + } + }); + + return convertView; + } + + @Override + public int getCount() + { + synchronized(mPeerList) { + return mPeerList.size(); + } + } + + @Override + public Object getItem(int position) + { + synchronized(mPeerList) { + if (mPeerList != null && position < mPeerList.size() && position >= 0) + return mPeerList.get(position); + else + return null; + } + } + + @Override + public long getItemId(int position) + { + return position; + } + + public void add(Peer peer) { + synchronized (mPeerList) { + for(int i=0; i mPeerList; + public Discovery(Initialization init) { + if(init == null) + return; +// mInit = init; + mJNI = init.getJNIReference(); + } + + public void startDiscovery(){ + if(mJNI.getInitializationStatus().equals(InitilizationStatus.SUCCESS)){ + long temp = mJNI.nativeRegisterDiscovery(); + Log.i("", "Discovery: "+temp); + } + else{ + //Throw exception, Please initialized before calling discovery. + } + + } + + public List getPeerList(){ + return mPeerList; + } + + public void connectToNode(String node, boolean visible) { + + if(mJNI!=null){ + mJNI.nativeConnectNode(node, visible); + } + } + + public int queryCloudStatus(){ + int temp = -1; + if(mJNI!=null){ + temp = mJNI.nativeQueryCloudStatus(); + } + return temp; + } + + public void disconnectFromNode(NodeStatus node){ + if(mJNI!=null){ + mJNI.nativeDisconnectNode(node.getNodeName()); + } + } +} diff --git a/samples/EarthWarrior3D/proj.android/src/com/intel/csdk/wrapper/Initialization.java b/samples/EarthWarrior3D/proj.android/src/com/intel/csdk/wrapper/Initialization.java new file mode 100755 index 0000000..d0edaf8 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/src/com/intel/csdk/wrapper/Initialization.java @@ -0,0 +1,58 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package com.intel.csdk.wrapper; + +import android.content.Context; + +import com.intel.csdk.listeners.JNIListener; + +public class Initialization { + + private static final String LOGC = "Initialization"; + + private JNIMediator mJNI = null; + + public enum InitilizationStatus{ + SUCCESS, + FAILED, + NOT_INITIALIZED + }; + + public Initialization(Context context, JNIListener listen){ + mJNI = new JNIMediator(context, listen); + } + + public void initialize(String appId, String clientId, String clientSecret, String userName, String deviceName, byte [] avatar){ + mJNI.startSTCPlatform(appId, clientId, clientSecret, userName, deviceName, avatar); + } + + JNIMediator getJNIReference(){ + return mJNI; + } +} diff --git a/samples/EarthWarrior3D/proj.android/src/com/intel/csdk/wrapper/JNIMediator.java b/samples/EarthWarrior3D/proj.android/src/com/intel/csdk/wrapper/JNIMediator.java new file mode 100755 index 0000000..00daf0b --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/src/com/intel/csdk/wrapper/JNIMediator.java @@ -0,0 +1,234 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package com.intel.csdk.wrapper; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import android.content.Context; +import android.content.SharedPreferences; +import android.util.Log; +import android.widget.Toast; + +import com.intel.csdk.listeners.JNIListener; +import com.intel.csdk.listeners.JNIListener.JNIStatus; +import com.intel.csdk.wrapper.Initialization.InitilizationStatus; +import com.intel.stc.csdk.STCPlatform; + +public class JNIMediator extends STCPlatform{ + + private Context mContext; + private JNIListener mListener = null; + private static final String LOGC = "Moon3d"; + private String mAppId = null; + private String mClientId = null; + private String mClientSecret = null; + private String mUserName = null; + private String mDeviceName = null; + private byte [] mAvatar = null; + private SharedPreferences mPreference = null; + private List mPeerList = new ArrayList(); + + static { + System.loadLibrary("AFE"); + System.loadLibrary("STC"); + System.loadLibrary("stcapi"); + System.loadLibrary("stcjnimediator"); + } + + public native long nativeInit(String path, String app_id, String client_id,String client_secret); + public native long nativeIdentity(String userName, String deviceName, byte[] avatar,int size); + public native long nativeRegisterCommunication(); + public native long nativePeerInvitation(String peerID); + public native long nativeInviteStatus(UUID peerID,long handle, boolean value); + public native long nativeSendMsg(String msg); + public native long nativeDisconnectPeer(UUID peerID); + public native long nativeDestroyConnection(); + public native long nativeRegisterDiscovery(); + public native int nativeConnectNode(String node, boolean visible); + public native int nativeQueryCloudStatus(); + public native int nativeDisconnectNode(String node); + + + public JNIMediator(Context context, JNIListener listen){ + mContext = context; + mListener = listen; + + if(mContext!=null) + mPreference = mContext.getSharedPreferences("Moon3d", Context.MODE_PRIVATE); + } + + void startSTCPlatform(String appId, String clientId,String clientSecret, String userName, String deviceName, byte [] avatar){ + mAppId = appId; + mClientId = clientId; + mClientSecret = clientSecret; + mUserName = userName; + mDeviceName = deviceName; + mAvatar = avatar; + this.start(); + Log.i(LOGC, "Starting STCPlatform to initialize the application with CSDK."); + } + public void onLocalPeerUpdates(UUID peerID, String userName, String deviceName, byte [] avatar, boolean isAvailableCloud, boolean isAvailableProximity){ + + } + + public void onPeerDiscovery(String peerID, String userName, String deviceName, byte [] avatar,Object [] appList, boolean isAvailable, boolean isAvailableCloud, boolean isAvailableProximity){ + + Log.i(LOGC, "sessionName: "+userName+ "sessionId: "+" availability: "+isAvailable+ "appList size: "+appList.length); + UUID[] _appList = new UUID[appList.length]; + for(int i=0; i getPeerList(){ + return mPeerList; + } + + public void onInvitationReceived(String peerID, long handle){ + + Log.i(LOGC, "JNI onInviteReceived called peerID: "+peerID+" handle: "+handle); + Peer peer = queryPeer(peerID); + if(peer == null) + return; + Log.i(LOGC, "JNI onInviteReceived called by "+ mListener); + if(mListener!=null){ + Log.i(LOGC, "JNI onInviteReceived called by "+peer.getName()); + mListener.onP2PConnectionRequest(peer, handle); + } + } + + private Peer queryPeer(String peerID){ + Peer peer = null; + for(int i=0; i{ + private String _sessionName; + private byte[] _avatar; + private String _sessionId; + private UUID[] _appList; + private boolean _availability; + private boolean _availability_cloud; + private boolean _availability_proximity; + + Peer(String sessionName, byte[] avatar, String sessionId, UUID[] appList, boolean availability, boolean isAvailableCloud, boolean isAvailableProximity) { + _sessionName = sessionName; + _avatar = avatar; + _sessionId = sessionId; + _appList = appList; + _availability = availability; + _availability_cloud = isAvailableCloud; + _availability_proximity = isAvailableProximity; + } + public String getName() { + return _sessionName; + } + public byte[] getAvatar() { + return _avatar; + } + public String getSessionId() { + return _sessionId; + } + public UUID[] getAppList() { + return _appList; + } + @Override + public int compareTo(Peer o) { + return getSessionId().compareTo(o.getSessionId()); + } + public boolean getAvailability() { + return _availability; + } + public boolean isAvailableCloud(){ + return _availability_cloud; + } + public boolean isAvailableProximity(){ + return _availability_proximity; + } +} diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/.classpath b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/.classpath new file mode 100755 index 0000000..5176974 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/.project b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/.project new file mode 100755 index 0000000..0ed7500 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/.project @@ -0,0 +1,33 @@ + + + FloatWindowLibrary + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/.settings/org.eclipse.core.resources.prefs b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000..99f26c0 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/AndroidManifest.xml b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/AndroidManifest.xml new file mode 100755 index 0000000..1639ad5 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/AndroidManifest.xml @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/proguard-project.txt b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/proguard-project.txt new file mode 100755 index 0000000..f2fe155 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/drawable-hdpi/ic_launcher.png b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/drawable-hdpi/ic_launcher.png new file mode 100755 index 0000000..96a442e Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/drawable-hdpi/ic_launcher.png differ diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/drawable-mdpi/ic_launcher.png b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/drawable-mdpi/ic_launcher.png new file mode 100755 index 0000000..359047d Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/drawable-mdpi/ic_launcher.png differ diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/drawable-xhdpi/ic_launcher.png b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/drawable-xhdpi/ic_launcher.png new file mode 100755 index 0000000..71c6d76 Binary files /dev/null and b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/drawable-xhdpi/ic_launcher.png differ diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/layout/window_decorators.xml b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/layout/window_decorators.xml new file mode 100755 index 0000000..83b9bac --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/layout/window_decorators.xml @@ -0,0 +1,5 @@ + + + diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/values/strings.xml b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/values/strings.xml new file mode 100755 index 0000000..cf1215c --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/values/strings.xml @@ -0,0 +1,5 @@ + + + FloatWindowLibrary + + diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/values/styles.xml b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/values/styles.xml new file mode 100755 index 0000000..6ce89c7 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/res/values/styles.xml @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/CustomOnClickListener.java b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/CustomOnClickListener.java new file mode 100755 index 0000000..3908cbe --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/CustomOnClickListener.java @@ -0,0 +1,7 @@ +package com.cocobox.library.floatwindow; + +import android.view.View; + +public interface CustomOnClickListener { + public void onClick( View view ); +} diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/JoyFloatInterface.java b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/JoyFloatInterface.java new file mode 100755 index 0000000..a4ccffc --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/JoyFloatInterface.java @@ -0,0 +1,78 @@ +package com.cocobox.library.floatwindow; + +import android.content.Context; +import android.util.Log; +import android.view.View; + + +public final class JoyFloatInterface { + + private static JoyFloatInterface _instance; + private Context mContext; + + private JoyFloatInterface() { + + } + + public static JoyFloatInterface instance() { + if( null == _instance ) { + _instance = new JoyFloatInterface(); + } + return _instance; + } + + public static void initialize( Context context ) { + JoyFloatInterface instance = instance(); + instance.mContext = context; + } + + public static SuspensionWindow newSuspensionWindow( View view ) { + SuspensionWindow win = new SuspensionWindow( view ); + return win; + } + + public static SuspensionWindow newSuspensionWindow( View view, int x, int y ) { + SuspensionWindow win = new SuspensionWindow( view, x, y ); + return win; + } + + public static SuspensionWindow newSuspensionWindow( View view, int x, int y, int width, int height ) { + SuspensionWindow win = new SuspensionWindow( view, x, y, width, height ); + return win; + } + + public static SuspensionWindow newSuspensionWindow( View view, int x, int y, int width, int height, boolean focusable, boolean touchableOutSide ) { + SuspensionWindow win = new SuspensionWindow( view, x, y, width, height, focusable, touchableOutSide ); + return win; + } + + public static SuspensionWindow newSuspensionWindow( View view, int x, int y, int width, int height, boolean focusable, boolean touchableOutSide, boolean touchable, boolean moveable, boolean isFullScreen, boolean supportLongClick ) { + SuspensionWindow win = new SuspensionWindow( view, x, y, width, height, focusable,touchable, touchableOutSide, moveable, isFullScreen, supportLongClick ); + return win; + } + + public static void back() + { + SuspensionWindowManager.getInstance().removeLastWindow(); + SuspensionWindowManager.getInstance().showCurSuspendWindow(); + } + + /** + * 关闭所有悬浮窗 + */ + public static void closeAll() { + SuspensionWindowManager.getInstance().clear(); + } + + /** + * 获取悬浮窗的个数 + * @return + */ + public static int getCount() { + return SuspensionWindowManager.getInstance().getCount(); + } + + public static Context getContext() { + return instance().mContext; + } +} diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/OnSuspensionWindowShowOrCloseListener.java b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/OnSuspensionWindowShowOrCloseListener.java new file mode 100755 index 0000000..5547292 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/OnSuspensionWindowShowOrCloseListener.java @@ -0,0 +1,22 @@ +package com.cocobox.library.floatwindow; + + +/** + * + *
悬浮窗显示和关闭事件监听器
+ * @author zhangjunfei + * @date 2013-11-19 下午3:38:42 + * @version 1.0 + */ +public interface OnSuspensionWindowShowOrCloseListener { + + /** + * 悬浮窗显示时的回调 + */ + public void onSuspensionWindowShow(); + + /** + * 悬浮窗关闭时的回调 + */ + public void onSuspensionWindowClose(); +} diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/SuspensionWindow.java b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/SuspensionWindow.java new file mode 100755 index 0000000..f5a3f91 --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/SuspensionWindow.java @@ -0,0 +1,470 @@ +package com.cocobox.library.floatwindow; + +import android.graphics.PixelFormat; +import android.graphics.Point; +import android.view.Gravity; +import android.view.MotionEvent; +import android.view.View; +import android.view.View.OnTouchListener; +import android.view.ViewConfiguration; +import android.view.WindowManager; +import android.view.WindowManager.LayoutParams; + + +public class SuspensionWindow implements OnTouchListener { + + private static WindowManager mWm; + + protected WindowManager.LayoutParams mLayoutParams; + + protected WindowManager.LayoutParams mHideLayoutParams; + + private CustomOnClickListener mCustomOnClickListener; + + private TouchEventListener mTouchEventListener; + + + private OnSuspensionWindowShowOrCloseListener mOnSuspensionShowOrCloseListener; + + /** + * 嵌入Window中的View + */ + protected View mContentView; + + protected int mTop; + protected int mLeft; + private int mWidth = WindowManager.LayoutParams.WRAP_CONTENT; + private int mHeight = WindowManager.LayoutParams.WRAP_CONTENT; + + private float mStartX; + private float mStartY; + private float mTouchStartX; + private float mTouchStartY; + private float x; + private float y; + private int mTouchSlop; + + private boolean mVisible; + + private boolean mFocusable; + private boolean mTouchable; + private boolean mTouchableOutSide; + + private boolean mLongClickable = false; + private boolean isFullScreen; + private boolean mSupportDragable; + + private int mGravity; + + static { + mWm = (WindowManager) JoyFloatInterface.getContext().getSystemService("window"); + + } + + SuspensionWindow() { + // + } + + /** + * 支持如下特性: + * 1、放置在屏幕左上角 + * 2、自适应大小 + * 3、可移动 + * 4、获取焦点 + * 5、悬浮窗区域外支持点击 + * 6、获取touchable + * 7、非全屏 + * 8、支持长按 + * + * @param view + */ + SuspensionWindow(View view) { + this(view, 0, 0, WindowManager.LayoutParams.WRAP_CONTENT, + WindowManager.LayoutParams.WRAP_CONTENT, true, true, true, true, false, true ); + } + + /** + * 支持如下铁性: + * 1、可移动 + * 2、获取焦点 + * 3、悬浮窗区域外支持点击 + * 4、获取touchable + * 5、非全屏 + * 6、支持长按 + * @param view + * @param left + * @param top + */ + SuspensionWindow( View view, int left, int top ) { + this(view, left, top, WindowManager.LayoutParams.WRAP_CONTENT, + WindowManager.LayoutParams.WRAP_CONTENT, true, true, true, true, false, true ); + } + + /** + * 支持如下铁性: + * 1、可移动 + * 2、获取焦点 + * 3、悬浮窗区域外支持点击 + * 4、获取touchable + * 5、非全屏 + * 6、支持长按 + * @param view + * @param left + * @param top + * @param width + * @param height + */ + SuspensionWindow( View view, int left, int top, int width, int height ) { + this(view, left, top, width, height, true, true, true, true, false, true ); + } + + /** + * 支持如下铁性: + * 1、可移动 + * 2、获取touchable + * 3、非全屏 + * @param view + * @param left + * @param top + * @param width + * @param height + * @param focusable + * @param touchableOutside + */ + SuspensionWindow( View view, int left, int top, int width, int height, boolean focusable, boolean touchableOutside ) { + this(view, left, top, width, height, focusable, true, touchableOutside, true, false, true ); + } + + /** + * + * @param view + * @param left 悬浮窗左上角x坐标 + * @param top 悬浮窗左上角y坐标 + * @param width 悬浮窗宽度 + * @param height 悬浮窗高度 + * @param focusable 是否接收focus true 接受 false 不接受 + * @param touchable 是否可触摸 true 可触摸 false 不能触摸 + * @param touchableOutside 在悬浮窗外是否能接收touch事件 true 悬浮窗外可接收touch事件 false 不接收 + * @param moveable 是否可拖动 true 支持拖动 false 不支持拖动 + * @param isFullScreen 是否全屏 true 支持全屏 false 不支持全屏 + * @param supportLongClick 是否支持长按 true 支持 false 不支持 + */ + SuspensionWindow(View view, int left, int top, int width, + int height, boolean focusable, boolean touchable, boolean touchableOutside, boolean moveable, boolean isFullScreen, boolean supportLongClick ) { + + mContentView = view; + + mTop = top; + mLeft = left; + mWidth = width; + mHeight = height; + + mFocusable = focusable; + mTouchable = touchable; + mTouchableOutSide = touchableOutside; + + mSupportDragable = moveable; + this.isFullScreen = isFullScreen; + mLongClickable = supportLongClick; + init(); + } + + /** + * 显示悬浮船体 + */ + public void show() { + try { + showView(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * 关闭悬浮窗体 + */ + public void close() { + try { + mVisible = false; + mWm.removeView( mContentView); + if (mContentView instanceof OnSuspensionWindowShowOrCloseListener) { + OnSuspensionWindowShowOrCloseListener listener = (OnSuspensionWindowShowOrCloseListener) mContentView; + listener.onSuspensionWindowClose(); + } + if (null != mOnSuspensionShowOrCloseListener) { + mOnSuspensionShowOrCloseListener.onSuspensionWindowClose(); + } + SuspensionWindowManager.getInstance().remove(this); +// mContentView = null; + } catch (Exception e) { + // + } + } + + /** + * 隐藏悬浮窗体 + */ + public void hide() { + try { + mVisible = false; + mWm.removeView( mContentView); + if (mContentView instanceof OnSuspensionWindowShowOrCloseListener) { + OnSuspensionWindowShowOrCloseListener listener = (OnSuspensionWindowShowOrCloseListener) mContentView; + listener.onSuspensionWindowClose(); + } + if (null != mOnSuspensionShowOrCloseListener) { + mOnSuspensionShowOrCloseListener.onSuspensionWindowClose(); + } + SuspensionWindowManager.getInstance().remove(this); + } catch (Exception e) { + // + } + } + + + public void update( int x, int y ) { + mLeft = x; + mTop = y; + mLayoutParams.x = x; + mLayoutParams.y = y; + mWm.updateViewLayout(mContentView, mLayoutParams); + } + + public void update( int x, int y, int nWidth, int nHeight ) { + mLeft = x; + mTop = y; + mLayoutParams.x = x; + mLayoutParams.y = y; + mLayoutParams.width = nWidth; + mLayoutParams.height = nHeight; + mWidth = nWidth; + mHeight = nHeight; + + mWm.updateViewLayout(mContentView, mLayoutParams); + } + + public void update( int x, int y, int nWidth, int nHeight, boolean bFocus, boolean bTouchOutSide, boolean bTouchable, boolean bFullScreen ) { + isFullScreen = bFullScreen; + mTouchable = bTouchable; + mFocusable = bFocus; + mWidth = nWidth; + mHeight = nHeight; + + mLayoutParams.width = mWidth; + mLayoutParams.height = mHeight; + + if (isFullScreen) { + mLayoutParams.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN; + } else { + mLayoutParams.flags ^= WindowManager.LayoutParams.FLAG_FULLSCREEN; + } + + if( bFocus ) { + mLayoutParams.flags ^= LayoutParams.FLAG_NOT_FOCUSABLE; + } else { + mLayoutParams.flags |= LayoutParams.FLAG_NOT_FOCUSABLE; + } + + if( bTouchable ) { + mLayoutParams.flags ^= LayoutParams.FLAG_NOT_TOUCHABLE; + } else { + mLayoutParams.flags |= LayoutParams.FLAG_NOT_TOUCHABLE; + } + + mWm.updateViewLayout(mContentView, mLayoutParams); + } + + public void setCustomOnclickListener(CustomOnClickListener listener) { + mCustomOnClickListener = listener; + } + + public void setTouchEventListener(TouchEventListener listener) { + mTouchEventListener = listener; + } + + public Point getPosition() { + Point pt = new Point(); + pt.x = mLayoutParams.x; + pt.y = mLayoutParams.y; + + return pt; + } + + /** + * 获取窗体中的root view + * + * @return + */ + public View getRootView() { + return mContentView; + } + + public boolean isVisible() { + return mVisible; + } + + + public void setShowOrCloseListener( + OnSuspensionWindowShowOrCloseListener listener) { + mOnSuspensionShowOrCloseListener = listener; + } + + + private void init() { + final ViewConfiguration configuration = ViewConfiguration + .get(JoyFloatInterface.getContext()); + mTouchSlop = configuration.getScaledTouchSlop(); + mGravity = -1; + } + + private void setupParameters() { + mLayoutParams = new WindowManager.LayoutParams(); + mLayoutParams.type = WindowManager.LayoutParams.TYPE_PHONE; + + if (isFullScreen) { + mLayoutParams.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN; + } + + int width = mWm.getDefaultDisplay().getWidth(); + int height = mWm.getDefaultDisplay().getHeight(); + if( width > height ) { + mLayoutParams.screenOrientation =android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; + } + + if (!mFocusable) { + mLayoutParams.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; + } + + if( mTouchableOutSide ) { + mLayoutParams.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; + } + + if( !mTouchable ) { + mLayoutParams.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE; + } + + /** + * 允许窗体放置在屏幕外面 + */ + mLayoutParams.flags |= WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS; + + if(-1 == mGravity) { + mLayoutParams.gravity = Gravity.LEFT | Gravity.TOP; + } else { + mLayoutParams.gravity = mGravity; + } + + mLayoutParams.x = mLeft; + mLayoutParams.y = mTop; + + mLayoutParams.width = mWidth; + mLayoutParams.height = mHeight; + mLayoutParams.format = PixelFormat.TRANSPARENT; + } + + + @Override + public boolean onTouch(View v, MotionEvent event) { + // 获取相对屏幕的坐标,即以屏幕左上角为原点 + x = event.getRawX(); + y = event.getRawY(); // 25是系统状态栏的高�? + + switch (event.getAction()) { + case MotionEvent.ACTION_DOWN: + + // 获取相对View的坐标,即以此View左上角为原点 + mTouchStartX = event.getX(); + mTouchStartY = event.getY(); + mStartX = x; + mStartY = y; + if (null != mTouchEventListener) { + mTouchEventListener.onDown( + (int) (event.getRawX() - mTouchStartX), + (int) (event.getRawY() - mTouchStartY)); + } + break; + case MotionEvent.ACTION_MOVE: + if (mSupportDragable && checkSuspendWindowMovable(event)) { + updateViewPosition(); + if (null != mTouchEventListener) { + mTouchEventListener.onMove( + (int) (event.getRawX() - mTouchStartX), + (int) (event.getRawY() - mTouchStartY)); + } + } + break; + case MotionEvent.ACTION_UP: + if (null != mTouchEventListener) { + mTouchEventListener.onUp( + (int) (event.getRawX() - mTouchStartX), + (int) (event.getRawY() - mTouchStartY)); + } + if( !checkSuspendWindowMovable(event) ) { + if (null != mCustomOnClickListener) + mCustomOnClickListener.onClick(v); + } + mTouchStartX = mTouchStartY = 0; + mStartX = mStartY = 0; + break; + } + if (mLongClickable) { + return false; + } + return true; + } + + private boolean checkSuspendWindowMovable(MotionEvent event) { + int xDiff = (int) Math.abs(event.getRawX() - mStartX); + int yDiff = (int) Math.abs(event.getRawY() - mStartY); + boolean xMoved = xDiff > mTouchSlop; + boolean yMoved = yDiff > mTouchSlop; + return xMoved || yMoved; + } + + protected void updateViewPosition() { + try { + // 更新浮动窗口位置参数 + mLayoutParams.x = (int) (x - mTouchStartX); + mLayoutParams.y = (int) (y - mTouchStartY); + mLeft = mLayoutParams.x; + mTop = mLayoutParams.y; + mWm.updateViewLayout(mContentView, mLayoutParams); + } catch (Exception e) { + + } + } + + private void showView() { + mVisible = true; + setupParameters(); + mWm.addView( mContentView, mLayoutParams); + if (mSupportDragable) { + mContentView.setOnTouchListener(this); + } + + if (null != mOnSuspensionShowOrCloseListener) { + mOnSuspensionShowOrCloseListener.onSuspensionWindowShow(); + } + + SuspensionWindowManager.getInstance().add(this); + SuspensionWindowManager.getInstance().setCurrentSuspensionWindow(this); + } + + @Override + public boolean equals(Object o) { + SuspensionWindow win = (SuspensionWindow) o; + return mContentView == win.getRootView(); + } + + + @Override + public int hashCode() { + // TODO Auto-generated method stub + return super.hashCode(); + } + + public void setExtraParameters(int nGravity) { + this.mGravity = nGravity; + } + +} diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/SuspensionWindowManager.java b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/SuspensionWindowManager.java new file mode 100755 index 0000000..0526e7a --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/SuspensionWindowManager.java @@ -0,0 +1,80 @@ +package com.cocobox.library.floatwindow; + +import java.util.ArrayList; +import java.util.List; + +final class SuspensionWindowManager { + + private SuspensionWindow mCurrentSuspendWindow; + + private ArrayList mListSuspensionWindow; + + private static SuspensionWindowManager _instance; + + private SuspensionWindowManager() { + mListSuspensionWindow = new ArrayList(); + } + + static SuspensionWindowManager getInstance() { + if( null == _instance ) { + _instance = new SuspensionWindowManager(); + } + return _instance; + } + + + /** + * 获取悬浮窗体数量 + * @return + */ + public int getCount() { + return mListSuspensionWindow.size(); + } + + public void clear() { + List windows = new ArrayList(mListSuspensionWindow); + + for( SuspensionWindow win : windows ) { + if( null == win ) continue; + win.close(); + } + mListSuspensionWindow.clear(); + } + + void add( SuspensionWindow win ) { + if( null == win ) return; + if( mListSuspensionWindow.contains( win ) ) return; + mListSuspensionWindow.add( win ); + } + + void remove( SuspensionWindow win ) { + mListSuspensionWindow.remove( win ); + if( mCurrentSuspendWindow == win ) { + int cout = mListSuspensionWindow.size(); + if( cout > 0 ) { + mCurrentSuspendWindow = mListSuspensionWindow.get( cout - 1 ); + } else { + mCurrentSuspendWindow = null; + } + } + } + + void setCurrentSuspensionWindow( SuspensionWindow win ) { + mCurrentSuspendWindow = win; + } + + void removeLastWindow() { + if (mCurrentSuspendWindow != null) + { + mCurrentSuspendWindow.close(); + } + } + + void showCurSuspendWindow() + { + if (mCurrentSuspendWindow != null) + { + mCurrentSuspendWindow.show(); + } + } +} diff --git a/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/TouchEventListener.java b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/TouchEventListener.java new file mode 100755 index 0000000..e1e896c --- /dev/null +++ b/samples/EarthWarrior3D/proj.android/thirdparty/FloatWindowLibrary/src/com/cocobox/library/floatwindow/TouchEventListener.java @@ -0,0 +1,14 @@ +package com.cocobox.library.floatwindow; + +/** + * + *

+ * @author bofeng_song + * @date 2013-2-22 下午4:56:36 + * @version 1.0 + */ +public interface TouchEventListener { + public void onMove(int x, int y); + public void onDown( int x, int y); + public void onUp(int x, int y); +} diff --git a/samples/EarthWarrior3D/proj.ios_mac/Moon3d.xcodeproj/project.pbxproj b/samples/EarthWarrior3D/proj.ios_mac/Moon3d.xcodeproj/project.pbxproj new file mode 100755 index 0000000..2c424b0 --- /dev/null +++ b/samples/EarthWarrior3D/proj.ios_mac/Moon3d.xcodeproj/project.pbxproj @@ -0,0 +1,1495 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1AC6FB1F180E996B004C840B /* libbox2d Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FAFF180E9839004C840B /* libbox2d Mac.a */; }; + 1AC6FB20180E996B004C840B /* libchipmunk Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FAFD180E9839004C840B /* libchipmunk Mac.a */; }; + 1AC6FB21180E996B004C840B /* libcocos2dx Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FAF9180E9839004C840B /* libcocos2dx Mac.a */; }; + 1AC6FB22180E996B004C840B /* libcocos2dx-extensions Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FAFB180E9839004C840B /* libcocos2dx-extensions Mac.a */; }; + 1AC6FB23180E996B004C840B /* libCocosDenshion Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB01180E9839004C840B /* libCocosDenshion Mac.a */; }; + 1AC6FB2E180E99EB004C840B /* libbox2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB0D180E9839004C840B /* libbox2d iOS.a */; }; + 1AC6FB2F180E99EB004C840B /* libchipmunk iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB0B180E9839004C840B /* libchipmunk iOS.a */; }; + 1AC6FB30180E99EB004C840B /* libcocos2dx iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB07180E9839004C840B /* libcocos2dx iOS.a */; }; + 1AC6FB31180E99EB004C840B /* libcocos2dx-extensions iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB09180E9839004C840B /* libcocos2dx-extensions iOS.a */; }; + 1AC6FB32180E99EB004C840B /* libCocosDenshion iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB0F180E9839004C840B /* libCocosDenshion iOS.a */; }; + 1AFAF8B716D35DE700DB1158 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFAF8B316D35DE700DB1158 /* AppDelegate.cpp */; }; + 1AFAF8B816D35DE700DB1158 /* HelloWorldScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFAF8B516D35DE700DB1158 /* HelloWorldScene.cpp */; }; + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; + 503AE0F817EB97AB00D1A890 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 503AE0F617EB97AB00D1A890 /* Icon.icns */; }; + 503AE10017EB989F00D1A890 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503AE0FB17EB989F00D1A890 /* AppController.mm */; }; + 503AE10117EB989F00D1A890 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 503AE0FC17EB989F00D1A890 /* main.m */; }; + 503AE10217EB989F00D1A890 /* RootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503AE0FF17EB989F00D1A890 /* RootViewController.mm */; }; + 503AE10517EB98FF00D1A890 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 503AE10317EB98FF00D1A890 /* main.cpp */; }; + 503AE11217EB99EE00D1A890 /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 503AE11117EB99EE00D1A890 /* libcurl.dylib */; }; + 503AE11B17EB9C5A00D1A890 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 503AE11A17EB9C5A00D1A890 /* IOKit.framework */; }; + 5087E75717EB910900C73F5D /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFAF8B316D35DE700DB1158 /* AppDelegate.cpp */; }; + 5087E75817EB910900C73F5D /* HelloWorldScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFAF8B516D35DE700DB1158 /* HelloWorldScene.cpp */; }; + 5087E76317EB910900C73F5D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 5087E76517EB910900C73F5D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; + 5087E76717EB910900C73F5D /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB412928DE900B8313A /* libz.dylib */; }; + 5087E76817EB910900C73F5D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF1C47EA1293683800B63C5D /* QuartzCore.framework */; }; + 5087E76917EB910900C73F5D /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620B132DFF330009C878 /* OpenAL.framework */; }; + 5087E76A17EB910900C73F5D /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620D132DFF430009C878 /* AVFoundation.framework */; }; + 5087E76B17EB910900C73F5D /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620F132DFF4E0009C878 /* AudioToolbox.framework */; }; + 5087E77D17EB970100C73F5D /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77217EB970100C73F5D /* Default-568h@2x.png */; }; + 5087E77E17EB970100C73F5D /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77317EB970100C73F5D /* Default.png */; }; + 5087E77F17EB970100C73F5D /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77417EB970100C73F5D /* Default@2x.png */; }; + 5087E78017EB970100C73F5D /* Icon-114.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77517EB970100C73F5D /* Icon-114.png */; }; + 5087E78117EB970100C73F5D /* Icon-120.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77617EB970100C73F5D /* Icon-120.png */; }; + 5087E78217EB970100C73F5D /* Icon-144.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77717EB970100C73F5D /* Icon-144.png */; }; + 5087E78317EB970100C73F5D /* Icon-152.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77817EB970100C73F5D /* Icon-152.png */; }; + 5087E78417EB970100C73F5D /* Icon-57.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77917EB970100C73F5D /* Icon-57.png */; }; + 5087E78517EB970100C73F5D /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77A17EB970100C73F5D /* Icon-72.png */; }; + 5087E78617EB970100C73F5D /* Icon-76.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77B17EB970100C73F5D /* Icon-76.png */; }; + 5087E78917EB974C00C73F5D /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5087E78817EB974C00C73F5D /* AppKit.framework */; }; + 5087E78B17EB975400C73F5D /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5087E78A17EB975400C73F5D /* OpenGL.framework */; }; + 50EF629617ECD46A001EB2F8 /* Icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF629217ECD46A001EB2F8 /* Icon-40.png */; }; + 50EF629717ECD46A001EB2F8 /* Icon-58.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF629317ECD46A001EB2F8 /* Icon-58.png */; }; + 50EF629817ECD46A001EB2F8 /* Icon-80.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF629417ECD46A001EB2F8 /* Icon-80.png */; }; + 50EF629917ECD46A001EB2F8 /* Icon-100.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF629517ECD46A001EB2F8 /* Icon-100.png */; }; + 50EF62A217ECD613001EB2F8 /* Icon-29.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF62A017ECD613001EB2F8 /* Icon-29.png */; }; + 50EF62A317ECD613001EB2F8 /* Icon-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF62A117ECD613001EB2F8 /* Icon-50.png */; }; + AC14CEC11935B9AA0064D545 /* FriendControlScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC14CEBF1935B9AA0064D545 /* FriendControlScene.cpp */; }; + AC14CEC81935BE390064D545 /* b1.png in Resources */ = {isa = PBXBuildFile; fileRef = AC14CEC21935BE390064D545 /* b1.png */; }; + AC14CEC91935BE390064D545 /* b2.png in Resources */ = {isa = PBXBuildFile; fileRef = AC14CEC31935BE390064D545 /* b2.png */; }; + AC14CECA1935BE390064D545 /* f1.png in Resources */ = {isa = PBXBuildFile; fileRef = AC14CEC41935BE390064D545 /* f1.png */; }; + AC14CECB1935BE390064D545 /* f2.png in Resources */ = {isa = PBXBuildFile; fileRef = AC14CEC51935BE390064D545 /* f2.png */; }; + AC14CECC1935BE390064D545 /* r1.png in Resources */ = {isa = PBXBuildFile; fileRef = AC14CEC61935BE390064D545 /* r1.png */; }; + AC14CECD1935BE390064D545 /* r2.png in Resources */ = {isa = PBXBuildFile; fileRef = AC14CEC71935BE390064D545 /* r2.png */; }; + AC14CED01935BE5F0064D545 /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = AC14CECE1935BE5F0064D545 /* CloseNormal.png */; }; + AC14CED11935BE5F0064D545 /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = AC14CECF1935BE5F0064D545 /* CloseSelected.png */; }; + AC3D0DEA19767B9900513649 /* potion2.png in Resources */ = {isa = PBXBuildFile; fileRef = AC3D0DE919767B9900513649 /* potion2.png */; }; + AC3D0DEB19767B9900513649 /* potion2.png in Resources */ = {isa = PBXBuildFile; fileRef = AC3D0DE919767B9900513649 /* potion2.png */; }; + AC40FF5519888B9500611C0F /* ConnectionInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC40FF5319888B9500611C0F /* ConnectionInterface.cpp */; }; + AC40FF5619888B9500611C0F /* ConnectionInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC40FF5319888B9500611C0F /* ConnectionInterface.cpp */; }; + AC69E74F192B3C31006CDFC8 /* Reward.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC69E74D192B3C31006CDFC8 /* Reward.cpp */; }; + AC69E755192B44CE006CDFC8 /* potion.jpg in Resources */ = {isa = PBXBuildFile; fileRef = AC69E754192B44CE006CDFC8 /* potion.jpg */; }; + AC6AD7F619764B1E00E5477C /* FriendPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC6AD7F419764B1E00E5477C /* FriendPlayer.cpp */; }; + AC6AD7F719764B1E00E5477C /* FriendPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC6AD7F419764B1E00E5477C /* FriendPlayer.cpp */; }; + BB0C48A3190910CE0015152C /* Mesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4879190910CE0015152C /* Mesh.cpp */; }; + BB0C48A4190910CE0015152C /* Mesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4879190910CE0015152C /* Mesh.cpp */; }; + BB0C48A5190910CE0015152C /* MeshCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C487B190910CE0015152C /* MeshCache.cpp */; }; + BB0C48A6190910CE0015152C /* MeshCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C487B190910CE0015152C /* MeshCache.cpp */; }; + BB0C48A7190910CE0015152C /* Sprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C487D190910CE0015152C /* Sprite3D.cpp */; }; + BB0C48A8190910CE0015152C /* Sprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C487D190910CE0015152C /* Sprite3D.cpp */; }; + BB0C48A9190910CE0015152C /* AirCraft.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4882190910CE0015152C /* AirCraft.cpp */; }; + BB0C48AA190910CE0015152C /* AirCraft.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4882190910CE0015152C /* AirCraft.cpp */; }; + BB0C48AB190910CE0015152C /* Bullets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4884190910CE0015152C /* Bullets.cpp */; }; + BB0C48AC190910CE0015152C /* Bullets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4884190910CE0015152C /* Bullets.cpp */; }; + BB0C48AD190910CE0015152C /* Effects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4887190910CE0015152C /* Effects.cpp */; }; + BB0C48AE190910CE0015152C /* Effects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4887190910CE0015152C /* Effects.cpp */; }; + BB0C48AF190910CE0015152C /* Enemies.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4889190910CE0015152C /* Enemies.cpp */; }; + BB0C48B0190910CE0015152C /* Enemies.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4889190910CE0015152C /* Enemies.cpp */; }; + BB0C48B1190910CE0015152C /* Explosion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C488B190910CE0015152C /* Explosion.cpp */; }; + BB0C48B2190910CE0015152C /* Explosion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C488B190910CE0015152C /* Explosion.cpp */; }; + BB0C48B3190910CE0015152C /* GameControllers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C488D190910CE0015152C /* GameControllers.cpp */; }; + BB0C48B4190910CE0015152C /* GameControllers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C488D190910CE0015152C /* GameControllers.cpp */; }; + BB0C48B5190910CE0015152C /* GameEntity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C488F190910CE0015152C /* GameEntity.cpp */; }; + BB0C48B6190910CE0015152C /* GameEntity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C488F190910CE0015152C /* GameEntity.cpp */; }; + BB0C48B7190910CE0015152C /* GameLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4891190910CE0015152C /* GameLayer.cpp */; }; + BB0C48B8190910CE0015152C /* GameLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4891190910CE0015152C /* GameLayer.cpp */; }; + BB0C48B9190910CE0015152C /* GameOverLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4893190910CE0015152C /* GameOverLayer.cpp */; }; + BB0C48BA190910CE0015152C /* GameOverLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4893190910CE0015152C /* GameOverLayer.cpp */; }; + BB0C48BB190910CE0015152C /* LicenseLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4895190910CE0015152C /* LicenseLayer.cpp */; }; + BB0C48BC190910CE0015152C /* LicenseLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4895190910CE0015152C /* LicenseLayer.cpp */; }; + BB0C48BD190910CE0015152C /* LoadingScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4897190910CE0015152C /* LoadingScene.cpp */; }; + BB0C48BE190910CE0015152C /* LoadingScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4897190910CE0015152C /* LoadingScene.cpp */; }; + BB0C48BF190910CE0015152C /* MainMenuScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4899190910CE0015152C /* MainMenuScene.cpp */; }; + BB0C48C0190910CE0015152C /* MainMenuScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C4899190910CE0015152C /* MainMenuScene.cpp */; }; + BB0C48C1190910CE0015152C /* ParticleManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C489B190910CE0015152C /* ParticleManager.cpp */; }; + BB0C48C2190910CE0015152C /* ParticleManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C489B190910CE0015152C /* ParticleManager.cpp */; }; + BB0C48C3190910CE0015152C /* Plane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C489D190910CE0015152C /* Plane.cpp */; }; + BB0C48C4190910CE0015152C /* Plane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C489D190910CE0015152C /* Plane.cpp */; }; + BB0C48C5190910CE0015152C /* Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C489F190910CE0015152C /* Player.cpp */; }; + BB0C48C6190910CE0015152C /* Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C489F190910CE0015152C /* Player.cpp */; }; + BB0C48C7190910CE0015152C /* PublicApi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C48A1190910CE0015152C /* PublicApi.cpp */; }; + BB0C48C8190910CE0015152C /* PublicApi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB0C48A1190910CE0015152C /* PublicApi.cpp */; }; + BB0C4901190910E70015152C /* boom.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CB190910E60015152C /* boom.mp3 */; }; + BB0C4902190910E70015152C /* boom.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CB190910E60015152C /* boom.mp3 */; }; + BB0C4903190910E70015152C /* boom2.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CC190910E60015152C /* boom2.mp3 */; }; + BB0C4904190910E70015152C /* boom2.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CC190910E60015152C /* boom2.mp3 */; }; + BB0C4905190910E70015152C /* boss.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CD190910E60015152C /* boss.obj */; }; + BB0C4906190910E70015152C /* boss.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CD190910E60015152C /* boss.obj */; }; + BB0C4907190910E70015152C /* boss.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CE190910E60015152C /* boss.png */; }; + BB0C4908190910E70015152C /* boss.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CE190910E60015152C /* boss.png */; }; + BB0C4909190910E70015152C /* bossCannon.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CF190910E60015152C /* bossCannon.obj */; }; + BB0C490A190910E70015152C /* bossCannon.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48CF190910E60015152C /* bossCannon.obj */; }; + BB0C490B190910E70015152C /* bullets.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D0190910E60015152C /* bullets.png */; }; + BB0C490C190910E70015152C /* bullets.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D0190910E60015152C /* bullets.png */; }; + BB0C490D190910E70015152C /* coco.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D1190910E60015152C /* coco.png */; }; + BB0C490E190910E70015152C /* coco.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D1190910E60015152C /* coco.png */; }; + BB0C490F190910E70015152C /* coconut.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D2190910E60015152C /* coconut.obj */; }; + BB0C4910190910E70015152C /* coconut.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D2190910E60015152C /* coconut.obj */; }; + BB0C4911190910E70015152C /* credits_03.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D3190910E60015152C /* credits_03.png */; }; + BB0C4912190910E70015152C /* credits_03.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D3190910E60015152C /* credits_03.png */; }; + BB0C4913190910E70015152C /* daodan_32.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D4190910E60015152C /* daodan_32.png */; }; + BB0C4914190910E70015152C /* daodan_32.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D4190910E60015152C /* daodan_32.png */; }; + BB0C4915190910E70015152C /* daodanv001.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D5190910E60015152C /* daodanv001.obj */; }; + BB0C4916190910E70015152C /* daodanv001.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D5190910E60015152C /* daodanv001.obj */; }; + BB0C4917190910E70015152C /* debris.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D6190910E60015152C /* debris.plist */; }; + BB0C4918190910E70015152C /* debris.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D6190910E60015152C /* debris.plist */; }; + BB0C4919190910E70015152C /* diji1_v001.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D7190910E60015152C /* diji1_v001.obj */; }; + BB0C491A190910E70015152C /* diji1_v001.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D7190910E60015152C /* diji1_v001.obj */; }; + BB0C491B190910E70015152C /* diji1_v002.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D8190910E60015152C /* diji1_v002.obj */; }; + BB0C491C190910E70015152C /* diji1_v002.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D8190910E60015152C /* diji1_v002.obj */; }; + BB0C491D190910E70015152C /* diji02_v002_128.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D9190910E60015152C /* diji02_v002_128.png */; }; + BB0C491E190910E70015152C /* diji02_v002_128.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48D9190910E60015152C /* diji02_v002_128.png */; }; + BB0C491F190910E70015152C /* dijiyuanv001.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DA190910E60015152C /* dijiyuanv001.obj */; }; + BB0C4920190910E70015152C /* dijiyuanv001.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DA190910E60015152C /* dijiyuanv001.obj */; }; + BB0C4921190910E70015152C /* dijiyuanv001.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DB190910E60015152C /* dijiyuanv001.png */; }; + BB0C4922190910E70015152C /* dijiyuanv001.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DB190910E60015152C /* dijiyuanv001.png */; }; + BB0C4923190910E70015152C /* emission.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DC190910E60015152C /* emission.plist */; }; + BB0C4924190910E70015152C /* emission.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DC190910E60015152C /* emission.plist */; }; + BB0C4925190910E70015152C /* emissionPart.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DD190910E60015152C /* emissionPart.plist */; }; + BB0C4926190910E70015152C /* emissionPart.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DD190910E60015152C /* emissionPart.plist */; }; + BB0C4927190910E70015152C /* engine.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DE190910E60015152C /* engine.plist */; }; + BB0C4928190910E70015152C /* engine.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DE190910E60015152C /* engine.plist */; }; + BB0C4929190910E70015152C /* explodeEffect.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DF190910E60015152C /* explodeEffect.mp3 */; }; + BB0C492A190910E70015152C /* explodeEffect.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48DF190910E60015152C /* explodeEffect.mp3 */; }; + BB0C492B190910E70015152C /* flare.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E0190910E60015152C /* flare.plist */; }; + BB0C492C190910E70015152C /* flare.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E0190910E60015152C /* flare.plist */; }; + BB0C492D190910E70015152C /* Flux2.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E1190910E60015152C /* Flux2.mp3 */; }; + BB0C492E190910E70015152C /* Flux2.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E1190910E60015152C /* Flux2.mp3 */; }; + BB0C492F190910E70015152C /* Marker Felt.ttf in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E3190910E60015152C /* Marker Felt.ttf */; }; + BB0C4930190910E70015152C /* Marker Felt.ttf in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E3190910E60015152C /* Marker Felt.ttf */; }; + BB0C4931190910E70015152C /* gameover_score_num_0.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E4190910E60015152C /* gameover_score_num_0.png */; }; + BB0C4932190910E70015152C /* gameover_score_num_0.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E4190910E60015152C /* gameover_score_num_0.png */; }; + BB0C4933190910E70015152C /* gameover_score_num.fnt in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E5190910E60015152C /* gameover_score_num.fnt */; }; + BB0C4934190910E70015152C /* gameover_score_num.fnt in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E5190910E60015152C /* gameover_score_num.fnt */; }; + BB0C4935190910E70015152C /* gameover.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E6190910E60015152C /* gameover.plist */; }; + BB0C4936190910E70015152C /* gameover.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E6190910E60015152C /* gameover.plist */; }; + BB0C4937190910E70015152C /* gameover.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E7190910E60015152C /* gameover.png */; }; + BB0C4938190910E70015152C /* gameover.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E7190910E60015152C /* gameover.png */; }; + BB0C4939190910E70015152C /* glow.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E8190910E60015152C /* glow.plist */; }; + BB0C493A190910E70015152C /* glow.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E8190910E60015152C /* glow.plist */; }; + BB0C493B190910E70015152C /* groundLevel.jpg in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E9190910E60015152C /* groundLevel.jpg */; }; + BB0C493C190910E70015152C /* groundLevel.jpg in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48E9190910E60015152C /* groundLevel.jpg */; }; + BB0C493D190910E70015152C /* hit.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EA190910E60015152C /* hit.mp3 */; }; + BB0C493E190910E70015152C /* hit.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EA190910E60015152C /* hit.mp3 */; }; + BB0C493F190910E70015152C /* LICENSE_03.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EB190910E60015152C /* LICENSE_03.png */; }; + BB0C4940190910E70015152C /* LICENSE_03.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EB190910E60015152C /* LICENSE_03.png */; }; + BB0C4941190910E70015152C /* loadingAndHP.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EC190910E60015152C /* loadingAndHP.plist */; }; + BB0C4942190910E70015152C /* loadingAndHP.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EC190910E60015152C /* loadingAndHP.plist */; }; + BB0C4943190910E70015152C /* loadingAndHP.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48ED190910E60015152C /* loadingAndHP.png */; }; + BB0C4944190910E70015152C /* loadingAndHP.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48ED190910E60015152C /* loadingAndHP.png */; }; + BB0C4945190910E70015152C /* menu_scene.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EE190910E60015152C /* menu_scene.plist */; }; + BB0C4946190910E70015152C /* menu_scene.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EE190910E60015152C /* menu_scene.plist */; }; + BB0C4947190910E70015152C /* menu_scene.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EF190910E60015152C /* menu_scene.png */; }; + BB0C4948190910E70015152C /* menu_scene.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48EF190910E60015152C /* menu_scene.png */; }; + BB0C4949190910E70015152C /* menuEmission.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F0190910E60015152C /* menuEmission.plist */; }; + BB0C494A190910E70015152C /* menuEmission.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F0190910E60015152C /* menuEmission.plist */; }; + BB0C494B190910E70015152C /* missileFlare.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F1190910E60015152C /* missileFlare.plist */; }; + BB0C494C190910E70015152C /* missileFlare.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F1190910E60015152C /* missileFlare.plist */; }; + BB0C494D190910E70015152C /* muzzle.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F2190910E60015152C /* muzzle.png */; }; + BB0C494E190910E70015152C /* muzzle.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F2190910E60015152C /* muzzle.png */; }; + BB0C494F190910E70015152C /* num_0.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F3190910E60015152C /* num_0.png */; }; + BB0C4950190910E70015152C /* num_0.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F3190910E60015152C /* num_0.png */; }; + BB0C4951190910E70015152C /* num.fnt in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F4190910E60015152C /* num.fnt */; }; + BB0C4952190910E70015152C /* num.fnt in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F4190910E60015152C /* num.fnt */; }; + BB0C4953190910E70015152C /* Orbital Colossus_0.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F5190910E60015152C /* Orbital Colossus_0.mp3 */; }; + BB0C4954190910E70015152C /* Orbital Colossus_0.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F5190910E60015152C /* Orbital Colossus_0.mp3 */; }; + BB0C4955190910E70015152C /* Particle.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F6190910E60015152C /* Particle.plist */; }; + BB0C4956190910E70015152C /* Particle.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F6190910E60015152C /* Particle.plist */; }; + BB0C4957190910E70015152C /* Particle.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F7190910E60015152C /* Particle.png */; }; + BB0C4958190910E70015152C /* Particle.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F7190910E60015152C /* Particle.png */; }; + BB0C4959190910E70015152C /* player_bullet_explosion.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F8190910E60015152C /* player_bullet_explosion.png */; }; + BB0C495A190910E70015152C /* player_bullet_explosion.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F8190910E60015152C /* player_bullet_explosion.png */; }; + BB0C495B190910E70015152C /* playerv002_256.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F9190910E60015152C /* playerv002_256.png */; }; + BB0C495C190910E70015152C /* playerv002_256.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48F9190910E60015152C /* playerv002_256.png */; }; + BB0C495D190910E70015152C /* playerv002.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FA190910E60015152C /* playerv002.obj */; }; + BB0C495E190910E70015152C /* playerv002.obj in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FA190910E60015152C /* playerv002.obj */; }; + BB0C495F190910E70015152C /* score_right_top.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FB190910E60015152C /* score_right_top.png */; }; + BB0C4960190910E70015152C /* score_right_top.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FB190910E60015152C /* score_right_top.png */; }; + BB0C4963190910E70015152C /* Star_Chaser.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FD190910E60015152C /* Star_Chaser.mp3 */; }; + BB0C4964190910E70015152C /* Star_Chaser.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FD190910E60015152C /* Star_Chaser.mp3 */; }; + BB0C4965190910E70015152C /* streak.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FE190910E60015152C /* streak.png */; }; + BB0C4966190910E70015152C /* streak.png in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FE190910E60015152C /* streak.png */; }; + BB0C4967190910E70015152C /* toonSmoke.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FF190910E60015152C /* toonSmoke.plist */; }; + BB0C4968190910E70015152C /* toonSmoke.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C48FF190910E60015152C /* toonSmoke.plist */; }; + BB0C4969190910E70015152C /* vanishingPoint.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C4900190910E70015152C /* vanishingPoint.plist */; }; + BB0C496A190910E70015152C /* vanishingPoint.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB0C4900190910E70015152C /* vanishingPoint.plist */; }; + BF171245129291EC00B8313A /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB012928DE900B8313A /* OpenGLES.framework */; }; + BF1712471292920000B8313A /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB412928DE900B8313A /* libz.dylib */; }; + BF1C47F01293687400B63C5D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF1C47EA1293683800B63C5D /* QuartzCore.framework */; }; + D44C620C132DFF330009C878 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620B132DFF330009C878 /* OpenAL.framework */; }; + D44C620E132DFF430009C878 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620D132DFF430009C878 /* AVFoundation.framework */; }; + D44C6210132DFF4E0009C878 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620F132DFF4E0009C878 /* AudioToolbox.framework */; }; + D6B0611B1803AB670077942B /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6B0611A1803AB670077942B /* CoreMotion.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 1AC6FAF8180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 1551A33F158F2AB200E66CFE; + remoteInfo = "cocos2dx Mac"; + }; + 1AC6FAFA180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2FD617814595006731B9; + remoteInfo = "cocos2dx-extensions Mac"; + }; + 1AC6FAFC180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2CB81780BD04006731B9; + remoteInfo = "chipmunk Mac"; + }; + 1AC6FAFE180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2D9B1780BDF7006731B9; + remoteInfo = "box2d Mac"; + }; + 1AC6FB00180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2ED617814268006731B9; + remoteInfo = "CocosDenshion Mac"; + }; + 1AC6FB06180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4D641783777C0073F6A7; + remoteInfo = "cocos2dx iOS"; + }; + 1AC6FB08180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4EFC1783867C0073F6A7; + remoteInfo = "cocos2dx-extensions iOS"; + }; + 1AC6FB0A180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4F3B178387670073F6A7; + remoteInfo = "chipmunk iOS"; + }; + 1AC6FB0C180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4F9E1783876B0073F6A7; + remoteInfo = "box2d iOS"; + }; + 1AC6FB0E180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4FB4178387730073F6A7; + remoteInfo = "CocosDenshion iOS"; + }; + 1AC6FB15180E9959004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 1551A33E158F2AB200E66CFE; + remoteInfo = "cocos2dx Mac"; + }; + 1AC6FB17180E9959004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2FC117814595006731B9; + remoteInfo = "cocos2dx-extensions Mac"; + }; + 1AC6FB19180E9959004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2B781780BD04006731B9; + remoteInfo = "chipmunk Mac"; + }; + 1AC6FB1B180E9959004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2E9817814268006731B9; + remoteInfo = "CocosDenshion Mac"; + }; + 1AC6FB1D180E9963004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2D5D1780BDF7006731B9; + remoteInfo = "box2d Mac"; + }; + 1AC6FB24180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4C241783777C0073F6A7; + remoteInfo = "cocos2dx iOS"; + }; + 1AC6FB26180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4E111783867C0073F6A7; + remoteInfo = "cocos2dx-extensions iOS"; + }; + 1AC6FB28180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4EFD178387670073F6A7; + remoteInfo = "chipmunk iOS"; + }; + 1AC6FB2A180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4F3C1783876B0073F6A7; + remoteInfo = "box2d iOS"; + }; + 1AC6FB2C180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4F9F178387730073F6A7; + remoteInfo = "CocosDenshion iOS"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../cocos2d/build/cocos2d_libs.xcodeproj; sourceTree = ""; }; + 1ACB3243164770DE00914215 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../../cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = ""; }; + 1AFAF8B316D35DE700DB1158 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AppDelegate.cpp; path = ../Classes/AppDelegate.cpp; sourceTree = ""; }; + 1AFAF8B416D35DE700DB1158 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ../Classes/AppDelegate.h; sourceTree = ""; }; + 1AFAF8B516D35DE700DB1158 /* HelloWorldScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HelloWorldScene.cpp; path = ../Classes/HelloWorldScene.cpp; sourceTree = ""; }; + 1AFAF8B616D35DE700DB1158 /* HelloWorldScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HelloWorldScene.h; path = ../Classes/HelloWorldScene.h; sourceTree = ""; }; + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1D6058910D05DD3D006BFB54 /* Moon3D iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Moon3D iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 503AE0F617EB97AB00D1A890 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = ""; }; + 503AE0F717EB97AB00D1A890 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 503AE0FA17EB989F00D1A890 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = ios/AppController.h; sourceTree = SOURCE_ROOT; }; + 503AE0FB17EB989F00D1A890 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppController.mm; path = ios/AppController.mm; sourceTree = SOURCE_ROOT; }; + 503AE0FC17EB989F00D1A890 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ios/main.m; sourceTree = SOURCE_ROOT; }; + 503AE0FD17EB989F00D1A890 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = ios/Prefix.pch; sourceTree = SOURCE_ROOT; }; + 503AE0FE17EB989F00D1A890 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RootViewController.h; path = ios/RootViewController.h; sourceTree = SOURCE_ROOT; }; + 503AE0FF17EB989F00D1A890 /* RootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RootViewController.mm; path = ios/RootViewController.mm; sourceTree = SOURCE_ROOT; }; + 503AE10317EB98FF00D1A890 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = mac/main.cpp; sourceTree = ""; }; + 503AE10417EB98FF00D1A890 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = mac/Prefix.pch; sourceTree = ""; }; + 503AE11117EB99EE00D1A890 /* libcurl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcurl.dylib; path = usr/lib/libcurl.dylib; sourceTree = SDKROOT; }; + 503AE11A17EB9C5A00D1A890 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; + 5087E76F17EB910900C73F5D /* Moon3D Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Moon3D Mac.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5087E77217EB970100C73F5D /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 5087E77317EB970100C73F5D /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 5087E77417EB970100C73F5D /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 5087E77517EB970100C73F5D /* Icon-114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-114.png"; sourceTree = ""; }; + 5087E77617EB970100C73F5D /* Icon-120.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-120.png"; sourceTree = ""; }; + 5087E77717EB970100C73F5D /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-144.png"; sourceTree = ""; }; + 5087E77817EB970100C73F5D /* Icon-152.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-152.png"; sourceTree = ""; }; + 5087E77917EB970100C73F5D /* Icon-57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-57.png"; sourceTree = ""; }; + 5087E77A17EB970100C73F5D /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; + 5087E77B17EB970100C73F5D /* Icon-76.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-76.png"; sourceTree = ""; }; + 5087E77C17EB970100C73F5D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5087E78817EB974C00C73F5D /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 5087E78A17EB975400C73F5D /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + 50EF629217ECD46A001EB2F8 /* Icon-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-40.png"; sourceTree = ""; }; + 50EF629317ECD46A001EB2F8 /* Icon-58.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-58.png"; sourceTree = ""; }; + 50EF629417ECD46A001EB2F8 /* Icon-80.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-80.png"; sourceTree = ""; }; + 50EF629517ECD46A001EB2F8 /* Icon-100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-100.png"; sourceTree = ""; }; + 50EF62A017ECD613001EB2F8 /* Icon-29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-29.png"; sourceTree = ""; }; + 50EF62A117ECD613001EB2F8 /* Icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-50.png"; sourceTree = ""; }; + AC14CEBF1935B9AA0064D545 /* FriendControlScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FriendControlScene.cpp; sourceTree = ""; }; + AC14CEC01935B9AA0064D545 /* FriendControlScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FriendControlScene.h; sourceTree = ""; }; + AC14CEC21935BE390064D545 /* b1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = b1.png; sourceTree = ""; }; + AC14CEC31935BE390064D545 /* b2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = b2.png; sourceTree = ""; }; + AC14CEC41935BE390064D545 /* f1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = f1.png; sourceTree = ""; }; + AC14CEC51935BE390064D545 /* f2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = f2.png; sourceTree = ""; }; + AC14CEC61935BE390064D545 /* r1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = r1.png; sourceTree = ""; }; + AC14CEC71935BE390064D545 /* r2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = r2.png; sourceTree = ""; }; + AC14CECE1935BE5F0064D545 /* CloseNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CloseNormal.png; sourceTree = ""; }; + AC14CECF1935BE5F0064D545 /* CloseSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CloseSelected.png; sourceTree = ""; }; + AC3D0DE919767B9900513649 /* potion2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = potion2.png; sourceTree = ""; }; + AC40FF5319888B9500611C0F /* ConnectionInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConnectionInterface.cpp; path = ../Classes/ConnectionInterface.cpp; sourceTree = ""; }; + AC40FF5419888B9500611C0F /* ConnectionInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConnectionInterface.h; path = ../Classes/ConnectionInterface.h; sourceTree = ""; }; + AC69E74D192B3C31006CDFC8 /* Reward.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Reward.cpp; path = ../Classes/Reward.cpp; sourceTree = ""; }; + AC69E74E192B3C31006CDFC8 /* Reward.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Reward.h; path = ../Classes/Reward.h; sourceTree = ""; }; + AC69E754192B44CE006CDFC8 /* potion.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = potion.jpg; sourceTree = ""; }; + AC6AD7F419764B1E00E5477C /* FriendPlayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FriendPlayer.cpp; path = ../Classes/FriendPlayer.cpp; sourceTree = ""; }; + AC6AD7F519764B1E00E5477C /* FriendPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FriendPlayer.h; path = ../Classes/FriendPlayer.h; sourceTree = ""; }; + BB0C4878190910CE0015152C /* Colored.es2.frag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Colored.es2.frag.h; sourceTree = ""; }; + BB0C4879190910CE0015152C /* Mesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Mesh.cpp; sourceTree = ""; }; + BB0C487A190910CE0015152C /* Mesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Mesh.h; sourceTree = ""; }; + BB0C487B190910CE0015152C /* MeshCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MeshCache.cpp; sourceTree = ""; }; + BB0C487C190910CE0015152C /* MeshCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MeshCache.h; sourceTree = ""; }; + BB0C487D190910CE0015152C /* Sprite3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Sprite3D.cpp; sourceTree = ""; }; + BB0C487E190910CE0015152C /* Sprite3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sprite3D.h; sourceTree = ""; }; + BB0C487F190910CE0015152C /* Textured.es2.frag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Textured.es2.frag.h; sourceTree = ""; }; + BB0C4880190910CE0015152C /* Textured.es2.vert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Textured.es2.vert.h; sourceTree = ""; }; + BB0C4881190910CE0015152C /* Vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vector.h; sourceTree = ""; }; + BB0C4882190910CE0015152C /* AirCraft.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirCraft.cpp; path = ../Classes/AirCraft.cpp; sourceTree = ""; }; + BB0C4883190910CE0015152C /* AirCraft.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirCraft.h; path = ../Classes/AirCraft.h; sourceTree = ""; }; + BB0C4884190910CE0015152C /* Bullets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Bullets.cpp; path = ../Classes/Bullets.cpp; sourceTree = ""; }; + BB0C4885190910CE0015152C /* Bullets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Bullets.h; path = ../Classes/Bullets.h; sourceTree = ""; }; + BB0C4886190910CE0015152C /* consts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = consts.h; path = ../Classes/consts.h; sourceTree = ""; }; + BB0C4887190910CE0015152C /* Effects.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Effects.cpp; path = ../Classes/Effects.cpp; sourceTree = ""; }; + BB0C4888190910CE0015152C /* Effects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Effects.h; path = ../Classes/Effects.h; sourceTree = ""; }; + BB0C4889190910CE0015152C /* Enemies.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Enemies.cpp; path = ../Classes/Enemies.cpp; sourceTree = ""; }; + BB0C488A190910CE0015152C /* Enemies.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Enemies.h; path = ../Classes/Enemies.h; sourceTree = ""; }; + BB0C488B190910CE0015152C /* Explosion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Explosion.cpp; path = ../Classes/Explosion.cpp; sourceTree = ""; }; + BB0C488C190910CE0015152C /* Explosion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Explosion.h; path = ../Classes/Explosion.h; sourceTree = ""; }; + BB0C488D190910CE0015152C /* GameControllers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameControllers.cpp; path = ../Classes/GameControllers.cpp; sourceTree = ""; }; + BB0C488E190910CE0015152C /* GameControllers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameControllers.h; path = ../Classes/GameControllers.h; sourceTree = ""; }; + BB0C488F190910CE0015152C /* GameEntity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameEntity.cpp; path = ../Classes/GameEntity.cpp; sourceTree = ""; }; + BB0C4890190910CE0015152C /* GameEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameEntity.h; path = ../Classes/GameEntity.h; sourceTree = ""; }; + BB0C4891190910CE0015152C /* GameLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameLayer.cpp; path = ../Classes/GameLayer.cpp; sourceTree = ""; }; + BB0C4892190910CE0015152C /* GameLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameLayer.h; path = ../Classes/GameLayer.h; sourceTree = ""; }; + BB0C4893190910CE0015152C /* GameOverLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameOverLayer.cpp; path = ../Classes/GameOverLayer.cpp; sourceTree = ""; }; + BB0C4894190910CE0015152C /* GameOverLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameOverLayer.h; path = ../Classes/GameOverLayer.h; sourceTree = ""; }; + BB0C4895190910CE0015152C /* LicenseLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LicenseLayer.cpp; path = ../Classes/LicenseLayer.cpp; sourceTree = ""; }; + BB0C4896190910CE0015152C /* LicenseLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LicenseLayer.h; path = ../Classes/LicenseLayer.h; sourceTree = ""; }; + BB0C4897190910CE0015152C /* LoadingScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LoadingScene.cpp; path = ../Classes/LoadingScene.cpp; sourceTree = ""; }; + BB0C4898190910CE0015152C /* LoadingScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LoadingScene.h; path = ../Classes/LoadingScene.h; sourceTree = ""; }; + BB0C4899190910CE0015152C /* MainMenuScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MainMenuScene.cpp; path = ../Classes/MainMenuScene.cpp; sourceTree = ""; }; + BB0C489A190910CE0015152C /* MainMenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuScene.h; path = ../Classes/MainMenuScene.h; sourceTree = ""; }; + BB0C489B190910CE0015152C /* ParticleManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParticleManager.cpp; path = ../Classes/ParticleManager.cpp; sourceTree = ""; }; + BB0C489C190910CE0015152C /* ParticleManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParticleManager.h; path = ../Classes/ParticleManager.h; sourceTree = ""; }; + BB0C489D190910CE0015152C /* Plane.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Plane.cpp; path = ../Classes/Plane.cpp; sourceTree = ""; }; + BB0C489E190910CE0015152C /* Plane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Plane.h; path = ../Classes/Plane.h; sourceTree = ""; }; + BB0C489F190910CE0015152C /* Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../Classes/Player.cpp; sourceTree = ""; }; + BB0C48A0190910CE0015152C /* Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../Classes/Player.h; sourceTree = ""; }; + BB0C48A1190910CE0015152C /* PublicApi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PublicApi.cpp; path = ../Classes/PublicApi.cpp; sourceTree = ""; }; + BB0C48A2190910CE0015152C /* PublicApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PublicApi.h; path = ../Classes/PublicApi.h; sourceTree = ""; }; + BB0C48CB190910E60015152C /* boom.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = boom.mp3; sourceTree = ""; }; + BB0C48CC190910E60015152C /* boom2.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = boom2.mp3; sourceTree = ""; }; + BB0C48CD190910E60015152C /* boss.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = boss.obj; sourceTree = ""; }; + BB0C48CE190910E60015152C /* boss.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = boss.png; sourceTree = ""; }; + BB0C48CF190910E60015152C /* bossCannon.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = bossCannon.obj; sourceTree = ""; }; + BB0C48D0190910E60015152C /* bullets.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bullets.png; sourceTree = ""; }; + BB0C48D1190910E60015152C /* coco.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = coco.png; sourceTree = ""; }; + BB0C48D2190910E60015152C /* coconut.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = coconut.obj; sourceTree = ""; }; + BB0C48D3190910E60015152C /* credits_03.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = credits_03.png; sourceTree = ""; }; + BB0C48D4190910E60015152C /* daodan_32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = daodan_32.png; sourceTree = ""; }; + BB0C48D5190910E60015152C /* daodanv001.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = daodanv001.obj; sourceTree = ""; }; + BB0C48D6190910E60015152C /* debris.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = debris.plist; sourceTree = ""; }; + BB0C48D7190910E60015152C /* diji1_v001.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = diji1_v001.obj; sourceTree = ""; }; + BB0C48D8190910E60015152C /* diji1_v002.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = diji1_v002.obj; sourceTree = ""; }; + BB0C48D9190910E60015152C /* diji02_v002_128.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = diji02_v002_128.png; sourceTree = ""; }; + BB0C48DA190910E60015152C /* dijiyuanv001.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dijiyuanv001.obj; sourceTree = ""; }; + BB0C48DB190910E60015152C /* dijiyuanv001.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dijiyuanv001.png; sourceTree = ""; }; + BB0C48DC190910E60015152C /* emission.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = emission.plist; sourceTree = ""; }; + BB0C48DD190910E60015152C /* emissionPart.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = emissionPart.plist; sourceTree = ""; }; + BB0C48DE190910E60015152C /* engine.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = engine.plist; sourceTree = ""; }; + BB0C48DF190910E60015152C /* explodeEffect.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = explodeEffect.mp3; sourceTree = ""; }; + BB0C48E0190910E60015152C /* flare.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = flare.plist; sourceTree = ""; }; + BB0C48E1190910E60015152C /* Flux2.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = Flux2.mp3; sourceTree = ""; }; + BB0C48E3190910E60015152C /* Marker Felt.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Marker Felt.ttf"; sourceTree = ""; }; + BB0C48E4190910E60015152C /* gameover_score_num_0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = gameover_score_num_0.png; sourceTree = ""; }; + BB0C48E5190910E60015152C /* gameover_score_num.fnt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gameover_score_num.fnt; sourceTree = ""; }; + BB0C48E6190910E60015152C /* gameover.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = gameover.plist; sourceTree = ""; }; + BB0C48E7190910E60015152C /* gameover.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = gameover.png; sourceTree = ""; }; + BB0C48E8190910E60015152C /* glow.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = glow.plist; sourceTree = ""; }; + BB0C48E9190910E60015152C /* groundLevel.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = groundLevel.jpg; sourceTree = ""; }; + BB0C48EA190910E60015152C /* hit.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = hit.mp3; sourceTree = ""; }; + BB0C48EB190910E60015152C /* LICENSE_03.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = LICENSE_03.png; sourceTree = ""; }; + BB0C48EC190910E60015152C /* loadingAndHP.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = loadingAndHP.plist; sourceTree = ""; }; + BB0C48ED190910E60015152C /* loadingAndHP.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = loadingAndHP.png; sourceTree = ""; }; + BB0C48EE190910E60015152C /* menu_scene.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = menu_scene.plist; sourceTree = ""; }; + BB0C48EF190910E60015152C /* menu_scene.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_scene.png; sourceTree = ""; }; + BB0C48F0190910E60015152C /* menuEmission.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = menuEmission.plist; sourceTree = ""; }; + BB0C48F1190910E60015152C /* missileFlare.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = missileFlare.plist; sourceTree = ""; }; + BB0C48F2190910E60015152C /* muzzle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = muzzle.png; sourceTree = ""; }; + BB0C48F3190910E60015152C /* num_0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = num_0.png; sourceTree = ""; }; + BB0C48F4190910E60015152C /* num.fnt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = num.fnt; sourceTree = ""; }; + BB0C48F5190910E60015152C /* Orbital Colossus_0.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "Orbital Colossus_0.mp3"; sourceTree = ""; }; + BB0C48F6190910E60015152C /* Particle.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Particle.plist; sourceTree = ""; }; + BB0C48F7190910E60015152C /* Particle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Particle.png; sourceTree = ""; }; + BB0C48F8190910E60015152C /* player_bullet_explosion.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = player_bullet_explosion.png; sourceTree = ""; }; + BB0C48F9190910E60015152C /* playerv002_256.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = playerv002_256.png; sourceTree = ""; }; + BB0C48FA190910E60015152C /* playerv002.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = playerv002.obj; sourceTree = ""; }; + BB0C48FB190910E60015152C /* score_right_top.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = score_right_top.png; sourceTree = ""; }; + BB0C48FD190910E60015152C /* Star_Chaser.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = Star_Chaser.mp3; sourceTree = ""; }; + BB0C48FE190910E60015152C /* streak.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = streak.png; sourceTree = ""; }; + BB0C48FF190910E60015152C /* toonSmoke.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = toonSmoke.plist; sourceTree = ""; }; + BB0C4900190910E70015152C /* vanishingPoint.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = vanishingPoint.plist; sourceTree = ""; }; + BF170DB012928DE900B8313A /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + BF170DB412928DE900B8313A /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + BF1C47EA1293683800B63C5D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + D44C620B132DFF330009C878 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + D44C620D132DFF430009C878 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + D44C620F132DFF4E0009C878 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + D6B0611A1803AB670077942B /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1AC6FB2E180E99EB004C840B /* libbox2d iOS.a in Frameworks */, + 1AC6FB2F180E99EB004C840B /* libchipmunk iOS.a in Frameworks */, + 1AC6FB30180E99EB004C840B /* libcocos2dx iOS.a in Frameworks */, + 1AC6FB31180E99EB004C840B /* libcocos2dx-extensions iOS.a in Frameworks */, + 1AC6FB32180E99EB004C840B /* libCocosDenshion iOS.a in Frameworks */, + D6B0611B1803AB670077942B /* CoreMotion.framework in Frameworks */, + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, + BF171245129291EC00B8313A /* OpenGLES.framework in Frameworks */, + BF1712471292920000B8313A /* libz.dylib in Frameworks */, + BF1C47F01293687400B63C5D /* QuartzCore.framework in Frameworks */, + D44C620C132DFF330009C878 /* OpenAL.framework in Frameworks */, + D44C620E132DFF430009C878 /* AVFoundation.framework in Frameworks */, + D44C6210132DFF4E0009C878 /* AudioToolbox.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5087E75C17EB910900C73F5D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1AC6FB1F180E996B004C840B /* libbox2d Mac.a in Frameworks */, + 1AC6FB20180E996B004C840B /* libchipmunk Mac.a in Frameworks */, + 1AC6FB21180E996B004C840B /* libcocos2dx Mac.a in Frameworks */, + 1AC6FB22180E996B004C840B /* libcocos2dx-extensions Mac.a in Frameworks */, + 1AC6FB23180E996B004C840B /* libCocosDenshion Mac.a in Frameworks */, + 503AE11217EB99EE00D1A890 /* libcurl.dylib in Frameworks */, + 5087E76717EB910900C73F5D /* libz.dylib in Frameworks */, + 503AE11B17EB9C5A00D1A890 /* IOKit.framework in Frameworks */, + 5087E78B17EB975400C73F5D /* OpenGL.framework in Frameworks */, + 5087E78917EB974C00C73F5D /* AppKit.framework in Frameworks */, + 5087E76317EB910900C73F5D /* Foundation.framework in Frameworks */, + 5087E76517EB910900C73F5D /* CoreGraphics.framework in Frameworks */, + 5087E76817EB910900C73F5D /* QuartzCore.framework in Frameworks */, + 5087E76917EB910900C73F5D /* OpenAL.framework in Frameworks */, + 5087E76A17EB910900C73F5D /* AVFoundation.framework in Frameworks */, + 5087E76B17EB910900C73F5D /* AudioToolbox.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* ios */ = { + isa = PBXGroup; + children = ( + 5087E77117EB970100C73F5D /* Icons */, + 503AE0FA17EB989F00D1A890 /* AppController.h */, + 503AE0FB17EB989F00D1A890 /* AppController.mm */, + 503AE0FC17EB989F00D1A890 /* main.m */, + 503AE0FD17EB989F00D1A890 /* Prefix.pch */, + 503AE0FE17EB989F00D1A890 /* RootViewController.h */, + 503AE0FF17EB989F00D1A890 /* RootViewController.mm */, + ); + name = ios; + path = Classes; + sourceTree = ""; + }; + 15AA9C4015B7EC450033D6C2 /* Classes */ = { + isa = PBXGroup; + children = ( + BB0C4877190910CE0015152C /* 3d */, + BB0C4882190910CE0015152C /* AirCraft.cpp */, + BB0C4883190910CE0015152C /* AirCraft.h */, + AC69E74D192B3C31006CDFC8 /* Reward.cpp */, + AC69E74E192B3C31006CDFC8 /* Reward.h */, + BB0C4884190910CE0015152C /* Bullets.cpp */, + BB0C4885190910CE0015152C /* Bullets.h */, + BB0C4886190910CE0015152C /* consts.h */, + BB0C4887190910CE0015152C /* Effects.cpp */, + BB0C4888190910CE0015152C /* Effects.h */, + BB0C4889190910CE0015152C /* Enemies.cpp */, + BB0C488A190910CE0015152C /* Enemies.h */, + BB0C488B190910CE0015152C /* Explosion.cpp */, + BB0C488C190910CE0015152C /* Explosion.h */, + BB0C488D190910CE0015152C /* GameControllers.cpp */, + BB0C488E190910CE0015152C /* GameControllers.h */, + BB0C488F190910CE0015152C /* GameEntity.cpp */, + BB0C4890190910CE0015152C /* GameEntity.h */, + BB0C4891190910CE0015152C /* GameLayer.cpp */, + BB0C4892190910CE0015152C /* GameLayer.h */, + BB0C4893190910CE0015152C /* GameOverLayer.cpp */, + BB0C4894190910CE0015152C /* GameOverLayer.h */, + BB0C4895190910CE0015152C /* LicenseLayer.cpp */, + BB0C4896190910CE0015152C /* LicenseLayer.h */, + BB0C4897190910CE0015152C /* LoadingScene.cpp */, + BB0C4898190910CE0015152C /* LoadingScene.h */, + BB0C4899190910CE0015152C /* MainMenuScene.cpp */, + BB0C489A190910CE0015152C /* MainMenuScene.h */, + BB0C489B190910CE0015152C /* ParticleManager.cpp */, + BB0C489C190910CE0015152C /* ParticleManager.h */, + BB0C489D190910CE0015152C /* Plane.cpp */, + BB0C489E190910CE0015152C /* Plane.h */, + BB0C489F190910CE0015152C /* Player.cpp */, + BB0C48A0190910CE0015152C /* Player.h */, + AC6AD7F419764B1E00E5477C /* FriendPlayer.cpp */, + AC6AD7F519764B1E00E5477C /* FriendPlayer.h */, + BB0C48A1190910CE0015152C /* PublicApi.cpp */, + BB0C48A2190910CE0015152C /* PublicApi.h */, + 1AFAF8B316D35DE700DB1158 /* AppDelegate.cpp */, + 1AFAF8B416D35DE700DB1158 /* AppDelegate.h */, + 1AFAF8B516D35DE700DB1158 /* HelloWorldScene.cpp */, + 1AFAF8B616D35DE700DB1158 /* HelloWorldScene.h */, + AC14CEBF1935B9AA0064D545 /* FriendControlScene.cpp */, + AC14CEC01935B9AA0064D545 /* FriendControlScene.h */, + AC40FF5319888B9500611C0F /* ConnectionInterface.cpp */, + AC40FF5419888B9500611C0F /* ConnectionInterface.h */, + ); + name = Classes; + path = ../classes; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* Moon3D iOS.app */, + 5087E76F17EB910900C73F5D /* Moon3D Mac.app */, + ); + name = Products; + sourceTree = ""; + }; + 1AC6FAE6180E9839004C840B /* Products */ = { + isa = PBXGroup; + children = ( + 1AC6FAF9180E9839004C840B /* libcocos2dx Mac.a */, + 1AC6FAFB180E9839004C840B /* libcocos2dx-extensions Mac.a */, + 1AC6FAFD180E9839004C840B /* libchipmunk Mac.a */, + 1AC6FAFF180E9839004C840B /* libbox2d Mac.a */, + 1AC6FB01180E9839004C840B /* libCocosDenshion Mac.a */, + 1AC6FB07180E9839004C840B /* libcocos2dx iOS.a */, + 1AC6FB09180E9839004C840B /* libcocos2dx-extensions iOS.a */, + 1AC6FB0B180E9839004C840B /* libchipmunk iOS.a */, + 1AC6FB0D180E9839004C840B /* libbox2d iOS.a */, + 1AC6FB0F180E9839004C840B /* libCocosDenshion iOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */, + 15AA9C4015B7EC450033D6C2 /* Classes */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 080E96DDFE201D6D7F000001 /* ios */, + 503AE10617EB990700D1A890 /* mac */, + 19C28FACFE9D520D11CA2CBB /* Products */, + 78C7DDAA14EBA5050085D0C2 /* Resources */, + ); + name = CustomTemplate; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + D6B0611A1803AB670077942B /* CoreMotion.framework */, + 503AE11A17EB9C5A00D1A890 /* IOKit.framework */, + 503AE11117EB99EE00D1A890 /* libcurl.dylib */, + 5087E78A17EB975400C73F5D /* OpenGL.framework */, + 5087E78817EB974C00C73F5D /* AppKit.framework */, + 1ACB3243164770DE00914215 /* libcurl.a */, + BF170DB412928DE900B8313A /* libz.dylib */, + D44C620F132DFF4E0009C878 /* AudioToolbox.framework */, + D44C620D132DFF430009C878 /* AVFoundation.framework */, + 288765A40DF7441C002DB57D /* CoreGraphics.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + D44C620B132DFF330009C878 /* OpenAL.framework */, + BF170DB012928DE900B8313A /* OpenGLES.framework */, + BF1C47EA1293683800B63C5D /* QuartzCore.framework */, + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 503AE0F517EB97AB00D1A890 /* Icons */ = { + isa = PBXGroup; + children = ( + 503AE0F617EB97AB00D1A890 /* Icon.icns */, + 503AE0F717EB97AB00D1A890 /* Info.plist */, + ); + name = Icons; + path = mac; + sourceTree = SOURCE_ROOT; + }; + 503AE10617EB990700D1A890 /* mac */ = { + isa = PBXGroup; + children = ( + 503AE0F517EB97AB00D1A890 /* Icons */, + 503AE10317EB98FF00D1A890 /* main.cpp */, + 503AE10417EB98FF00D1A890 /* Prefix.pch */, + ); + name = mac; + sourceTree = ""; + }; + 5087E77117EB970100C73F5D /* Icons */ = { + isa = PBXGroup; + children = ( + 5087E77217EB970100C73F5D /* Default-568h@2x.png */, + 5087E77317EB970100C73F5D /* Default.png */, + 5087E77417EB970100C73F5D /* Default@2x.png */, + 50EF62A017ECD613001EB2F8 /* Icon-29.png */, + 50EF62A117ECD613001EB2F8 /* Icon-50.png */, + 50EF629217ECD46A001EB2F8 /* Icon-40.png */, + 50EF629317ECD46A001EB2F8 /* Icon-58.png */, + 50EF629417ECD46A001EB2F8 /* Icon-80.png */, + 50EF629517ECD46A001EB2F8 /* Icon-100.png */, + 5087E77517EB970100C73F5D /* Icon-114.png */, + 5087E77617EB970100C73F5D /* Icon-120.png */, + 5087E77717EB970100C73F5D /* Icon-144.png */, + 5087E77817EB970100C73F5D /* Icon-152.png */, + 5087E77917EB970100C73F5D /* Icon-57.png */, + 5087E77A17EB970100C73F5D /* Icon-72.png */, + 5087E77B17EB970100C73F5D /* Icon-76.png */, + 5087E77C17EB970100C73F5D /* Info.plist */, + ); + name = Icons; + path = ios; + sourceTree = SOURCE_ROOT; + }; + 78C7DDAA14EBA5050085D0C2 /* Resources */ = { + isa = PBXGroup; + children = ( + AC3D0DE919767B9900513649 /* potion2.png */, + AC14CECE1935BE5F0064D545 /* CloseNormal.png */, + AC14CECF1935BE5F0064D545 /* CloseSelected.png */, + AC14CEC21935BE390064D545 /* b1.png */, + AC14CEC31935BE390064D545 /* b2.png */, + AC14CEC41935BE390064D545 /* f1.png */, + AC14CEC51935BE390064D545 /* f2.png */, + AC14CEC61935BE390064D545 /* r1.png */, + AC14CEC71935BE390064D545 /* r2.png */, + AC69E754192B44CE006CDFC8 /* potion.jpg */, + BB0C48CB190910E60015152C /* boom.mp3 */, + BB0C48CC190910E60015152C /* boom2.mp3 */, + BB0C48CD190910E60015152C /* boss.obj */, + BB0C48CE190910E60015152C /* boss.png */, + BB0C48CF190910E60015152C /* bossCannon.obj */, + BB0C48D0190910E60015152C /* bullets.png */, + BB0C48D1190910E60015152C /* coco.png */, + BB0C48D2190910E60015152C /* coconut.obj */, + BB0C48D3190910E60015152C /* credits_03.png */, + BB0C48D4190910E60015152C /* daodan_32.png */, + BB0C48D5190910E60015152C /* daodanv001.obj */, + BB0C48D6190910E60015152C /* debris.plist */, + BB0C48D7190910E60015152C /* diji1_v001.obj */, + BB0C48D8190910E60015152C /* diji1_v002.obj */, + BB0C48D9190910E60015152C /* diji02_v002_128.png */, + BB0C48DA190910E60015152C /* dijiyuanv001.obj */, + BB0C48DB190910E60015152C /* dijiyuanv001.png */, + BB0C48DC190910E60015152C /* emission.plist */, + BB0C48DD190910E60015152C /* emissionPart.plist */, + BB0C48DE190910E60015152C /* engine.plist */, + BB0C48DF190910E60015152C /* explodeEffect.mp3 */, + BB0C48E0190910E60015152C /* flare.plist */, + BB0C48E1190910E60015152C /* Flux2.mp3 */, + BB0C48E2190910E60015152C /* fonts */, + BB0C48E4190910E60015152C /* gameover_score_num_0.png */, + BB0C48E5190910E60015152C /* gameover_score_num.fnt */, + BB0C48E6190910E60015152C /* gameover.plist */, + BB0C48E7190910E60015152C /* gameover.png */, + BB0C48E8190910E60015152C /* glow.plist */, + BB0C48E9190910E60015152C /* groundLevel.jpg */, + BB0C48EA190910E60015152C /* hit.mp3 */, + BB0C48EB190910E60015152C /* LICENSE_03.png */, + BB0C48EC190910E60015152C /* loadingAndHP.plist */, + BB0C48ED190910E60015152C /* loadingAndHP.png */, + BB0C48EE190910E60015152C /* menu_scene.plist */, + BB0C48EF190910E60015152C /* menu_scene.png */, + BB0C48F0190910E60015152C /* menuEmission.plist */, + BB0C48F1190910E60015152C /* missileFlare.plist */, + BB0C48F2190910E60015152C /* muzzle.png */, + BB0C48F3190910E60015152C /* num_0.png */, + BB0C48F4190910E60015152C /* num.fnt */, + BB0C48F5190910E60015152C /* Orbital Colossus_0.mp3 */, + BB0C48F6190910E60015152C /* Particle.plist */, + BB0C48F7190910E60015152C /* Particle.png */, + BB0C48F8190910E60015152C /* player_bullet_explosion.png */, + BB0C48F9190910E60015152C /* playerv002_256.png */, + BB0C48FA190910E60015152C /* playerv002.obj */, + BB0C48FB190910E60015152C /* score_right_top.png */, + BB0C48FD190910E60015152C /* Star_Chaser.mp3 */, + BB0C48FE190910E60015152C /* streak.png */, + BB0C48FF190910E60015152C /* toonSmoke.plist */, + BB0C4900190910E70015152C /* vanishingPoint.plist */, + ); + name = Resources; + path = ../Resources; + sourceTree = ""; + }; + BB0C4877190910CE0015152C /* 3d */ = { + isa = PBXGroup; + children = ( + BB0C4878190910CE0015152C /* Colored.es2.frag.h */, + BB0C4879190910CE0015152C /* Mesh.cpp */, + BB0C487A190910CE0015152C /* Mesh.h */, + BB0C487B190910CE0015152C /* MeshCache.cpp */, + BB0C487C190910CE0015152C /* MeshCache.h */, + BB0C487D190910CE0015152C /* Sprite3D.cpp */, + BB0C487E190910CE0015152C /* Sprite3D.h */, + BB0C487F190910CE0015152C /* Textured.es2.frag.h */, + BB0C4880190910CE0015152C /* Textured.es2.vert.h */, + BB0C4881190910CE0015152C /* Vector.h */, + ); + name = 3d; + path = ../Classes/3d; + sourceTree = ""; + }; + BB0C48E2190910E60015152C /* fonts */ = { + isa = PBXGroup; + children = ( + BB0C48E3190910E60015152C /* Marker Felt.ttf */, + ); + path = fonts; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* Moon3D iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Moon3D iOS" */; + buildPhases = ( + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 1AC6FB25180E99E1004C840B /* PBXTargetDependency */, + 1AC6FB27180E99E1004C840B /* PBXTargetDependency */, + 1AC6FB29180E99E1004C840B /* PBXTargetDependency */, + 1AC6FB2B180E99E1004C840B /* PBXTargetDependency */, + 1AC6FB2D180E99E1004C840B /* PBXTargetDependency */, + ); + name = "Moon3D iOS"; + productName = iphone; + productReference = 1D6058910D05DD3D006BFB54 /* Moon3D iOS.app */; + productType = "com.apple.product-type.application"; + }; + 5087E73D17EB910900C73F5D /* Moon3D Mac */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5087E76C17EB910900C73F5D /* Build configuration list for PBXNativeTarget "Moon3D Mac" */; + buildPhases = ( + 5087E74817EB910900C73F5D /* Resources */, + 5087E75617EB910900C73F5D /* Sources */, + 5087E75C17EB910900C73F5D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 1AC6FB1E180E9963004C840B /* PBXTargetDependency */, + 1AC6FB16180E9959004C840B /* PBXTargetDependency */, + 1AC6FB18180E9959004C840B /* PBXTargetDependency */, + 1AC6FB1A180E9959004C840B /* PBXTargetDependency */, + 1AC6FB1C180E9959004C840B /* PBXTargetDependency */, + ); + name = "Moon3D Mac"; + productName = iphone; + productReference = 5087E76F17EB910900C73F5D /* Moon3D Mac.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0500; + TargetAttributes = { + 1D6058900D05DD3D006BFB54 = { + DevelopmentTeam = MDDB52YB8L; + }; + }; + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Moon3d" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 1AC6FAE6180E9839004C840B /* Products */; + ProjectRef = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* Moon3D iOS */, + 5087E73D17EB910900C73F5D /* Moon3D Mac */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 1AC6FAF9180E9839004C840B /* libcocos2dx Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx Mac.a"; + remoteRef = 1AC6FAF8180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FAFB180E9839004C840B /* libcocos2dx-extensions Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx-extensions Mac.a"; + remoteRef = 1AC6FAFA180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FAFD180E9839004C840B /* libchipmunk Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libchipmunk Mac.a"; + remoteRef = 1AC6FAFC180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FAFF180E9839004C840B /* libbox2d Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libbox2d Mac.a"; + remoteRef = 1AC6FAFE180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB01180E9839004C840B /* libCocosDenshion Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libCocosDenshion Mac.a"; + remoteRef = 1AC6FB00180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB07180E9839004C840B /* libcocos2dx iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx iOS.a"; + remoteRef = 1AC6FB06180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB09180E9839004C840B /* libcocos2dx-extensions iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx-extensions iOS.a"; + remoteRef = 1AC6FB08180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB0B180E9839004C840B /* libchipmunk iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libchipmunk iOS.a"; + remoteRef = 1AC6FB0A180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB0D180E9839004C840B /* libbox2d iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libbox2d iOS.a"; + remoteRef = 1AC6FB0C180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB0F180E9839004C840B /* libCocosDenshion iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libCocosDenshion iOS.a"; + remoteRef = 1AC6FB0E180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5087E78117EB970100C73F5D /* Icon-120.png in Resources */, + BB0C493B190910E70015152C /* groundLevel.jpg in Resources */, + BB0C4965190910E70015152C /* streak.png in Resources */, + 5087E78617EB970100C73F5D /* Icon-76.png in Resources */, + BB0C4939190910E70015152C /* glow.plist in Resources */, + BB0C4943190910E70015152C /* loadingAndHP.png in Resources */, + BB0C4911190910E70015152C /* credits_03.png in Resources */, + BB0C4903190910E70015152C /* boom2.mp3 in Resources */, + BB0C4929190910E70015152C /* explodeEffect.mp3 in Resources */, + BB0C4921190910E70015152C /* dijiyuanv001.png in Resources */, + 5087E77F17EB970100C73F5D /* Default@2x.png in Resources */, + BB0C4945190910E70015152C /* menu_scene.plist in Resources */, + BB0C492D190910E70015152C /* Flux2.mp3 in Resources */, + 50EF629917ECD46A001EB2F8 /* Icon-100.png in Resources */, + BB0C4931190910E70015152C /* gameover_score_num_0.png in Resources */, + BB0C494B190910E70015152C /* missileFlare.plist in Resources */, + BB0C4959190910E70015152C /* player_bullet_explosion.png in Resources */, + BB0C4933190910E70015152C /* gameover_score_num.fnt in Resources */, + BB0C495F190910E70015152C /* score_right_top.png in Resources */, + 5087E78317EB970100C73F5D /* Icon-152.png in Resources */, + AC14CECB1935BE390064D545 /* f2.png in Resources */, + AC14CEC81935BE390064D545 /* b1.png in Resources */, + BB0C4941190910E70015152C /* loadingAndHP.plist in Resources */, + BB0C4907190910E70015152C /* boss.png in Resources */, + BB0C4957190910E70015152C /* Particle.png in Resources */, + BB0C490B190910E70015152C /* bullets.png in Resources */, + 5087E77D17EB970100C73F5D /* Default-568h@2x.png in Resources */, + AC14CECA1935BE390064D545 /* f1.png in Resources */, + BB0C4951190910E70015152C /* num.fnt in Resources */, + BB0C495B190910E70015152C /* playerv002_256.png in Resources */, + 5087E78517EB970100C73F5D /* Icon-72.png in Resources */, + AC14CED01935BE5F0064D545 /* CloseNormal.png in Resources */, + BB0C4953190910E70015152C /* Orbital Colossus_0.mp3 in Resources */, + BB0C492B190910E70015152C /* flare.plist in Resources */, + BB0C4905190910E70015152C /* boss.obj in Resources */, + BB0C4923190910E70015152C /* emission.plist in Resources */, + 50EF62A317ECD613001EB2F8 /* Icon-50.png in Resources */, + BB0C493F190910E70015152C /* LICENSE_03.png in Resources */, + BB0C494F190910E70015152C /* num_0.png in Resources */, + 5087E78017EB970100C73F5D /* Icon-114.png in Resources */, + BB0C4967190910E70015152C /* toonSmoke.plist in Resources */, + BB0C4937190910E70015152C /* gameover.png in Resources */, + AC14CECD1935BE390064D545 /* r2.png in Resources */, + 50EF62A217ECD613001EB2F8 /* Icon-29.png in Resources */, + BB0C4909190910E70015152C /* bossCannon.obj in Resources */, + BB0C490F190910E70015152C /* coconut.obj in Resources */, + BB0C4947190910E70015152C /* menu_scene.png in Resources */, + BB0C490D190910E70015152C /* coco.png in Resources */, + 50EF629617ECD46A001EB2F8 /* Icon-40.png in Resources */, + AC14CECC1935BE390064D545 /* r1.png in Resources */, + BB0C493D190910E70015152C /* hit.mp3 in Resources */, + BB0C492F190910E70015152C /* Marker Felt.ttf in Resources */, + BB0C4919190910E70015152C /* diji1_v001.obj in Resources */, + BB0C4935190910E70015152C /* gameover.plist in Resources */, + BB0C4913190910E70015152C /* daodan_32.png in Resources */, + BB0C491D190910E70015152C /* diji02_v002_128.png in Resources */, + BB0C4925190910E70015152C /* emissionPart.plist in Resources */, + AC3D0DEA19767B9900513649 /* potion2.png in Resources */, + AC69E755192B44CE006CDFC8 /* potion.jpg in Resources */, + BB0C4915190910E70015152C /* daodanv001.obj in Resources */, + BB0C494D190910E70015152C /* muzzle.png in Resources */, + 5087E78217EB970100C73F5D /* Icon-144.png in Resources */, + BB0C491B190910E70015152C /* diji1_v002.obj in Resources */, + BB0C4927190910E70015152C /* engine.plist in Resources */, + AC14CEC91935BE390064D545 /* b2.png in Resources */, + 50EF629817ECD46A001EB2F8 /* Icon-80.png in Resources */, + AC14CED11935BE5F0064D545 /* CloseSelected.png in Resources */, + BB0C4901190910E70015152C /* boom.mp3 in Resources */, + BB0C4949190910E70015152C /* menuEmission.plist in Resources */, + BB0C495D190910E70015152C /* playerv002.obj in Resources */, + 5087E78417EB970100C73F5D /* Icon-57.png in Resources */, + BB0C4969190910E70015152C /* vanishingPoint.plist in Resources */, + 5087E77E17EB970100C73F5D /* Default.png in Resources */, + BB0C491F190910E70015152C /* dijiyuanv001.obj in Resources */, + 50EF629717ECD46A001EB2F8 /* Icon-58.png in Resources */, + BB0C4917190910E70015152C /* debris.plist in Resources */, + BB0C4963190910E70015152C /* Star_Chaser.mp3 in Resources */, + BB0C4955190910E70015152C /* Particle.plist in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5087E74817EB910900C73F5D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BB0C490C190910E70015152C /* bullets.png in Resources */, + BB0C4938190910E70015152C /* gameover.png in Resources */, + BB0C4924190910E70015152C /* emission.plist in Resources */, + BB0C495C190910E70015152C /* playerv002_256.png in Resources */, + BB0C4906190910E70015152C /* boss.obj in Resources */, + BB0C4940190910E70015152C /* LICENSE_03.png in Resources */, + BB0C492A190910E70015152C /* explodeEffect.mp3 in Resources */, + BB0C4920190910E70015152C /* dijiyuanv001.obj in Resources */, + BB0C490A190910E70015152C /* bossCannon.obj in Resources */, + BB0C4908190910E70015152C /* boss.png in Resources */, + BB0C492C190910E70015152C /* flare.plist in Resources */, + 503AE0F817EB97AB00D1A890 /* Icon.icns in Resources */, + BB0C493E190910E70015152C /* hit.mp3 in Resources */, + BB0C494A190910E70015152C /* menuEmission.plist in Resources */, + BB0C4930190910E70015152C /* Marker Felt.ttf in Resources */, + BB0C4934190910E70015152C /* gameover_score_num.fnt in Resources */, + BB0C4916190910E70015152C /* daodanv001.obj in Resources */, + BB0C4922190910E70015152C /* dijiyuanv001.png in Resources */, + BB0C4950190910E70015152C /* num_0.png in Resources */, + BB0C4902190910E70015152C /* boom.mp3 in Resources */, + BB0C4958190910E70015152C /* Particle.png in Resources */, + AC3D0DEB19767B9900513649 /* potion2.png in Resources */, + BB0C4928190910E70015152C /* engine.plist in Resources */, + BB0C4964190910E70015152C /* Star_Chaser.mp3 in Resources */, + BB0C496A190910E70015152C /* vanishingPoint.plist in Resources */, + BB0C4910190910E70015152C /* coconut.obj in Resources */, + BB0C493A190910E70015152C /* glow.plist in Resources */, + BB0C491C190910E70015152C /* diji1_v002.obj in Resources */, + BB0C4932190910E70015152C /* gameover_score_num_0.png in Resources */, + BB0C4936190910E70015152C /* gameover.plist in Resources */, + BB0C491E190910E70015152C /* diji02_v002_128.png in Resources */, + BB0C4960190910E70015152C /* score_right_top.png in Resources */, + BB0C492E190910E70015152C /* Flux2.mp3 in Resources */, + BB0C495A190910E70015152C /* player_bullet_explosion.png in Resources */, + BB0C4948190910E70015152C /* menu_scene.png in Resources */, + BB0C4968190910E70015152C /* toonSmoke.plist in Resources */, + BB0C4942190910E70015152C /* loadingAndHP.plist in Resources */, + BB0C494E190910E70015152C /* muzzle.png in Resources */, + BB0C4914190910E70015152C /* daodan_32.png in Resources */, + BB0C4926190910E70015152C /* emissionPart.plist in Resources */, + BB0C4956190910E70015152C /* Particle.plist in Resources */, + BB0C4946190910E70015152C /* menu_scene.plist in Resources */, + BB0C4912190910E70015152C /* credits_03.png in Resources */, + BB0C491A190910E70015152C /* diji1_v001.obj in Resources */, + BB0C4918190910E70015152C /* debris.plist in Resources */, + BB0C4966190910E70015152C /* streak.png in Resources */, + BB0C4904190910E70015152C /* boom2.mp3 in Resources */, + BB0C494C190910E70015152C /* missileFlare.plist in Resources */, + BB0C493C190910E70015152C /* groundLevel.jpg in Resources */, + BB0C4952190910E70015152C /* num.fnt in Resources */, + BB0C495E190910E70015152C /* playerv002.obj in Resources */, + BB0C4954190910E70015152C /* Orbital Colossus_0.mp3 in Resources */, + BB0C490E190910E70015152C /* coco.png in Resources */, + BB0C4944190910E70015152C /* loadingAndHP.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BB0C48B1190910CE0015152C /* Explosion.cpp in Sources */, + BB0C48A3190910CE0015152C /* Mesh.cpp in Sources */, + BB0C48BD190910CE0015152C /* LoadingScene.cpp in Sources */, + BB0C48B5190910CE0015152C /* GameEntity.cpp in Sources */, + BB0C48C3190910CE0015152C /* Plane.cpp in Sources */, + AC6AD7F619764B1E00E5477C /* FriendPlayer.cpp in Sources */, + BB0C48A9190910CE0015152C /* AirCraft.cpp in Sources */, + BB0C48AF190910CE0015152C /* Enemies.cpp in Sources */, + BB0C48C5190910CE0015152C /* Player.cpp in Sources */, + BB0C48B7190910CE0015152C /* GameLayer.cpp in Sources */, + 503AE10017EB989F00D1A890 /* AppController.mm in Sources */, + BB0C48BB190910CE0015152C /* LicenseLayer.cpp in Sources */, + 503AE10217EB989F00D1A890 /* RootViewController.mm in Sources */, + BB0C48AD190910CE0015152C /* Effects.cpp in Sources */, + BB0C48A7190910CE0015152C /* Sprite3D.cpp in Sources */, + BB0C48A5190910CE0015152C /* MeshCache.cpp in Sources */, + BB0C48C1190910CE0015152C /* ParticleManager.cpp in Sources */, + AC40FF5519888B9500611C0F /* ConnectionInterface.cpp in Sources */, + 1AFAF8B716D35DE700DB1158 /* AppDelegate.cpp in Sources */, + BB0C48AB190910CE0015152C /* Bullets.cpp in Sources */, + 503AE10117EB989F00D1A890 /* main.m in Sources */, + 1AFAF8B816D35DE700DB1158 /* HelloWorldScene.cpp in Sources */, + BB0C48B9190910CE0015152C /* GameOverLayer.cpp in Sources */, + AC69E74F192B3C31006CDFC8 /* Reward.cpp in Sources */, + BB0C48BF190910CE0015152C /* MainMenuScene.cpp in Sources */, + BB0C48B3190910CE0015152C /* GameControllers.cpp in Sources */, + AC14CEC11935B9AA0064D545 /* FriendControlScene.cpp in Sources */, + BB0C48C7190910CE0015152C /* PublicApi.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5087E75617EB910900C73F5D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5087E75717EB910900C73F5D /* AppDelegate.cpp in Sources */, + BB0C48C2190910CE0015152C /* ParticleManager.cpp in Sources */, + BB0C48C4190910CE0015152C /* Plane.cpp in Sources */, + BB0C48BC190910CE0015152C /* LicenseLayer.cpp in Sources */, + 5087E75817EB910900C73F5D /* HelloWorldScene.cpp in Sources */, + BB0C48B0190910CE0015152C /* Enemies.cpp in Sources */, + BB0C48A6190910CE0015152C /* MeshCache.cpp in Sources */, + BB0C48AA190910CE0015152C /* AirCraft.cpp in Sources */, + AC6AD7F719764B1E00E5477C /* FriendPlayer.cpp in Sources */, + AC40FF5619888B9500611C0F /* ConnectionInterface.cpp in Sources */, + BB0C48C6190910CE0015152C /* Player.cpp in Sources */, + BB0C48B8190910CE0015152C /* GameLayer.cpp in Sources */, + BB0C48B4190910CE0015152C /* GameControllers.cpp in Sources */, + BB0C48C8190910CE0015152C /* PublicApi.cpp in Sources */, + BB0C48A4190910CE0015152C /* Mesh.cpp in Sources */, + 503AE10517EB98FF00D1A890 /* main.cpp in Sources */, + BB0C48C0190910CE0015152C /* MainMenuScene.cpp in Sources */, + BB0C48BA190910CE0015152C /* GameOverLayer.cpp in Sources */, + BB0C48A8190910CE0015152C /* Sprite3D.cpp in Sources */, + BB0C48AE190910CE0015152C /* Effects.cpp in Sources */, + BB0C48BE190910CE0015152C /* LoadingScene.cpp in Sources */, + BB0C48AC190910CE0015152C /* Bullets.cpp in Sources */, + BB0C48B2190910CE0015152C /* Explosion.cpp in Sources */, + BB0C48B6190910CE0015152C /* GameEntity.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 1AC6FB16180E9959004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx Mac"; + targetProxy = 1AC6FB15180E9959004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB18180E9959004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx-extensions Mac"; + targetProxy = 1AC6FB17180E9959004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB1A180E9959004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "chipmunk Mac"; + targetProxy = 1AC6FB19180E9959004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB1C180E9959004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "CocosDenshion Mac"; + targetProxy = 1AC6FB1B180E9959004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB1E180E9963004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "box2d Mac"; + targetProxy = 1AC6FB1D180E9963004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB25180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx iOS"; + targetProxy = 1AC6FB24180E99E1004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB27180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx-extensions iOS"; + targetProxy = 1AC6FB26180E99E1004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB29180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "chipmunk iOS"; + targetProxy = 1AC6FB28180E99E1004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB2B180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "box2d iOS"; + targetProxy = 1AC6FB2A180E99E1004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB2D180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "CocosDenshion iOS"; + targetProxy = 1AC6FB2C180E99E1004C840B /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COMPRESS_PNG_FILES = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ios/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + USE_FILE32API, + CC_TARGET_OS_IPHONE, + "COCOS2D_DEBUG=1", + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios/Simulation", + ); + INFOPLIST_FILE = ios/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + LIBRARY_SEARCH_PATHS = ""; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COMPRESS_PNG_FILES = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ios/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + USE_FILE32API, + CC_TARGET_OS_IPHONE, + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios/Simulation", + ); + INFOPLIST_FILE = ios/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + LIBRARY_SEARCH_PATHS = ""; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Release; + }; + 5087E76D17EB910900C73F5D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = mac/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + USE_FILE32API, + CC_TARGET_OS_MAC, + "COCOS2D_DEBUG=1", + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/mac", + "$(SRCROOT)/../cocos2d/external/glfw3/include/mac", + ); + INFOPLIST_FILE = mac/Info.plist; + LIBRARY_SEARCH_PATHS = ""; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Debug; + }; + 5087E76E17EB910900C73F5D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = mac/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + USE_FILE32API, + CC_TARGET_OS_MAC, + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/mac", + "$(SRCROOT)/../cocos2d/external/glfw3/include/mac", + ); + INFOPLIST_FILE = mac/Info.plist; + LIBRARY_SEARCH_PATHS = ""; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + COPY_PHASE_STRIP = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../cocos2d", + "$(SRCROOT)/../cocos2d/cocos", + "$(SRCROOT)/../cocos2d/cocos/base", + "$(SRCROOT)/../cocos2d/cocos/physics", + "$(SRCROOT)/../cocos2d/cocos/math/kazmath", + "$(SRCROOT)/../cocos2d/cocos/2d", + "$(SRCROOT)/../cocos2d/cocos/ui", + "$(SRCROOT)/../cocos2d/cocos/network", + "$(SRCROOT)/../cocos2d/cocos/audio/include", + "$(SRCROOT)/../cocos2d/cocos/editor-support", + "$(SRCROOT)/../cocos2d/extensions", + "$(SRCROOT)/../cocos2d/external", + "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", + ); + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../cocos2d", + "$(SRCROOT)/../cocos2d/cocos", + "$(SRCROOT)/../cocos2d/cocos/base", + "$(SRCROOT)/../cocos2d/cocos/physics", + "$(SRCROOT)/../cocos2d/cocos/math/kazmath", + "$(SRCROOT)/../cocos2d/cocos/2d", + "$(SRCROOT)/../cocos2d/cocos/ui", + "$(SRCROOT)/../cocos2d/cocos/network", + "$(SRCROOT)/../cocos2d/cocos/audio/include", + "$(SRCROOT)/../cocos2d/cocos/editor-support", + "$(SRCROOT)/../cocos2d/extensions", + "$(SRCROOT)/../cocos2d/external", + "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", + ); + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Moon3D iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 5087E76C17EB910900C73F5D /* Build configuration list for PBXNativeTarget "Moon3D Mac" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5087E76D17EB910900C73F5D /* Debug */, + 5087E76E17EB910900C73F5D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Moon3d" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/AppController.h b/samples/EarthWarrior3D/proj.ios_mac/ios/AppController.h new file mode 100755 index 0000000..978e6e3 --- /dev/null +++ b/samples/EarthWarrior3D/proj.ios_mac/ios/AppController.h @@ -0,0 +1,12 @@ +#import + +@class RootViewController; + +@interface AppController : NSObject { + UIWindow *window; +} + +@property(nonatomic, readonly) RootViewController* viewController; + +@end + diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/AppController.mm b/samples/EarthWarrior3D/proj.ios_mac/ios/AppController.mm new file mode 100755 index 0000000..e1e807c --- /dev/null +++ b/samples/EarthWarrior3D/proj.ios_mac/ios/AppController.mm @@ -0,0 +1,142 @@ +/**************************************************************************** + 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. + ****************************************************************************/ + +#import "AppController.h" +#import "CCEAGLView.h" +#import "cocos2d.h" +#import "AppDelegate.h" +#import "RootViewController.h" + +@implementation AppController + +#pragma mark - +#pragma mark Application lifecycle + +// cocos2d application instance +static AppDelegate s_sharedApplication; + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + + // Override point for customization after application launch. + + // Add the view controller's view to the window and display. + window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; + + // Init the CCEAGLView + CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [window bounds] + pixelFormat: kEAGLColorFormatRGB565 + depthFormat: GL_DEPTH24_STENCIL8_OES + preserveBackbuffer: NO + sharegroup: nil + multiSampling: NO + numberOfSamples: 0]; + + // Use RootViewController manage CCEAGLView + _viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; + _viewController.wantsFullScreenLayout = YES; + _viewController.view = eaglView; + + // Set RootViewController to window + if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0) + { + // warning: addSubView doesn't work on iOS6 + [window addSubview: _viewController.view]; + } + else + { + // use this method on ios6 + [window setRootViewController:_viewController]; + } + + [window makeKeyAndVisible]; + + [[UIApplication sharedApplication] setStatusBarHidden:true]; + + // IMPORTANT: Setting the GLView should be done after creating the RootViewController + cocos2d::GLView *glview = cocos2d::GLView::createWithEAGLView(eaglView); + cocos2d::Director::getInstance()->setOpenGLView(glview); + + cocos2d::Application::getInstance()->run(); + + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + /* + Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + */ + //We don't need to call this method any more. It will interupt user defined game pause&resume logic + /* cocos2d::Director::getInstance()->pause(); */ +} + +- (void)applicationDidBecomeActive:(UIApplication *)application { + /* + Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + */ + //We don't need to call this method any more. It will interupt user defined game pause&resume logic + /* cocos2d::Director::getInstance()->resume(); */ +} + +- (void)applicationDidEnterBackground:(UIApplication *)application { + /* + Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + If your application supports background execution, called instead of applicationWillTerminate: when the user quits. + */ + cocos2d::Application::getInstance()->applicationDidEnterBackground(); +} + +- (void)applicationWillEnterForeground:(UIApplication *)application { + /* + Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. + */ + cocos2d::Application::getInstance()->applicationWillEnterForeground(); +} + +- (void)applicationWillTerminate:(UIApplication *)application { + /* + Called when the application is about to terminate. + See also applicationDidEnterBackground:. + */ +} + + +#pragma mark - +#pragma mark Memory management + +- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { + /* + Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. + */ +} + + +- (void)dealloc { + [window release]; + [super dealloc]; +} + + +@end diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Default-568h@2x.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Default-568h@2x.png new file mode 100755 index 0000000..66c6d1c Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Default-568h@2x.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Default.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Default.png new file mode 100755 index 0000000..dcb8072 Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Default.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Default@2x.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Default@2x.png new file mode 100755 index 0000000..8468988 Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Default@2x.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-100.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-100.png new file mode 100755 index 0000000..ef38d45 Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-100.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-114.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-114.png new file mode 100755 index 0000000..c380786 Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-114.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-120.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-120.png new file mode 100755 index 0000000..a5b49cc Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-120.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-144.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-144.png new file mode 100755 index 0000000..1526615 Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-144.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-152.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-152.png new file mode 100755 index 0000000..8aa8250 Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-152.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-29.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-29.png new file mode 100755 index 0000000..0500184 Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-29.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-40.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-40.png new file mode 100755 index 0000000..775685d Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-40.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-50.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-50.png new file mode 100755 index 0000000..ac381bc Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-50.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-57.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-57.png new file mode 100755 index 0000000..4fcc6fd Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-57.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-58.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-58.png new file mode 100755 index 0000000..f0f8b7f Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-58.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-72.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-72.png new file mode 100755 index 0000000..2c573c8 Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-72.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-76.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-76.png new file mode 100755 index 0000000..8a1fa18 Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-76.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-80.png b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-80.png new file mode 100755 index 0000000..d9c7ab4 Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/ios/Icon-80.png differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Info.plist b/samples/EarthWarrior3D/proj.ios_mac/ios/Info.plist new file mode 100755 index 0000000..aff7e3c --- /dev/null +++ b/samples/EarthWarrior3D/proj.ios_mac/ios/Info.plist @@ -0,0 +1,70 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + Icon-57.png + CFBundleIconFiles + + Icon-29 + Icon-80 + Icon-58 + Icon-120 + Icon.png + Icon@2x.png + Icon-57.png + Icon-114.png + Icon-72.png + Icon-144.png + + CFBundleIconFiles~ipad + + Icon-29 + Icon-50 + Icon-58 + Icon-80 + Icon-40 + Icon-100 + Icon-152 + Icon-76 + Icon-120 + Icon.png + Icon@2x.png + Icon-57.png + Icon-114.png + Icon-72.png + Icon-144.png + + CFBundleIdentifier + org.cocos2d-x.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIAppFonts + + UIPrerenderedIcon + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + + diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/Prefix.pch b/samples/EarthWarrior3D/proj.ios_mac/ios/Prefix.pch new file mode 100755 index 0000000..5b4e2fd --- /dev/null +++ b/samples/EarthWarrior3D/proj.ios_mac/ios/Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'iphone' target in the 'iphone' project +// + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/RootViewController.h b/samples/EarthWarrior3D/proj.ios_mac/ios/RootViewController.h new file mode 100755 index 0000000..a166901 --- /dev/null +++ b/samples/EarthWarrior3D/proj.ios_mac/ios/RootViewController.h @@ -0,0 +1,34 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#import + + +@interface RootViewController : UIViewController { + +} +- (BOOL) prefersStatusBarHidden; + +@end diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/RootViewController.mm b/samples/EarthWarrior3D/proj.ios_mac/ios/RootViewController.mm new file mode 100755 index 0000000..c6e2390 --- /dev/null +++ b/samples/EarthWarrior3D/proj.ios_mac/ios/RootViewController.mm @@ -0,0 +1,114 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#import "RootViewController.h" +#import "cocos2d.h" +#import "CCEAGLView.h" + +@implementation RootViewController + +/* + // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { + // Custom initialization + } + return self; +} +*/ + +/* +// Implement loadView to create a view hierarchy programmatically, without using a nib. +- (void)loadView { +} +*/ + +/* +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad { + [super viewDidLoad]; +} + +*/ +// Override to allow orientations other than the default portrait orientation. +// This method is deprecated on ios6 +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return UIInterfaceOrientationIsLandscape( interfaceOrientation ); +} + +// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead +- (NSUInteger) supportedInterfaceOrientations{ +#ifdef __IPHONE_6_0 + return UIInterfaceOrientationMaskAllButUpsideDown; +#endif +} + +- (BOOL) shouldAutorotate { + return YES; +} + +- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { + [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; + + cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView(); + + if (glview) + { + CCEAGLView *eaglview = (CCEAGLView*) glview->getEAGLView(); + + if (eaglview) + { + CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]); + cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height); + } + } +} + +//fix not hide status on ios7 +- (BOOL)prefersStatusBarHidden +{ + return YES; +} + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +- (void)viewDidUnload { + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + + +- (void)dealloc { + [super dealloc]; +} + + +@end diff --git a/samples/EarthWarrior3D/proj.ios_mac/ios/main.m b/samples/EarthWarrior3D/proj.ios_mac/ios/main.m new file mode 100755 index 0000000..8daa43e --- /dev/null +++ b/samples/EarthWarrior3D/proj.ios_mac/ios/main.m @@ -0,0 +1,9 @@ +#import + +int main(int argc, char *argv[]) { + + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, @"AppController"); + [pool release]; + return retVal; +} diff --git a/samples/EarthWarrior3D/proj.ios_mac/mac/Icon.icns b/samples/EarthWarrior3D/proj.ios_mac/mac/Icon.icns new file mode 100755 index 0000000..2040fc6 Binary files /dev/null and b/samples/EarthWarrior3D/proj.ios_mac/mac/Icon.icns differ diff --git a/samples/EarthWarrior3D/proj.ios_mac/mac/Info.plist b/samples/EarthWarrior3D/proj.ios_mac/mac/Info.plist new file mode 100755 index 0000000..a73feb7 --- /dev/null +++ b/samples/EarthWarrior3D/proj.ios_mac/mac/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + Icon + CFBundleIdentifier + org.cocos2d-x.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSApplicationCategoryType + public.app-category.games + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright © 2013. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/samples/EarthWarrior3D/proj.ios_mac/mac/Prefix.pch b/samples/EarthWarrior3D/proj.ios_mac/mac/Prefix.pch new file mode 100755 index 0000000..46c36a7 --- /dev/null +++ b/samples/EarthWarrior3D/proj.ios_mac/mac/Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'Paralaxer' target in the 'Paralaxer' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/samples/EarthWarrior3D/proj.ios_mac/mac/main.cpp b/samples/EarthWarrior3D/proj.ios_mac/mac/main.cpp new file mode 100755 index 0000000..96f027e --- /dev/null +++ b/samples/EarthWarrior3D/proj.ios_mac/mac/main.cpp @@ -0,0 +1,34 @@ +/**************************************************************************** + 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. + ****************************************************************************/ + +#include "AppDelegate.h" +#include "cocos2d.h" + +USING_NS_CC; + +int main(int argc, char *argv[]) +{ + AppDelegate app; + return Application::getInstance()->run(); +} diff --git a/samples/HelloCcf/.DS_Store b/samples/HelloCcf/.DS_Store new file mode 100644 index 0000000..c5c4e4d Binary files /dev/null and b/samples/HelloCcf/.DS_Store differ diff --git a/samples/HelloCcf/.cocos-project.json b/samples/HelloCcf/.cocos-project.json new file mode 100644 index 0000000..8f57f87 --- /dev/null +++ b/samples/HelloCcf/.cocos-project.json @@ -0,0 +1,3 @@ +{ + "project_type": "cpp" +} \ No newline at end of file diff --git a/samples/HelloCcf/CMakeLists.txt b/samples/HelloCcf/CMakeLists.txt new file mode 100644 index 0000000..8a79be8 --- /dev/null +++ b/samples/HelloCcf/CMakeLists.txt @@ -0,0 +1,252 @@ +cmake_minimum_required(VERSION 2.6) + +set(APP_NAME MyGame) +project (${APP_NAME}) + +include(cocos2d/build/BuildHelpers.CMakeLists.txt) + +option(USE_CHIPMUNK "Use chipmunk for physics library" ON) +option(USE_BOX2D "Use box2d for physics library" OFF) +option(DEBUG_MODE "Debug or release?" ON) + +if(DEBUG_MODE) + set(CMAKE_BUILD_TYPE DEBUG) +else(DEBUG_MODE) + set(CMAKE_BUILD_TYPE RELEASE) +endif(DEBUG_MODE) + +if (MSVC) + set(CMAKE_C_FLAGS_DEBUG "-DCOCOS2D_DEBUG=1") + set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) + + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") + +elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + 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") + +endif() + +if(USE_CHIPMUNK) + message("Using chipmunk ...") + add_definitions(-DCC_ENABLE_CHIPMUNK_INTEGRATION=1) + if(UNIX) # assuming linux + add_definitions(-DLINUX ) + endif() +elseif(USE_BOX2D) + message("Using box2d ...") + add_definitions(-DCC_ENABLE_BOX2D_INTEGRATION=1) + if(UNIX) # assuming linux + add_definitions(-DLINUX ) + endif() +else(USE_CHIPMUNK) + message(FATAL_ERROR "Must choose a physics library.") +endif(USE_CHIPMUNK) + +# architecture +if ( CMAKE_SIZEOF_VOID_P EQUAL 8 ) +set(ARCH_DIR "64-bit") +else() +set(ARCH_DIR "32-bit") +endif() + +if( UNIX ) #assume linux +set(GAME_SRC + proj.linux/main.cpp + Classes/AppDelegate.cpp + Classes/HelloWorldScene.cpp +) +elseif ( WIN32 ) +set(GAME_SRC + proj.win32/main.cpp + proj.win32/main.h + proj.win32/resource.h + Classes/AppDelegate.cpp + Classes/HelloWorldScene.cpp +) +endif() + +set(COCOS2D_ROOT ${CMAKE_SOURCE_DIR}/cocos2d) +if (WIN32) +include_directories( + ${COCOS2D_ROOT} + ${COCOS2D_ROOT}/cocos + ${COCOS2D_ROOT}/cocos/audio/include + ${COCOS2D_ROOT}/cocos/2d + ${COCOS2D_ROOT}/cocos/2d/renderer + ${COCOS2D_ROOT}/cocos/2d/platform + ${COCOS2D_ROOT}/cocos/2d/platform/desktop + ${COCOS2D_ROOT}/cocos/2d/platform/win32 + ${COCOS2D_ROOT}/cocos/base + ${COCOS2D_ROOT}/cocos/deprecated + ${COCOS2D_ROOT}/cocos/physics + ${COCOS2D_ROOT}/cocos/editor-support + ${COCOS2D_ROOT}/cocos/math + ${COCOS2D_ROOT}/extensions + ${COCOS2D_ROOT}/external + ${COCOS2D_ROOT}/external/edtaa3func + ${COCOS2D_ROOT}/external/jpeg/include/win32 + ${COCOS2D_ROOT}/external/png/include/win32 + ${COCOS2D_ROOT}/external/tiff/include/win32 + ${COCOS2D_ROOT}/external/webp/include/win32 + ${COCOS2D_ROOT}/external/curl/include/win32 + ${COCOS2D_ROOT}/external/tinyxml2 + ${COCOS2D_ROOT}/external/unzip + ${COCOS2D_ROOT}/external/sqlite3/include + ${COCOS2D_ROOT}/external/chipmunk/include/chipmunk + ${COCOS2D_ROOT}/external/freetype2/include/win32 + ${COCOS2D_ROOT}/external/websockets/include/win32 + ${COCOS2D_ROOT}/external/spidermonkey/include/win32 + ${COCOS2D_ROOT}/external/glfw3/include/win32 + ${COCOS2D_ROOT}/external/win32-specific/gles/include/OGLES + ${COCOS2D_ROOT}/external/win32-specific/icon/include + ${COCOS2D_ROOT}/external/win32-specific/zlib/include + ${COCOS2D_ROOT}/external/xxhash +) +link_directories( + /usr/local/lib + ${COCOS2D_ROOT}/external/png/prebuilt/win32 + ${COCOS2D_ROOT}/external/jpeg/prebuilt/win32 + ${COCOS2D_ROOT}/external/tiff/prebuilt/win32 + ${COCOS2D_ROOT}/external/glfw3/prebuilt/win32 + ${COCOS2D_ROOT}/external/webp/prebuilt/win32 + ${COCOS2D_ROOT}/external/curl/prebuilt/win32 + ${COCOS2D_ROOT}/external/sqlite3/libraries/win32 + ${COCOS2D_ROOT}/external/freetype2/prebuilt/win32 + ${COCOS2D_ROOT}/external/websockets/prebuilt/win32 + ${COCOS2D_ROOT}/external/spidermonkey/prebuilt/win32 + ${COCOS2D_ROOT}/external/win32-specific/gles/prebuilt + ${COCOS2D_ROOT}/external/win32-specific/icon/prebuilt + ${COCOS2D_ROOT}/external/win32-specific/zlib/prebuilt +) + +elseif(UNIX) #assumed linux +include_directories( + /usr/local/include/GLFW + ${COCOS2D_ROOT} + ${COCOS2D_ROOT}/cocos + ${COCOS2D_ROOT}/cocos/audio/include + ${COCOS2D_ROOT}/cocos/platform + ${COCOS2D_ROOT}/cocos/platform/desktop + ${COCOS2D_ROOT}/cocos/platform/linux + ${COCOS2D_ROOT}/cocos/editor-support + ${COCOS2D_ROOT}/extensions + ${COCOS2D_ROOT}/external + ${COCOS2D_ROOT}/external/edtaa3func + ${COCOS2D_ROOT}/external/jpeg/include/linux + ${COCOS2D_ROOT}/external/tiff/include/linux + ${COCOS2D_ROOT}/external/webp/include/linux + ${COCOS2D_ROOT}/external/tinyxml2 + ${COCOS2D_ROOT}/external/unzip + ${COCOS2D_ROOT}/external/freetype2/include/linux + ${COCOS2D_ROOT}/external/websockets/include/linux + ${COCOS2D_ROOT}/external/spidermonkey/include/linux + ${COCOS2D_ROOT}/external/linux-specific/fmod/include/${ARCH_DIR} + ${COCOS2D_ROOT}/external/xxhash +) + +link_directories( + /usr/local/lib + ${COCOS2D_ROOT}/external/jpeg/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/tiff/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/webp/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/freetype2/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/websockets/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/spidermonkey/prebuilt/linux/${ARCH_DIR} + ${COCOS2D_ROOT}/external/linux-specific/fmod/prebuilt/${ARCH_DIR} +) +endif() + +if(USE_CHIPMUNK) + + include_directories(${COCOS2D_ROOT}/external/chipmunk/include/chipmunk) + # chipmunk library + add_subdirectory(${COCOS2D_ROOT}/external/chipmunk/src) +endif() + +if(USE_BOX2D) + # box2d library + add_subdirectory(${COCOS2D_ROOT}/external/Box2D) +endif() + +# unzip library +add_subdirectory(${COCOS2D_ROOT}/external/unzip) + +# tinyxml2 library +add_subdirectory(${COCOS2D_ROOT}/external/tinyxml2) + +# audio +add_subdirectory(${COCOS2D_ROOT}/cocos/audio) + +# xxhash library +add_subdirectory(${COCOS2D_ROOT}/external/xxhash) + +# cocos2d +add_subdirectory(${COCOS2D_ROOT}/cocos) + +# extensions +add_subdirectory(${COCOS2D_ROOT}/extensions) + +## Editor Support + +# spine +add_subdirectory(${COCOS2D_ROOT}/cocos/editor-support/spine) + +# cocosbuilder +add_subdirectory(${COCOS2D_ROOT}/cocos/editor-support/cocosbuilder) + +# cocostudio +add_subdirectory(${COCOS2D_ROOT}/cocos/editor-support/cocostudio) + +if ( WIN32 ) + # add the executable + add_executable(${APP_NAME} + WIN32 + ${GAME_SRC} + ) +else() + # add the executable + add_executable(${APP_NAME} + ${GAME_SRC} + ) +endif() + +if ( CMAKE_SIZEOF_VOID_P EQUAL 8 ) +set(FMOD_LIB "fmodex64") +else() +set(FMOD_LIB "fmodex") +endif() + +target_link_libraries(${APP_NAME} + spine + cocostudio + cocosbuilder + extensions + audio + cocos2d + ) + +set(APP_BIN_DIR "${CMAKE_BINARY_DIR}/bin") + +set_target_properties(${APP_NAME} PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${APP_BIN_DIR}") + +if ( WIN32 ) + #also copying dlls to binary directory for the executable to run + pre_build(${APP_NAME} + COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resources ${APP_BIN_DIR}/Resources + COMMAND ${CMAKE_COMMAND} -E copy ${COCOS2D_ROOT}/external/win32-specific/gles/prebuilt/glew32.dll ${APP_BIN_DIR}/${CMAKE_BUILD_TYPE} + COMMAND ${CMAKE_COMMAND} -E copy ${COCOS2D_ROOT}/external/win32-specific/zlib/prebuilt/zlib1.dll ${APP_BIN_DIR}/${CMAKE_BUILD_TYPE} + ) +else() + pre_build(${APP_NAME} + COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resources ${APP_BIN_DIR}/Resources + ) + +endif() diff --git a/samples/HelloCcf/Classes/AppDelegate.cpp b/samples/HelloCcf/Classes/AppDelegate.cpp new file mode 100644 index 0000000..0f4b630 --- /dev/null +++ b/samples/HelloCcf/Classes/AppDelegate.cpp @@ -0,0 +1,57 @@ +#include "AppDelegate.h" +#include "HelloWorldScene.h" +USING_NS_CC; + +AppDelegate::AppDelegate() { + +} + +AppDelegate::~AppDelegate() +{ +} + +bool AppDelegate::applicationDidFinishLaunching() { + // initialize director + auto director = Director::getInstance(); + auto glview = director->getOpenGLView(); + if(!glview) { + int height, width; + height = 640; + width = height*(960.0/640.0); + + glview = GLView::createWithRect("HelloCCF", Rect(0, 0, width, height)); + + director->setOpenGLView(glview); + } + glview->setDesignResolutionSize(960, 640, ResolutionPolicy::SHOW_ALL); + + // turn on display FPS + director->setDisplayStats(true); + + // set FPS. the default value is 1.0/60 if you don't call this + director->setAnimationInterval(1.0 / 60); + + // create a scene. it's an autorelease object + auto scene = HelloWorld::createScene(); + + // run + director->runWithScene(scene); + + return true; +} + +// This function will be called when the app is inactive. When comes a phone call,it's be invoked too +void AppDelegate::applicationDidEnterBackground() { + Director::getInstance()->stopAnimation(); + + // if you use SimpleAudioEngine, it must be pause + // SimpleAudioEngine::getInstance()->pauseBackgroundMusic(); +} + +// this function will be called when the app is active again +void AppDelegate::applicationWillEnterForeground() { + Director::getInstance()->startAnimation(); + + // if you use SimpleAudioEngine, it must resume here + // SimpleAudioEngine::getInstance()->resumeBackgroundMusic(); +} diff --git a/samples/HelloCcf/Classes/AppDelegate.h b/samples/HelloCcf/Classes/AppDelegate.h new file mode 100644 index 0000000..18ee8ae --- /dev/null +++ b/samples/HelloCcf/Classes/AppDelegate.h @@ -0,0 +1,38 @@ +#ifndef _APP_DELEGATE_H_ +#define _APP_DELEGATE_H_ + +#include "cocos2d.h" + +/** +@brief The cocos2d Application. + +The reason for implement as private inheritance is to hide some interface call by Director. +*/ +class AppDelegate : private cocos2d::Application +{ +public: + AppDelegate(); + virtual ~AppDelegate(); + + /** + @brief Implement Director and Scene init code here. + @return true Initialize success, app continue. + @return false Initialize failed, app terminate. + */ + virtual bool applicationDidFinishLaunching(); + + /** + @brief The function be called when the application enter background + @param the pointer of the application + */ + virtual void applicationDidEnterBackground(); + + /** + @brief The function be called when the application enter foreground + @param the pointer of the application + */ + virtual void applicationWillEnterForeground(); +}; + +#endif // _APP_DELEGATE_H_ + diff --git a/samples/HelloCcf/Classes/ChatScene.cpp b/samples/HelloCcf/Classes/ChatScene.cpp new file mode 100644 index 0000000..7508a2c --- /dev/null +++ b/samples/HelloCcf/Classes/ChatScene.cpp @@ -0,0 +1,163 @@ +// +// ChatLayer.cpp +// HelloCcf +// +// Created by calf on 14-7-28. +// +// + +#include "ChatScene.h" +#include "ConnectionInterface.h" +#include "HelloWorldScene.h" + +USING_NS_CC; + +Scene* ChatLayer::createScene() +{ + // 'scene' is an autorelease object + auto scene = Scene::create(); + + // 'layer' is an autorelease object + auto layer = ChatLayer::create(); + + // add layer as a child to scene + scene->addChild(layer); + + layer->setTag(10012); + + // return the scene + return scene; +} + +// on "init" you need to initialize your instance +bool ChatLayer::init() +{ + ////////////////////////////// + // 1. super init first + if ( !Layer::init() ) + { + return false; + } + + Size visibleSize = Director::getInstance()->getVisibleSize(); + Vec2 origin = Director::getInstance()->getVisibleOrigin(); + + auto closeBtn = Button::create("CloseNormal.png"); + closeBtn->setPosition(Vec2(origin.x + visibleSize.width - closeBtn->getContentSize().width/2 , + origin.y + visibleSize.height - closeBtn->getContentSize().height/2)); + closeBtn->setTag(217); + addChild(closeBtn, 0); + closeBtn->addTouchEventListener(CC_CALLBACK_2(ChatLayer::touchEvent,this)); + + auto sendBtn = Button::create("backtotoppressed.png"); + sendBtn->setTitleText("send"); + sendBtn->setTitleFontSize(26); + sendBtn->setPosition(Vec2(origin.x + visibleSize.width - sendBtn->getContentSize().width/2 , + origin.y + sendBtn->getContentSize().height/2)); + sendBtn->setTag(212); + addChild(sendBtn, 0); + sendBtn->addTouchEventListener(CC_CALLBACK_2(ChatLayer::touchEvent,this)); + + textField = TextField::create("input text here", "", 26); + textField->setPosition(Vec2(origin.x + visibleSize.width/2 - sendBtn->getContentSize().width/2 , + origin.y + sendBtn->getContentSize().height/2)); + textField->setTextHorizontalAlignment(TextHAlignment::LEFT); + addChild(textField, 0); + + initListView(); + + auto peerListener1 = EventListenerCustom::create("IntelCCFReceiveMessage", CC_CALLBACK_1(ChatLayer::listenToReceiveMessage, this)); + Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(peerListener1, this); + + auto peerListener2 = EventListenerCustom::create("IntelCCFDisconnect", CC_CALLBACK_1(ChatLayer::listenToDisconnect, this)); + Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(peerListener2, this); + + return true; +} + +void ChatLayer::initListView() +{ + Size visibleSize = Director::getInstance()->getVisibleSize(); + + _listView = ListView::create(); + _listView->setDirection(ui::ScrollView::Direction::VERTICAL); + _listView->setTouchEnabled(true); + _listView->setBounceEnabled(true); + _listView->setBackGroundImage("listviewbg.png"); + _listView->setBackGroundImageScale9Enabled(true); + _listView->setSize(Size(visibleSize.width, visibleSize.height - 100)); + _listView->setPosition(Point(visibleSize.width / 2.0f, visibleSize.height / 2.0f)); + _listView->setAnchorPoint(Vec2::ANCHOR_MIDDLE); + + addChild(_listView,1); +} + +void ChatLayer::touchEvent(Ref*pSender, Widget::TouchEventType type) +{ + Button *btn = (Button *)pSender; + if (type == Widget::TouchEventType::ENDED) + { + switch (btn->getTag()) { + case 212: + { + ConnectionInterface::SendMessage(textField->getStringValue()); + + Text* message = Text::create(textField->getStringValue(),"fonts/Marker Felt.ttf",32); + message->ignoreContentAdaptWithSize(true); + message->setTextHorizontalAlignment(TextHAlignment::LEFT); + message->setTouchScaleChangeEnabled(false); + message->setTouchEnabled(false); + + _listView->pushBackCustomItem(message); + textField->setText(""); + } + break; + case 217: + ConnectionInterface::Disconnect(); + auto helloworld = HelloWorld::createScene(); + Director::getInstance()->replaceScene(helloworld); + break; + } + + } +} + + +void ChatLayer::listenToReceiveMessage(EventCustom *event) +{ + this->scheduleOnce(schedule_selector(ChatLayer::scheduleReceiveMessage), 0); +} + +void ChatLayer::scheduleReceiveMessage(float dt) +{ + std::list::iterator iter; + std::list listMessage; + ConnectionInterface::getMessageList(listMessage); + + while (listMessage.size()) { + std::string msg = listMessage.front(); + + Text* message = Text::create(msg,"fonts/Marker Felt.ttf",32); + message->ignoreContentAdaptWithSize(true); + message->setTextHorizontalAlignment(TextHAlignment::LEFT); + message->setTouchScaleChangeEnabled(false); + message->setTouchEnabled(false); + message->setColor(Color3B::GREEN); + _listView->pushBackCustomItem(message); + + listMessage.pop_front(); + } +} + +void ChatLayer::listenToDisconnect(EventCustom *event) +{ + this->scheduleOnce(schedule_selector(ChatLayer::scheduleDisconnect), 0); +} + +void ChatLayer::scheduleDisconnect(float dt) +{ + auto helloworld = HelloWorld::createScene(); + Director::getInstance()->replaceScene(helloworld); +} + + diff --git a/samples/HelloCcf/Classes/ChatScene.h b/samples/HelloCcf/Classes/ChatScene.h new file mode 100644 index 0000000..fdb9ed6 --- /dev/null +++ b/samples/HelloCcf/Classes/ChatScene.h @@ -0,0 +1,50 @@ +// +// ChatScene.h +// HelloCcf +// +// Created by calf on 14-7-28. +// +// + +#ifndef __HelloCcf__ChatScene__ +#define __HelloCcf__ChatScene__ + +#include "cocos2d.h" +#include "editor-support/cocostudio/CocoStudio.h" +#include "cocos/ui/CocosGUI.h" +using namespace cocos2d::ui; + + +class ChatLayer : public cocos2d::Layer +{ +public: + // there's no 'id' in cpp, so we recommend returning the class instance pointer + static cocos2d::Scene* createScene(); + + // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone + virtual bool init(); + + // implement the "static create()" method manually + CREATE_FUNC(ChatLayer); + + void receiveMessage(std::string message); + +private: + void listenToReceiveMessage(cocos2d::EventCustom *event); + + void listenToDisconnect(cocos2d::EventCustom *event); + + void touchEvent(Ref*pSender, Widget::TouchEventType type); + + void scheduleReceiveMessage(float dt); + + void scheduleDisconnect(float dt); + + void initListView(); + + + ListView *_listView; + TextField *textField; +}; + +#endif /* defined(__HelloCcf__ChatScene__) */ diff --git a/samples/HelloCcf/Classes/ConnectionInterface.cpp b/samples/HelloCcf/Classes/ConnectionInterface.cpp new file mode 100644 index 0000000..04a1a51 --- /dev/null +++ b/samples/HelloCcf/Classes/ConnectionInterface.cpp @@ -0,0 +1,188 @@ +// +// ConnectionInterface.cpp +// HelloCcf +// +// Created by calf on 14-7-24. +// +// + +#include "ConnectionInterface.h" +#include "cocos2d.h" +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +#include "platform/android/jni/JniHelper.h" +#endif + +USING_NS_CC; + +std::list ConnectionInterface::_listPeer; +std::list ConnectionInterface::_listMessage; +std::mutex ConnectionInterface::_mutex; +std::mutex ConnectionInterface::_mutexMessage; + +bool ConnectionInterface::_bConnect = false; + +void ConnectionInterface::OnPeerUpdate(tagPEER peer) +{ + CCLOG("ConnectionInterface::OnPeerUpdate"); + + std::list::iterator iter; + iter = queryPeer(peer); + + _mutex.lock(); + if (iter == _listPeer.end()) { + _listPeer.push_back(peer); + } + else{ + _listPeer.insert(iter, peer); + } + + _mutex.unlock(); + + cocos2d::EventCustom event("IntelCCFPeerUpdate"); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); +} + +void ConnectionInterface::InvitePeer(tagPEER peer) +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + jclass peercls = JniHelper::getEnv()->FindClass("com/intel/csdk/wrapper/Peer"); //获得Peer类引用 + if(peercls == NULL) + { + CCLOG(" can't find class com/intel/csdk/wrapper/Peer"); + return; + } + + jmethodID constrocMID = JniHelper::getEnv()->GetMethodID(peercls,"","(Ljava/lang/String;Ljava/lang/String;ZZZ)V"); //获得得该类型的构造函数 + if(constrocMID == NULL) + { + CCLOG(" can't find construct function com/intel/csdk/wrapper/Peer"); + return; + } + + jstring strName = JniHelper::getEnv()->NewStringUTF(peer._sessionName.c_str()); + jstring strId = JniHelper::getEnv()->NewStringUTF(peer._sessionId.c_str()); + + jobject peer_ojb = JniHelper::getEnv()->NewObject(peercls,constrocMID, strName, strId, (jboolean)peer._availability, (jboolean)peer._availability_cloud, (jboolean)peer._availability_proximity); //构造一个对象,调用该类的构造函数,并且传递参数 + + if(peer_ojb == NULL) + { + CCLOG(" create objec failed com/intel/csdk/wrapper/Peer"); + return; + } + + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, "org/cocos2dx/helloccf/AppActivity", "invitePeer", "(Lcom/intel/csdk/wrapper/Peer;)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, peer_ojb); + t.env->DeleteLocalRef(t.classID); + } +#endif +} + +void ConnectionInterface::OnReciveInvite(std::string sessionId) +{ + CCLOG("ConnectionInterface::OnReciveInvite"); + cocos2d::EventCustom event("IntelCCFPeerInvite"); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); +} + +void ConnectionInterface::SendMessage(std::string msg) +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + jstring strMsg = JniHelper::getEnv()->NewStringUTF(msg.c_str()); + + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, "org/cocos2dx/helloccf/AppActivity", "sendMessage", "(Ljava/lang/String;)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, strMsg); + t.env->DeleteLocalRef(t.classID); + } +#endif +} + +void ConnectionInterface::OnReceiveMessage(std::string message) +{ + CCLOG("OnReceiveMessage %s", message.c_str()); + if(message.length() == 0) return; + + _mutexMessage.lock(); + _listMessage.push_front(message); + _mutexMessage.unlock(); + + cocos2d::EventCustom event("IntelCCFReceiveMessage"); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); +} + +void ConnectionInterface::Disconnect() +{ + _mutexMessage.lock(); + _listMessage.clear(); + _mutexMessage.unlock(); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, "org/cocos2dx/helloccf/AppActivity", "remoteDisconnectJni", "()V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID); + t.env->DeleteLocalRef(t.classID); + } +#endif +} + +void ConnectionInterface::OnDisconnect() +{ + _mutexMessage.lock(); + _listMessage.clear(); + _mutexMessage.unlock(); + + CCLOG("OnDisconnect"); + cocos2d::EventCustom event("IntelCCFDisconnect"); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); +} + +void ConnectionInterface::SendInviteResponse(bool value) +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, "org/cocos2dx/helloccf/AppActivity", "sendInviteResponse", "(Z)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, (jboolean)value); + t.env->DeleteLocalRef(t.classID); + } + + _bConnect = value; +#endif +} + +void ConnectionInterface::OnAcknowledgment() +{ + CCLOG("OnAcknowledgment"); + cocos2d::EventCustom event("IntelCCFInviteAcknowledgment"); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); +} + +void ConnectionInterface::getPeerList(std::list &listPeer) +{ + _mutex.lock(); + listPeer = std::list(_listPeer); + _mutex.unlock(); +} + +void ConnectionInterface::getMessageList(std::list &listMessage) +{ + _mutexMessage.lock(); + listMessage = std::list(_listMessage); + _listMessage.clear(); + _mutexMessage.unlock(); +} + +std::list::iterator ConnectionInterface::queryPeer(tagPEER &peer) +{ + _mutex.lock(); + + std::list::iterator iter; + for(iter = _listPeer.begin(); iter != _listPeer.end(); iter++) { + if( (*iter)._sessionId == peer._sessionId ) { + break; + } + } + _mutex.unlock(); + + return iter; +} \ No newline at end of file diff --git a/samples/HelloCcf/Classes/ConnectionInterface.h b/samples/HelloCcf/Classes/ConnectionInterface.h new file mode 100644 index 0000000..2363f16 --- /dev/null +++ b/samples/HelloCcf/Classes/ConnectionInterface.h @@ -0,0 +1,67 @@ +// +// ConnectionInterface.h +// HelloCcf +// +// Implement interface of Intel® Common Connectivity Framework +// eg. PeerUpdate Invite ReceiveInvite SendMessage ReceiveMessage Disconnect +// +// Created by calf on 14-7-24. +// +// + +#ifndef __HelloCcf__ConnectionInterface__ +#define __HelloCcf__ConnectionInterface__ + +#include +#include +#include + +typedef struct tagPEER{ + std::string _sessionName; + std::string _sessionId; + bool _availability; + bool _availability_cloud; + bool _availability_proximity; + bool add; +}; + +class ConnectionInterface { +public: + + static void InvitePeer(tagPEER peer); + + static void SendInviteResponse(bool value); + + static void SendMessage(std::string msg); + + static void Disconnect(); + + static void OnPeerUpdate(tagPEER peer); + + static void OnReciveInvite(std::string sessionId); + + static void OnReceiveMessage(std::string message); + + static void OnAcknowledgment(); + + static void OnDisconnect(); + + static void getPeerList(std::list &listPeer); + + static void getMessageList(std::list &listMessage); + +protected: + static std::list::iterator queryPeer(tagPEER &peer); + + static std::mutex _mutex; + + static std::mutex _mutexMessage; + + static std::list _listPeer; + + static std::list _listMessage; + + static bool _bConnect; +}; + +#endif /* defined(__HelloCcf__ConnectionInterface__) */ diff --git a/samples/HelloCcf/Classes/HelloWorldScene.cpp b/samples/HelloCcf/Classes/HelloWorldScene.cpp new file mode 100644 index 0000000..ea707d0 --- /dev/null +++ b/samples/HelloCcf/Classes/HelloWorldScene.cpp @@ -0,0 +1,237 @@ +#include "HelloWorldScene.h" +#include "PopLayer.h" +#include "ChatScene.h" + +Scene* HelloWorld::createScene() +{ + // 'scene' is an autorelease object + auto scene = Scene::create(); + + // 'layer' is an autorelease object + auto layer = HelloWorld::create(); + + // add layer as a child to scene + scene->addChild(layer); + + layer->setTag(10086); + + // return the scene + return scene; +} + +// on "init" you need to initialize your instance +bool HelloWorld::init() +{ + ////////////////////////////// + // 1. super init first + if ( !Layer::init() ) + { + return false; + } + + Size visibleSize = Director::getInstance()->getVisibleSize(); + Vec2 origin = Director::getInstance()->getVisibleOrigin(); + + ///////////////////////////// + // 2. add a menu item with "X" image, which is clicked to quit the program + // you may modify it. + + // add a "close" icon to exit the progress. it's an autorelease object + auto closeItem = MenuItemImage::create( + "CloseNormal.png", + "CloseSelected.png", + CC_CALLBACK_1(HelloWorld::menuCloseCallback, this)); + + closeItem->setPosition(Vec2(origin.x + visibleSize.width - closeItem->getContentSize().width/2 , + origin.y + closeItem->getContentSize().height/2)); + + // create menu, it's an autorelease object + auto menu = Menu::create(closeItem, NULL); + menu->setPosition(Vec2::ZERO); + this->addChild(menu, 1); + + ///////////////////////////// + // 3. add your codes below... + + // add a label shows "Hello World" + // create and initialize a label + + auto label = LabelTTF::create("Hello Intel CCF\nDiscovery Node would be listed here", "Arial", 24); + + // position the label on the center of the screen + label->setPosition(Vec2(origin.x + visibleSize.width/2, + origin.y + visibleSize.height - label->getContentSize().height)); + + // add the label as a child to this layer + this->addChild(label, 1); + + // add "HelloWorld" splash screen" + auto sprite = Sprite::create("HelloWorld.png"); + + // position the sprite on the center of the screen + sprite->setPosition(Vec2(visibleSize.width/2 + origin.x, visibleSize.height/2 + origin.y)); + + // add the sprite as a child to this layer + this->addChild(sprite, 0); + + auto peerListener = EventListenerCustom::create("IntelCCFPeerUpdate", CC_CALLBACK_1(HelloWorld::listenToPeerUpdate, this)); + Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(peerListener, this); + + auto peerInviteListener = EventListenerCustom::create("IntelCCFPeerInvite", CC_CALLBACK_1(HelloWorld::listenToPeerInvite, this)); + Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(peerInviteListener, this); + + auto peerAcknowledgmentListener = EventListenerCustom::create("IntelCCFInviteAcknowledgment", CC_CALLBACK_1(HelloWorld::listenToAcknowledgment, this)); + Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(peerAcknowledgmentListener, this); + + initListView(); + + schedulePeer(0); + + return true; +} + +void HelloWorld::initListView() +{ + Size visibleSize = Director::getInstance()->getVisibleSize(); + + _listView = ListView::create(); + _listView->setDirection(ui::ScrollView::Direction::VERTICAL); + _listView->setTouchEnabled(true); + _listView->setBounceEnabled(true); + _listView->setBackGroundImage("listviewbg.png"); + _listView->setBackGroundImageScale9Enabled(true); + _listView->setSize(Size(480, visibleSize.height)); + _listView->setPosition(Point(visibleSize.width / 2.0f, visibleSize.height / 2.0f)); + _listView->setAnchorPoint(Vec2::ANCHOR_MIDDLE); + _listView->addEventListener((ui::ListView::ccListViewCallback)CC_CALLBACK_2(HelloWorld::selectedItemEvent, this)); + + addChild(_listView,1); +} + +void HelloWorld::selectedItemEvent(Ref *pSender, ListView::EventType type) +{ + switch (type) + { + case cocos2d::ui::ListView::EventType::ON_SELECTED_ITEM_START: + { + ListView* listView = static_cast(pSender); + CC_UNUSED_PARAM(listView); + CCLOG("select child start index = %ld", listView->getCurSelectedIndex()); + break; + } + case cocos2d::ui::ListView::EventType::ON_SELECTED_ITEM_END: + { + ListView* listView = static_cast(pSender); + CC_UNUSED_PARAM(listView); + CCLOG("select child end index = %ld", listView->getCurSelectedIndex()); + Widget *tempWiget = listView->getItem(listView->getCurSelectedIndex()); + PeerButton *tempButton = (PeerButton *)tempWiget->getChildByTag(10011); + if (tempButton) { + ConnectionInterface::InvitePeer(tempButton->getPeer()); + } + + break; + } + default: + break; + } +} + +void HelloWorld::menuCloseCallback(Ref* pSender) +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) + MessageBox("You pressed the close button. Windows Store Apps do not implement a close button.","Alert"); + return; +#endif + + Director::getInstance()->end(); + ConnectionInterface::Disconnect(); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + exit(0); +#endif +} + +void HelloWorld::listenToPeerUpdate(EventCustom *event) +{ + this->scheduleOnce(schedule_selector(HelloWorld::schedulePeer), 0); +} + +void HelloWorld::schedulePeer(float dt) +{ + std::list listPeer; + ConnectionInterface::getPeerList(listPeer); + + if (listPeer.size() == 0) return; + + while(listPeer.size()){ + tagPEER tempPeer = listPeer.front(); + + CCLOG("HelloWorld schedulePeer:%s", tempPeer._sessionName.c_str()); + + Widget *pItem = queryPeerMenuItem(tempPeer); + if (tempPeer.add && pItem == NULL) { + + PeerButton* custom_button = PeerButton::create("backtotoppressed.png", "backtotopnormal.png"); + custom_button->setTitleText(tempPeer._sessionName); + custom_button->setTitleFontSize(20); + custom_button->setScale9Enabled(true); + custom_button->setPeer(tempPeer); + custom_button->setTag(10011); + + + Layout *custom_item = Layout::create(); + custom_item->setContentSize(custom_button->getContentSize()); + custom_item->setTouchEnabled(true); + custom_item->setTag(10010); + custom_item->addChild(custom_button, 0); + custom_button->setPosition(Vec2(_listView->getContentSize().width/2, -100)); + + _listView->addChild(custom_item); + } + + if(!tempPeer.add && pItem != NULL){ + pItem->removeFromParent(); + } + + listPeer.pop_front(); + } +} + +void HelloWorld::listenToPeerInvite(EventCustom *event) +{ + this->scheduleOnce(schedule_selector(HelloWorld::schedulePop), 0); +} + +void HelloWorld::schedulePop(float dt) +{ + auto popLayer = PopLayer::create(); + addChild(popLayer, 2); +} + +void HelloWorld::listenToAcknowledgment(cocos2d::EventCustom *event) +{ + this->scheduleOnce(schedule_selector(HelloWorld::scheduleAcknowledgement), 0); +} + +void HelloWorld::scheduleAcknowledgement(float dt) +{ + auto scene = ChatLayer::createScene(); + Director::getInstance()->replaceScene(scene); +} + +Widget* HelloWorld::queryPeerMenuItem(tagPEER peer) +{ + for (auto& child : _listView->getChildren()) + { + if(child && child->getTag() == 10010) + { + PeerButton *tempButton = (PeerButton *)child->getChildByTag(10011); + if (tempButton && tempButton->getPeer()._sessionId == peer._sessionId) { + return (Widget*)child; + } + } + } + + return NULL; +} diff --git a/samples/HelloCcf/Classes/HelloWorldScene.h b/samples/HelloCcf/Classes/HelloWorldScene.h new file mode 100644 index 0000000..6a29ce3 --- /dev/null +++ b/samples/HelloCcf/Classes/HelloWorldScene.h @@ -0,0 +1,49 @@ +#ifndef __HELLOWORLD_SCENE_H__ +#define __HELLOWORLD_SCENE_H__ + +#include "cocos2d.h" +#include "PeerButton.h" +#include "editor-support/cocostudio/CocoStudio.h" +#include "cocos/ui/CocosGUI.h" +USING_NS_CC; + +class HelloWorld : public cocos2d::Layer +{ +public: + // there's no 'id' in cpp, so we recommend returning the class instance pointer + static cocos2d::Scene* createScene(); + + // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone + virtual bool init(); + + // a selector callback + void menuCloseCallback(cocos2d::Ref* pSender); + + // implement the "static create()" method manually + CREATE_FUNC(HelloWorld); + +// void menuPeerCallback(cocos2d::Ref* pSender); + +protected: + void listenToPeerUpdate(cocos2d::EventCustom *event); + + void listenToPeerInvite(cocos2d::EventCustom *event); + + void listenToAcknowledgment(cocos2d::EventCustom *event); + + void schedulePeer(float dt); + + void scheduleAcknowledgement(float dt); + + void schedulePop(float dt); + + void initListView(); + + void selectedItemEvent(Ref* pSender, ListView::EventType type); + + Widget* queryPeerMenuItem(tagPEER peer); + + ListView* _listView; +}; + +#endif // __HELLOWORLD_SCENE_H__ diff --git a/samples/HelloCcf/Classes/PeerButton.cpp b/samples/HelloCcf/Classes/PeerButton.cpp new file mode 100644 index 0000000..81ecab1 --- /dev/null +++ b/samples/HelloCcf/Classes/PeerButton.cpp @@ -0,0 +1,27 @@ +// +// PeerButton.cpp +// HelloCcf +// +// Created by calf on 14-7-23. +// +// + +#include "PeerButton.h" + +/// +/// PeerButton +/// + +PeerButton* PeerButton::create(const std::string &normalImage, + const std::string& selectedImage , + const std::string& disableImage, + TextureResType texType) +{ + PeerButton *btn = new PeerButton(); + if (btn && btn->init(normalImage,selectedImage,disableImage,texType)) { + btn->autorelease(); + return btn; + } + CC_SAFE_DELETE(btn); + return nullptr; +} diff --git a/samples/HelloCcf/Classes/PeerButton.h b/samples/HelloCcf/Classes/PeerButton.h new file mode 100644 index 0000000..d747c49 --- /dev/null +++ b/samples/HelloCcf/Classes/PeerButton.h @@ -0,0 +1,30 @@ +// +// PeerButton.h +// HelloCcf +// +// Created by calf on 14-7-23. +// +// + +#ifndef __HelloCcf__PeerButton__ +#define __HelloCcf__PeerButton__ + +#include "cocos2d.h" +#include "ConnectionInterface.h" +#include "editor-support/cocostudio/CocoStudio.h" +#include "cocos/ui/CocosGUI.h" +using namespace cocos2d::ui; + +class PeerButton : public Button +{ +public: + static PeerButton* create(const std::string& normalImage, + const std::string& selectedImage = "", + const std::string& disableImage = "", + TextureResType texType = TextureResType::LOCAL); + tagPEER getPeer(){return _peer;} + void setPeer(tagPEER peer){_peer = peer;} +protected: + tagPEER _peer; +}; +#endif /* defined(__HelloCcf__PeerMenuItem__) */ diff --git a/samples/HelloCcf/Classes/PopLayer.cpp b/samples/HelloCcf/Classes/PopLayer.cpp new file mode 100644 index 0000000..ec95df8 --- /dev/null +++ b/samples/HelloCcf/Classes/PopLayer.cpp @@ -0,0 +1,97 @@ +// +// PopLayer.cpp +// HelloCcf +// +// Created by calf on 14-7-25. +// +// + +#include "PopLayer.h" +#include "ConnectionInterface.h" +#include "ChatScene.h" + +Scene * PopLayer::scene() +{ + Scene * scene = NULL; + do + { + scene = CCScene::create(); + PopLayer * layer = PopLayer::create(); + scene->addChild(layer); + } + while(0); + + return scene; +} + +bool PopLayer::init() +{ + bool bRet = false; + do + { + CC_BREAK_IF(!Layer::init()); + + Size winSize = Director::getInstance()->getWinSize(); + + Sprite * background = Sprite::create("listviewbg.png"); + background->setScale(2); + m_bgSprite = background; + background->setPosition(Vec2(winSize.width/2,winSize.height/2)); + this->addChild(background); + + Size contentSize = background->getContentSize(); + m_size = contentSize; + + auto item1 = MenuItemLabel::create(Label::create("Accept","fonts/Marker Felt.ttf", 20), CC_CALLBACK_1(PopLayer::yesButton, this)); + auto item2 = MenuItemLabel::create(Label::create("Reject","fonts/Marker Felt.ttf", 20), CC_CALLBACK_1(PopLayer::noButton, this)); + + Menu * menu = Menu::create(item1,item2,NULL); + menu->alignItemsHorizontallyWithPadding(50); + menu->setPosition(Vec2(contentSize.width/2,contentSize.height/3)); + + background->addChild(menu); + + this->setTitle(); + this->setContent(); + + bRet = true; + } + while(0); + + return bRet; +} + +void PopLayer::yesButton(Ref *pSender) +{ + this->removeFromParentAndCleanup(true); + ConnectionInterface::SendInviteResponse(true); + + auto scene = ChatLayer::createScene(); + Director::getInstance()->replaceScene(scene); +} + +void PopLayer::noButton(Ref *pSender) +{ + this->removeFromParentAndCleanup(true); + ConnectionInterface::SendInviteResponse(false); +} + +void PopLayer::setTitle() +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + auto title = Label::create("Earth Warrior invite", "fonts/Marker Felt.ttf", 24); + title->setPosition(Vec2(m_size.width/2,m_size.height-title->getContentSize().height/2)); + m_bgSprite->addChild(title); +#endif +} + +void PopLayer::setContent() +{ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + + auto content = Label::create("Accept connection", "fonts/Marker Felt.ttf",24); + content->setPosition(Vec2(m_size.width/2,m_size.height/2)); + content->setHorizontalAlignment(TextHAlignment::LEFT); + m_bgSprite->addChild(content); +#endif +} \ No newline at end of file diff --git a/samples/HelloCcf/Classes/PopLayer.h b/samples/HelloCcf/Classes/PopLayer.h new file mode 100644 index 0000000..acac1c4 --- /dev/null +++ b/samples/HelloCcf/Classes/PopLayer.h @@ -0,0 +1,32 @@ +// +// PopLayer.h +// HelloCcf +// reference from http://www.zaojiahua.com/popscene.html +// thanks to xiaota +// Created by calf on 14-7-25. +// +// + +#ifndef __HelloCcf__PopLayer__ +#define __HelloCcf__PopLayer__ + +#include "cocos2d.h" + +using namespace cocos2d; + +class PopLayer : public Layer +{ +public: + static Scene * scene(); + bool init(); + CREATE_FUNC(PopLayer); +private: + void yesButton(Ref *pSender); + void noButton(Ref *pSender); + void setTitle(); + void setContent(); + Size m_size; + Sprite * m_bgSprite; +}; + +#endif /* defined(__HelloCcf__PopLayer__) */ diff --git a/samples/HelloCcf/Resources/.DS_Store b/samples/HelloCcf/Resources/.DS_Store new file mode 100644 index 0000000..c60f079 Binary files /dev/null and b/samples/HelloCcf/Resources/.DS_Store differ diff --git a/samples/HelloCcf/Resources/CloseNormal.png b/samples/HelloCcf/Resources/CloseNormal.png new file mode 100644 index 0000000..5657a13 Binary files /dev/null and b/samples/HelloCcf/Resources/CloseNormal.png differ diff --git a/samples/HelloCcf/Resources/CloseSelected.png b/samples/HelloCcf/Resources/CloseSelected.png new file mode 100644 index 0000000..e4c82da Binary files /dev/null and b/samples/HelloCcf/Resources/CloseSelected.png differ diff --git a/samples/HelloCcf/Resources/HelloWorld.png b/samples/HelloCcf/Resources/HelloWorld.png new file mode 100644 index 0000000..5fe89fb Binary files /dev/null and b/samples/HelloCcf/Resources/HelloWorld.png differ diff --git a/samples/HelloCcf/Resources/backtotopnormal.png b/samples/HelloCcf/Resources/backtotopnormal.png new file mode 100644 index 0000000..9f20e33 Binary files /dev/null and b/samples/HelloCcf/Resources/backtotopnormal.png differ diff --git a/samples/HelloCcf/Resources/backtotoppressed.png b/samples/HelloCcf/Resources/backtotoppressed.png new file mode 100644 index 0000000..5fc8d41 Binary files /dev/null and b/samples/HelloCcf/Resources/backtotoppressed.png differ diff --git a/samples/HelloCcf/Resources/fonts/Marker Felt.ttf b/samples/HelloCcf/Resources/fonts/Marker Felt.ttf new file mode 100644 index 0000000..3752ef3 Binary files /dev/null and b/samples/HelloCcf/Resources/fonts/Marker Felt.ttf differ diff --git a/samples/HelloCcf/Resources/listviewbg.png b/samples/HelloCcf/Resources/listviewbg.png new file mode 100644 index 0000000..ddbe14b Binary files /dev/null and b/samples/HelloCcf/Resources/listviewbg.png differ diff --git a/samples/HelloCcf/proj.android/.DS_Store b/samples/HelloCcf/proj.android/.DS_Store new file mode 100644 index 0000000..cf51500 Binary files /dev/null and b/samples/HelloCcf/proj.android/.DS_Store differ diff --git a/samples/HelloCcf/proj.android/.classpath b/samples/HelloCcf/proj.android/.classpath new file mode 100644 index 0000000..98ec187 --- /dev/null +++ b/samples/HelloCcf/proj.android/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/samples/HelloCcf/proj.android/.cproject b/samples/HelloCcf/proj.android/.cproject new file mode 100644 index 0000000..a5e755f --- /dev/null +++ b/samples/HelloCcf/proj.android/.cproject @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/HelloCcf/proj.android/.project b/samples/HelloCcf/proj.android/.project new file mode 100644 index 0000000..68725e8 --- /dev/null +++ b/samples/HelloCcf/proj.android/.project @@ -0,0 +1,127 @@ + + + HelloCcf + + + libcocos2dx + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?children? + ?name?=outputEntries\|?children?=?name?=entry\\\\\\\|\\\|\|| + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.buildArguments + ${ProjDirPath}/build_native.py + + + org.eclipse.cdt.make.core.buildCommand + python + + + org.eclipse.cdt.make.core.buildLocation + ${ProjDirPath} + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + false + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + Classes + 2 + $%7BPARENT-1-PROJECT_LOC%7D/Classes + + + cocos2d + 2 + $%7BPARENT-1-PROJECT_LOC%7D/cocos2d + + + libcocos2d + 2 + PARENT-1-PROJECT_LOC/cocos2d/cocos/2d/platform/android/java/src + + + diff --git a/samples/HelloCcf/proj.android/.settings/org.eclipse.cdt.codan.core.prefs b/samples/HelloCcf/proj.android/.settings/org.eclipse.cdt.codan.core.prefs new file mode 100644 index 0000000..777dc0a --- /dev/null +++ b/samples/HelloCcf/proj.android/.settings/org.eclipse.cdt.codan.core.prefs @@ -0,0 +1,68 @@ +eclipse.preferences.version=1 +org.eclipse.cdt.codan.checkers.errnoreturn=Warning +org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},implicit\=>false} +org.eclipse.cdt.codan.checkers.errreturnvalue=-Error +org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.checkers.noreturn=-Error +org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},implicit\=>false} +org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=-Error +org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=-Error +org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning +org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=-Error +org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning +org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false} +org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning +org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},unknown\=>false,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=-Error +org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=Warning +org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},skip\=>true} +org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=-Error +org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=-Error +org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.InvalidArguments=-Error +org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=-Error +org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=-Error +org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=-Error +org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=-Error +org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info +org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},pattern\=>"^[a-z]",macro\=>true,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning +org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.OverloadProblem=-Error +org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=-Error +org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=-Error +org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning +org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning +org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},paramNot\=>false} +org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning +org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},else\=>false,afterelse\=>false} +org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=-Error +org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning +org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true} +org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning +org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true} +org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning +org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true,exceptions\=>("@(\#)","$Id")} +org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=-Error +org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +useParentScope=false diff --git a/samples/HelloCcf/proj.android/.settings/org.eclipse.cdt.core.prefs b/samples/HelloCcf/proj.android/.settings/org.eclipse.cdt.core.prefs new file mode 100644 index 0000000..f91f6d5 --- /dev/null +++ b/samples/HelloCcf/proj.android/.settings/org.eclipse.cdt.core.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +environment/project/0.1230402123/append=true +environment/project/0.1230402123/appendContributed=true diff --git a/samples/HelloCcf/proj.android/.settings/org.eclipse.ltk.core.refactoring.prefs b/samples/HelloCcf/proj.android/.settings/org.eclipse.ltk.core.refactoring.prefs new file mode 100644 index 0000000..b196c64 --- /dev/null +++ b/samples/HelloCcf/proj.android/.settings/org.eclipse.ltk.core.refactoring.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false diff --git a/samples/HelloCcf/proj.android/AndroidManifest.xml b/samples/HelloCcf/proj.android/AndroidManifest.xml new file mode 100644 index 0000000..9cc0902 --- /dev/null +++ b/samples/HelloCcf/proj.android/AndroidManifest.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/HelloCcf/proj.android/README.md b/samples/HelloCcf/proj.android/README.md new file mode 100644 index 0000000..ff6c443 --- /dev/null +++ b/samples/HelloCcf/proj.android/README.md @@ -0,0 +1,36 @@ +## Prerequisites: + +* Android NDK +* Android SDK **OR** Eclipse ADT Bundle +* Android AVD target installed + +## Building project + +There are two ways of building Android projects. + +1. Eclipse +2. Command Line + +### Import Project in Eclipse + +####Step 1: C/C++ Environment Variable `NDK_ROOT` + +* Eclipse->Preferences->C/C++->Build->**Environment**. +* Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. + ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) +* Only for Windows: Add new variables **CYGWIN** with value `nodosfilewarning` and **SHELLOPTS** with value `igncr` + +####Step 2: Adding and running from Eclipse + +![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) + +1. File->New->Project->Android Project From Existing Code +2. **Browse** to your project directory and Add the project +3. Click **Run as Android Application** to run on connected device or emulator. + +That's all !!! + +### Running project from Command Line + + $ cd NEW_PROJECTS_DIR/MyGame + $ cocos run -p android -j 4 diff --git a/samples/HelloCcf/proj.android/ant.properties b/samples/HelloCcf/proj.android/ant.properties new file mode 100644 index 0000000..b0971e8 --- /dev/null +++ b/samples/HelloCcf/proj.android/ant.properties @@ -0,0 +1,17 @@ +# This file is used to override default values used by the Ant build system. +# +# This file must be checked into Version Control Systems, as it is +# integral to the build system of your project. + +# This file is only used by the Ant script. + +# You can use this to override default values such as +# 'source.dir' for the location of your java source folder and +# 'out.dir' for the location of your output folder. + +# You can also use it define how the release builds are signed by declaring +# the following properties: +# 'key.store' for the location of your keystore and +# 'key.alias' for the name of the key to use. +# The password will be asked during the build when you use the 'release' target. + diff --git a/samples/HelloCcf/proj.android/assets/CloseNormal.png b/samples/HelloCcf/proj.android/assets/CloseNormal.png new file mode 100644 index 0000000..5657a13 Binary files /dev/null and b/samples/HelloCcf/proj.android/assets/CloseNormal.png differ diff --git a/samples/HelloCcf/proj.android/assets/CloseSelected.png b/samples/HelloCcf/proj.android/assets/CloseSelected.png new file mode 100644 index 0000000..e4c82da Binary files /dev/null and b/samples/HelloCcf/proj.android/assets/CloseSelected.png differ diff --git a/samples/HelloCcf/proj.android/assets/HelloWorld.png b/samples/HelloCcf/proj.android/assets/HelloWorld.png new file mode 100644 index 0000000..5fe89fb Binary files /dev/null and b/samples/HelloCcf/proj.android/assets/HelloWorld.png differ diff --git a/samples/HelloCcf/proj.android/assets/backtotopnormal.png b/samples/HelloCcf/proj.android/assets/backtotopnormal.png new file mode 100644 index 0000000..9f20e33 Binary files /dev/null and b/samples/HelloCcf/proj.android/assets/backtotopnormal.png differ diff --git a/samples/HelloCcf/proj.android/assets/backtotoppressed.png b/samples/HelloCcf/proj.android/assets/backtotoppressed.png new file mode 100644 index 0000000..5fc8d41 Binary files /dev/null and b/samples/HelloCcf/proj.android/assets/backtotoppressed.png differ diff --git a/samples/HelloCcf/proj.android/assets/fonts/Marker Felt.ttf b/samples/HelloCcf/proj.android/assets/fonts/Marker Felt.ttf new file mode 100644 index 0000000..3752ef3 Binary files /dev/null and b/samples/HelloCcf/proj.android/assets/fonts/Marker Felt.ttf differ diff --git a/samples/HelloCcf/proj.android/assets/listviewbg.png b/samples/HelloCcf/proj.android/assets/listviewbg.png new file mode 100644 index 0000000..ddbe14b Binary files /dev/null and b/samples/HelloCcf/proj.android/assets/listviewbg.png differ diff --git a/samples/HelloCcf/proj.android/build-cfg.json b/samples/HelloCcf/proj.android/build-cfg.json new file mode 100644 index 0000000..611f232 --- /dev/null +++ b/samples/HelloCcf/proj.android/build-cfg.json @@ -0,0 +1,13 @@ +{ + "ndk_module_path" :[ + "../cocos2d", + "../cocos2d/cocos", + "../cocos2d/external" + ], + "copy_resources": [ + { + "from": "../Resources", + "to": "" + } + ] +} diff --git a/samples/HelloCcf/proj.android/build.xml b/samples/HelloCcf/proj.android/build.xml new file mode 100644 index 0000000..269b988 --- /dev/null +++ b/samples/HelloCcf/proj.android/build.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/HelloCcf/proj.android/build_native.py b/samples/HelloCcf/proj.android/build_native.py new file mode 100755 index 0000000..97c9f89 --- /dev/null +++ b/samples/HelloCcf/proj.android/build_native.py @@ -0,0 +1,159 @@ +#!/usr/bin/python +# build_native.py +# Build native codes + + +import sys +import os, os.path +import shutil +from optparse import OptionParser + +def get_num_of_cpu(): + ''' The build process can be accelerated by running multiple concurrent job processes using the -j-option. + ''' + try: + platform = sys.platform + if platform == 'win32': + if 'NUMBER_OF_PROCESSORS' in os.environ: + return int(os.environ['NUMBER_OF_PROCESSORS']) + else: + return 1 + else: + from numpy.distutils import cpuinfo + return cpuinfo.cpu._getNCPUs() + except Exception: + print "Can't know cpuinfo, use default 1 cpu" + return 1 + +def check_environment_variables_sdk(): + ''' Checking the environment ANDROID_SDK_ROOT, which will be used for building + ''' + + try: + SDK_ROOT = os.environ['ANDROID_SDK_ROOT'] + except Exception: + print "ANDROID_SDK_ROOT not defined. Please define ANDROID_SDK_ROOT in your environment" + sys.exit(1) + + return SDK_ROOT + +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 do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode): + + ndk_path = os.path.join(ndk_root, "ndk-build") + + num_of_cpu = get_num_of_cpu() + + if ndk_build_param == None: + command = '%s -j%d -C %s NDK_DEBUG=%d' % (ndk_path, num_of_cpu, app_android_root, build_mode=='debug') + else: + command = '%s -j%d -C %s NDK_DEBUG=%d %s' % (ndk_path, num_of_cpu, app_android_root, build_mode=='debug', ' '.join(str(e) for e in ndk_build_param)) + if os.system(command) != 0: + raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!") + elif android_platform is not None: + sdk_tool_path = os.path.join(sdk_root, "tools/android") + cocoslib_path = os.path.join(cocos_root, "cocos/platform/android/java") + command = '%s update lib-project -t %s -p %s' % (sdk_tool_path,android_platform,cocoslib_path) + if os.system(command) != 0: + raise Exception("update cocos lib-project [ " + cocoslib_path + " ] fails!") + command = '%s update project -t %s -p %s -s' % (sdk_tool_path,android_platform,app_android_root) + if os.system(command) != 0: + raise Exception("update project [ " + app_android_root + " ] fails!") + buildfile_path = os.path.join(app_android_root, "build.xml") + command = 'ant clean %s -f %s -Dsdk.dir=%s' % (build_mode,buildfile_path,sdk_root) + 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(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 + 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) + +def build(ndk_build_param,android_platform,build_mode): + + ndk_root = check_environment_variables() + sdk_root = None + select_toolchain_version() + + current_dir = os.path.dirname(os.path.realpath(__file__)) + cocos_root = os.path.join(current_dir, "../cocos2d") + + app_android_root = current_dir + copy_resources(app_android_root) + + if android_platform is not None: + sdk_root = check_environment_variables_sdk() + if android_platform.isdigit(): + android_platform = 'android-'+android_platform + else: + print 'please use vaild android platform' + exit(1) + + if build_mode is None: + build_mode = 'debug' + elif build_mode != 'release': + build_mode = 'debug' + + do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode) + +# -------------- main -------------- +if __name__ == '__main__': + + parser = OptionParser() + parser.add_option("-n", "--ndk", dest="ndk_build_param", help='parameter for ndk-build', action="append") + parser.add_option("-p", "--platform", dest="android_platform", + help='parameter for android-update.Without the parameter,the script just build dynamic library for project. Valid android-platform are:[10|11|12|13|14|15|16|17|18|19]') + parser.add_option("-b", "--build", dest="build_mode", + help='the build mode for java project,debug[default] or release.Get more information,please refer to http://developer.android.com/tools/building/building-cmdline.html') + (opts, args) = parser.parse_args() + + build(opts.ndk_build_param,opts.android_platform,opts.build_mode) diff --git a/samples/HelloCcf/proj.android/gen/com/cocos2dx/helloccf/BuildConfig.java b/samples/HelloCcf/proj.android/gen/com/cocos2dx/helloccf/BuildConfig.java new file mode 100644 index 0000000..ecd1400 --- /dev/null +++ b/samples/HelloCcf/proj.android/gen/com/cocos2dx/helloccf/BuildConfig.java @@ -0,0 +1,6 @@ +/** Automatically generated file. DO NOT MODIFY */ +package com.cocos2dx.helloccf; + +public final class BuildConfig { + public final static boolean DEBUG = true; +} \ No newline at end of file diff --git a/samples/HelloCcf/proj.android/gen/com/cocos2dx/helloccf/R.java b/samples/HelloCcf/proj.android/gen/com/cocos2dx/helloccf/R.java new file mode 100644 index 0000000..635307a --- /dev/null +++ b/samples/HelloCcf/proj.android/gen/com/cocos2dx/helloccf/R.java @@ -0,0 +1,29 @@ +/* AUTO-GENERATED FILE. DO NOT MODIFY. + * + * This class was automatically generated by the + * aapt tool from the resource data it found. It + * should not be modified by hand. + */ + +package com.cocos2dx.helloccf; + +public final class R { + public static final class attr { + } + public static final class drawable { + public static final int generic_avatar50x50=0x7f020000; + public static final int icon=0x7f020001; + } + public static final class id { + public static final int deviceName=0x7f050003; + public static final int deviceNameLabel=0x7f050002; + public static final int userName=0x7f050001; + public static final int userNameLabel=0x7f050000; + } + public static final class layout { + public static final int unbox_layout=0x7f030000; + } + public static final class string { + public static final int app_name=0x7f040000; + } +} diff --git a/samples/HelloCcf/proj.android/jni/Android.mk b/samples/HelloCcf/proj.android/jni/Android.mk new file mode 100644 index 0000000..f1af20d --- /dev/null +++ b/samples/HelloCcf/proj.android/jni/Android.mk @@ -0,0 +1,44 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +$(call import-add-path,$(LOCAL_PATH)/../../cocos2d) +$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/external) +$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/cocos) + +LOCAL_MODULE := cocos2dcpp_shared + +LOCAL_MODULE_FILENAME := libcocos2dcpp + +LOCAL_SRC_FILES := hellocpp/main.cpp \ + ../../Classes/AppDelegate.cpp \ + ../../Classes/HelloWorldScene.cpp \ + ../../Classes/ConnectionInterface.cpp \ + ../../Classes/PopLayer.cpp \ + ../../Classes/ChatScene.cpp \ + ../../Classes/PeerButton.cpp + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes + +LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static +LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static + +# LOCAL_WHOLE_STATIC_LIBRARIES += box2d_static +# LOCAL_WHOLE_STATIC_LIBRARIES += cocosbuilder_static +# LOCAL_WHOLE_STATIC_LIBRARIES += spine_static +LOCAL_WHOLE_STATIC_LIBRARIES += cocostudio_static +# LOCAL_WHOLE_STATIC_LIBRARIES += cocos_network_static +# LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static + + +include $(BUILD_SHARED_LIBRARY) + +$(call import-module,.) +$(call import-module,audio/android) + +# $(call import-module,Box2D) +# $(call import-module,editor-support/cocosbuilder) +# $(call import-module,editor-support/spine) +$(call import-module,editor-support/cocostudio) +# $(call import-module,network) +# $(call import-module,extensions) diff --git a/samples/HelloCcf/proj.android/jni/Application.mk b/samples/HelloCcf/proj.android/jni/Application.mk new file mode 100644 index 0000000..a923bf1 --- /dev/null +++ b/samples/HelloCcf/proj.android/jni/Application.mk @@ -0,0 +1,16 @@ +APP_STL := c++_static +NDK_TOOLCHAIN_VERSION=clang +APP_ABI :=armeabi armeabi-v7a x86 + +APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char +APP_LDFLAGS := -latomic + + +APP_DEBUG := $(strip $(NDK_DEBUG)) +ifeq ($(APP_DEBUG),1) + APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 + APP_OPTIM := debug +else + APP_CPPFLAGS += -DNDEBUG + APP_OPTIM := release +endif \ No newline at end of file diff --git a/samples/HelloCcf/proj.android/jni/JNIMediator.cpp b/samples/HelloCcf/proj.android/jni/JNIMediator.cpp new file mode 100755 index 0000000..fa8b2b7 --- /dev/null +++ b/samples/HelloCcf/proj.android/jni/JNIMediator.cpp @@ -0,0 +1,976 @@ +#include +#include "com_intel_csdk_wrapper_JNIMediator.h" +#include "STC_RESULTS.h" +#include +#include +#include "include/STCAPI.h" +#include "include/osal.h" +#include +#include +#include +#include +#include +#include "include/uuid.h" +#include + +#define STC_INVITE_STATUS_DISCONNECTED 25 + + + + +typedef struct BLAH { + JavaVM *jvm; + jobject jobj; + jclass jclazz; + int responseLength; +}jniStruct; + +/// Structure to have all the Peer Device information +typedef struct SESSION { + STCSessionUpdate info; + int responseLength; +} session; + +static session s_sessions[100]; +static session s_localSession; +static std::string s_applicationId; +static std::string s_myClientId; +static STCApplicationId* applicationId; +static STC_HANDLE s_sdkHandle; + +static jniStruct s_jni_struct = {0}; +static int s_sock = STC_INVALID_SOCKET; +static bool s_IsUnboxed = false; + + +void RegisterLocalSession(); +// start Callback function used in CCF +void CALLBACK onInviteRequestCallback(PSTCInviteRequest message, PVOID callbackArg); +void CALLBACK onPeerUpdateCallback(PSTCSessionUpdate update, PVOID callbackArg); +void CALLBACK onLocalSessionUpdateCallback(PSTCSessionUpdate update, PVOID callbackArg); +void CALLBACK onInviteCompleteCallback(PSTCInviteComplete message, PVOID callbackArg); +void CALLBACK onStreamEventUpdateCallback(PSTCStreamEvent message, PVOID callbackArg); +void CALLBACK onNodeUpdate(PSTCDiscoveryNodeCredentialsUpdate Update, PVOID callbackArg); +// End of callback function used in CCF + + +/* + * Class: com_intel_csdk_JNILayer + * Method: STCInit + * Signature: ([JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)J + */ + +/* +extern "C" JNIEXPORT jlong JNICALL Java_com_intel_csdk_JNILayer_STCInit +(JNIEnv *env, jobject obj, jlongArray inSdkHandle, jstring inOriginPath, jstring inUuid, jstring inClientId, jstring inClientSecret) +*/ + +extern "C" JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeInit + (JNIEnv *env, jobject obj, jstring inOriginPath, jstring inUuid, jstring inClientId, jstring inClientSecret) +{ + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Entering JNIMediator_nativeInit"); + env->GetJavaVM(&s_jni_struct.jvm); + s_jni_struct.jobj = reinterpret_cast(env->NewGlobalRef(obj)); + jclass clazz =env->FindClass("com/intel/csdk/wrapper/JNIMediator"); + s_jni_struct.jclazz = reinterpret_cast(env->NewGlobalRef(clazz)); + int hResult = 0; + if (!inUuid || !inClientId || !inClientSecret) + { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Error in Argument"); + return -10; + } + +/**Allocating J parameters to C parameters**/ + const char* strOriginPath = (*env).GetStringUTFChars(inOriginPath, NULL);///Need to set the path of the app + const char* strUUID = (*env).GetStringUTFChars(inUuid, NULL); //Appliaction ID + const char* strClientId = (*env).GetStringUTFChars(inClientId, NULL); //Client ID + const char* strClientSecret = (*env).GetStringUTFChars(inClientSecret, NULL); //Client Secret + int iconSize = 10; + + GUID myApplicationId; + StringToUuid(strUUID, &myApplicationId); + + STCApplicationId ApplicationId = {0}; + ApplicationId.applicationId = myApplicationId; + strcpy(ApplicationId.clientId, strClientId); + strcpy(ApplicationId.clientSecret, strClientSecret); + + ApplicationId.applicationIconFormat = 0; + ApplicationId.applicationIconSize = iconSize; + ApplicationId.numPlayers = 2; + strcpy(ApplicationId.applicationName, "NativeChat"); + strcpy(ApplicationId.applicationDescription, "Chat using C SDK in Android"); + strcpy(ApplicationId.inviteIntent, "com.intel.stc.csdk.wrapper.JNIMediator"); + strcpy(ApplicationId.launchActivity, "com.intel.stc.csdk.JNIMediator"); +/**Finished allocating J parameters to C parameters**/ + + hResult = STCInitialize(strOriginPath,&s_sdkHandle, ApplicationId, 0); + if(hResult==0) + { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Initialize success: STCInit()"); + hResult = STCQueryUnboxedState(s_sdkHandle,&s_IsUnboxed) ; + if(hResult == 0){ + if(s_IsUnboxed) + { +// Calling Java : Providing info stating Unboxing is Done + jmethodID methodID = env->GetMethodID(clazz,"requestIdentityDetails","(Z)V"); + env->CallVoidMethod(obj,methodID,false); + RegisterLocalSession(); + + } + else + { + + jmethodID methodID = env->GetMethodID(clazz,"requestIdentityDetails","(Z)V"); + env->CallVoidMethod(obj,methodID,true); + //call java RequestforIdentitydetails(true); Requesting for identity details + + } + }else + { + std::stringstream logdata; + logdata << "[Nativechat] STCQueryUnboxedState Fail hResult: "<< hResult; + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG,logdata.str().c_str() ); + } + + } + else + { + std::stringstream logdata; + logdata << "[Nativechat] Initialize Fail hResult: "<< hResult; + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG,logdata.str().c_str() ); + } + + return hResult; + +} + +//Register the function which will provided details for onLocalSessionUpdateCallback +void RegisterLocalSession() +{ + int stcResult= STC_SUCCESS; + + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Calling STCSetLocalSessionUpdateCallback"); + stcResult = STCSetLocalSessionInfoCallback(s_sdkHandle, onLocalSessionUpdateCallback, (PVOID)&s_jni_struct); + if(stcResult==0) + { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Registering LocalSession Success"); + }else + { + std::stringstream logdata; + logdata << "[Nativechat] STCSetLocalSessionUpdateCallback Fail hResult: "<< stcResult; + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG,logdata.str().c_str() ); + + } +} + +/* + * Class: com_intel_csdk_ApplicationService_JNIMediator + * Method: nativeIdentity + * Signature: (Ljava/lang/String;Ljava/lang/String;[B)J + */ +// +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeIdentity + (JNIEnv *env, jobject obj, jstring userName, jstring deviceName, jbyteArray avatar, jint size) +{ + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] nativeIdentity started"); + std::stringstream logdata; + int stcResult= STC_SUCCESS; + Byte_t *PtrAvatar; + int AvatarSize = 1024; + const char* strUserName = (*env).GetStringUTFChars(userName, NULL); //UserName + const char* strDeviceName = (*env).GetStringUTFChars(deviceName, NULL); //DeviceName + PtrAvatar = (Byte_t*)malloc(size); + DWORD avatarSize = (env)->GetArrayLength (avatar); + PBYTE buf = new BYTE[avatarSize]; + (env)->GetByteArrayRegion (avatar, 0, avatarSize, reinterpret_cast(buf)); + + stcResult = STCSetUserName(s_sdkHandle, strUserName); + if(stcResult==STC_SUCCESS) + { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Calling STCSetDeviceName"); + stcResult = STCSetDeviceName(s_sdkHandle, strDeviceName); + if(stcResult==STC_SUCCESS) + { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Calling STCSetAvatar"); + stcResult = STCSetAvatar(s_sdkHandle, avatarSize,0, buf); + if(!s_IsUnboxed) + { + RegisterLocalSession(); + s_IsUnboxed = true; + } + } + } + + if(stcResult!=STC_SUCCESS) + { + + logdata << "[Nativechat] Error in Setting Identity hResult: "<< stcResult; + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG,logdata.str().c_str() ); + } + + +} + +// Function called when It is registered to STCSetSessionUpdateCallback() +// Notify the application change status of all the remote system which are connected +void CALLBACK onPeerUpdateCallback(PSTCSessionUpdate update, PVOID callbackArg) +{ + bool attached = false; + std::stringstream logdata; + logdata << "[Nativechat] Entering onPeerUpdateCallback UserName: "<< update->szUserName; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG,logdata.str().c_str() ); + jniStruct js_cb = {0};// To call the JNI class + js_cb = *((jniStruct*)callbackArg); + if(!js_cb.jvm) return; + JNIEnv *myEnv = NULL; + int retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal == JNI_EDETACHED) { + retVal = js_cb.jvm->AttachCurrentThread(&myEnv, NULL); + if(retVal != JNI_OK) { + return; + } + if(retVal == JNI_OK) { + attached = true; + retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal != JNI_OK) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to getEnv after attaching to JVM."); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Attached thread to JVM"); + } + } + else if(retVal == JNI_OK) { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Already attached thread to JVM"); + } + else if(retVal == JNI_EVERSION) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Wrong version of JNI to attach to JVM"); + } + else if(retVal == JNI_ERR) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] JNI Error"); + } + if(!myEnv) return; + //Setting Calling Java Function " onPeerDiscovery" name + jmethodID methodId = myEnv->GetMethodID(js_cb.jclazz, "onPeerDiscovery","(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[B[Ljava/lang/Object;ZZZ)V"); + //(UUID,USERNAME,DEVICENAME,Avatar,AppliationIDs,isAvailable,isAvailableCloud,isAvailableProximity); + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "Setting Calling Java Function :sessionUpdate name"); + if(update) { + jstring jUserName = myEnv->NewStringUTF(std::string(update->szUserName).c_str()); + jstring jDeviceName = myEnv->NewStringUTF(std::string(update->szSessionName).c_str()); + jstring jSessionId = myEnv->NewStringUTF(UuidToString(update->sessionId).c_str()); + jint jAvatarLength = update->avatarSize; + jobjectArray jMessageArray; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "Setting values from update coming from CCF Framework"); + jbyteArray jAvatar = myEnv->NewByteArray(update->avatarSize); + jMessageArray = (jobjectArray)myEnv->NewObjectArray(update->applicationCount, myEnv->FindClass("java/lang/String"), myEnv->NewStringUTF("")); + for(int i=0; iapplicationCount; i++) { + myEnv->SetObjectArrayElement(jMessageArray, i, myEnv->NewStringUTF(UuidToString(update->applications[i]).c_str())); + } + myEnv->SetByteArrayRegion(jAvatar, 0, update->avatarSize, (jbyte*)update->avatar); + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Sending sessionUpdate to Java layer of application."); + myEnv->CallVoidMethod(js_cb.jobj, methodId,jSessionId, jUserName, jDeviceName,jAvatar,jMessageArray,update->isAvailable,update->isAvailableCloud,update->isAvailableProximity); + + } + if(attached) retVal = js_cb.jvm->DetachCurrentThread(); + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] sessionUpdate completed."); +} + +void CALLBACK onLocalSessionUpdateCallback(PSTCSessionUpdate update, PVOID callbackArg) +{ + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Callback update localSessionUpdateCallback"); +} + +extern "C" JNIEXPORT jlong JNICALL Java_com_intel_csdk_JNILayer_STCCleanup + (JNIEnv *env, jobject obj, jlong){ + +} +//Function called when it is registered to STCListenForInvites() +// Receives the Invite Request from the Remote systems +// Sends the responds to the remote system stating accepting the connection + +void CALLBACK onInviteRequestCallback(PSTCInviteRequest message, PVOID callbackArg) +{ + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Entering inviteRequestCallback()"); + + int sTemp = STC_INVALID_SOCKET; + if(s_sock != sTemp){ + std::stringstream logdata; + STC_RESULT stcResult = STC_SUCCESS; + HSTCINVITE hInvite = message->hInvite; + bool temp = false; + stcResult = STCSendInviteResponse(s_sdkHandle,hInvite,temp); + if(stcResult != STC_SUCCESS){ + logdata << "[Nativechat] onInviteRequestCallback --> invitation rejected due to existing connection. "<GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal == JNI_EDETACHED) { + retVal = js_cb.jvm->AttachCurrentThread(&myEnv, NULL); + if(retVal != JNI_OK) { + return; + } + if(retVal == JNI_OK) { + attached = true; + retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal != JNI_OK) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to getEnv after attaching to JVM."); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Attached thread to JVM"); + } + } + else if(retVal == JNI_OK) { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Already attached thread to JVM"); + } + else if(retVal == JNI_EVERSION) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Wrong version of JNI to attach to JVM"); + } + else if(retVal == JNI_ERR) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] JNI Error"); + } + if(!myEnv) return; + jmethodID methodId = myEnv->GetMethodID(js_cb.jclazz, "onInvitationReceived", "(Ljava/lang/String;J)V"); + + if(message) { + jstring jSessionId = myEnv->NewStringUTF(UuidToString(message->sessionId).c_str()); + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Sending invite to Java layer of application."); + // calling java function onInvitationReceived + myEnv->CallVoidMethod(js_cb.jobj, methodId, jSessionId, message->hInvite); + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] invite sent"); + } + else { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Invite associated with session is NULL."); + } + if(attached) retVal = js_cb.jvm->DetachCurrentThread(); + if(retVal != JNI_OK && attached) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to detach thread from JVM"); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Returning from inviteRequestCallback()"); +} + +//Updating the application regarding the status of Peer connection. +void sendToJavaChat(std::string message) { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, std::string("[Nativechat] Received Message: " + message).c_str()); + jniStruct js_cb = s_jni_struct; + bool attached = false; + if(!js_cb.jvm) return; + JNIEnv *myEnv = NULL; + int retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal == JNI_EDETACHED) { + retVal = js_cb.jvm->AttachCurrentThread(&myEnv, NULL); + if(retVal != JNI_OK) { + return; + } + if(retVal == JNI_OK) { + attached = true; + retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal != JNI_OK) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to getEnv after attaching to JVM."); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Attached thread to JVM"); + } + } + else if(retVal == JNI_OK) { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Already attached thread to JVM"); + } + else if(retVal == JNI_EVERSION) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Wrong version of JNI to attach to JVM"); + } + else if(retVal == JNI_ERR) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] JNI Error"); + } + if(!myEnv) return; + jstring jMessage = myEnv->NewStringUTF(message.c_str()); + jmethodID methodId = myEnv->GetMethodID(js_cb.jclazz, "peerConnectionStatus", "(Ljava/lang/String;J)V"); + jlong temp = 25; + myEnv->CallVoidMethod(js_cb.jobj, methodId, jMessage, temp); + if(attached) retVal = js_cb.jvm->DetachCurrentThread(); + if(retVal != JNI_OK && attached) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to detach thread from JVM"); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] remote session disconnected"); +} + +//Receiving the text data from the remote user and sending it to the Application +void sendMessageToApp( std::string message) { + jniStruct js_cb = s_jni_struct; + + bool attached = false; + if(!js_cb.jvm) return; + JNIEnv *myEnv = NULL; + int retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal == JNI_EDETACHED) { + retVal = js_cb.jvm->AttachCurrentThread(&myEnv, NULL); + if(retVal != JNI_OK) { + return; + } + if(retVal == JNI_OK) { + attached = true; + retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal != JNI_OK) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to getEnv after attaching to JVM."); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Attached thread to JVM"); + } + } + else if(retVal == JNI_OK) { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Already attached thread to JVM"); + } + else if(retVal == JNI_EVERSION) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Wrong version of JNI to attach to JVM"); + } + else if(retVal == JNI_ERR) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] JNI Error"); + } + if(!myEnv) return; + + jstring jMessage = myEnv->NewStringUTF(message.c_str()); + jmethodID methodId = myEnv->GetMethodID(js_cb.jclazz, "onReceiveMsg", "(Ljava/lang/String;)V"); + myEnv->CallVoidMethod(js_cb.jobj, methodId, jMessage); + if(attached) retVal = js_cb.jvm->DetachCurrentThread(); + if(retVal != JNI_OK && attached) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to detach thread from JVM"); + } +} + +//Thread which will receive the chat text provided by remote user + +void recvChat() { + + +__android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] onReceiveMsg sent"); + + std::string local = ""; + char buffer[256] = {0}; + int bytesRead = recv(s_sock, buffer, sizeof(buffer)-1, 0); + while(bytesRead > 0) { + + std::stringstream logdata; + logdata << "[Nativechat] Chat Receive text : invitation to: " << buffer; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, logdata.str().c_str()); + sendMessageToApp(buffer); + + if( buffer[bytesRead-1] == -1) { + sendToJavaChat("Lost connection"); + break; + } + ::memset(&buffer, 0, 256); + bytesRead = recv(s_sock, buffer, sizeof(buffer)-1, 0); + } + + if(bytesRead <= 0) { + sendToJavaChat("Remote User left the conversation"); + + } + else { + sendToJavaChat("Socket connection has been disconnected."); + + } + + + s_sock = STC_INVALID_SOCKET; +} + +// Function called when It is registered to STCSetInviteCallback +//Functioned called When the connection handshake is completed and the application is now ready to communicate with the remote device +void CALLBACK onInviteCompleteCallback(PSTCInviteComplete message, PVOID callbackArg) +{ + + std::stringstream logdata; + logdata << "[Nativechat] inviteCompleteCallback : invitation to: " << message->statusCode; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, logdata.str().c_str()); + // Creating socket only when statucode is INVITE_COMPLETE or INVITE_ACCEPTED + if(message->statusCode == STC_INVITE_STATUS_INVITE_COMPLETE || message->statusCode == STC_INVITE_STATUS_INVITE_ACCEPTED) { + STC_RESULT stcResult = STC_SUCCESS; + if(STC_SUCCESS == (stcResult = STCConnectSocket(message->sdkHandle, &s_sock, message->hStream))) { + + std::thread mythread(recvChat); + mythread.detach(); + logdata.str(""); + logdata << "Called STCConnectSocket() with: SockRet= " << s_sock << " sdkHandle= " << message->sdkHandle << " hStream= " << message->hStream; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, std::string("[Nativechat] " + logdata.str()).c_str() ); + } + }// end of Creating socket + jniStruct js_cb = {0}; + js_cb = *((jniStruct*)callbackArg); + bool attached = false; + if(!js_cb.jvm) return; + JNIEnv *myEnv = NULL; + int retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal == JNI_EDETACHED) { + retVal = js_cb.jvm->AttachCurrentThread(&myEnv, NULL); + if(retVal != JNI_OK) { + return; + } + if(retVal == JNI_OK) { + attached = true; + retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal != JNI_OK) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to getEnv after attaching to JVM."); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Attached thread to JVM"); + } + } + else if(retVal == JNI_OK) { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Already attached thread to JVM"); + } + else if(retVal == JNI_EVERSION) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Wrong version of JNI to attach to JVM"); + } + else if(retVal == JNI_ERR) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] JNI Error"); + } + if(!myEnv) return; + jstring jSessionId = myEnv->NewStringUTF(UuidToString(message->sessionId).c_str()); + jmethodID methodId = myEnv->GetMethodID(js_cb.jclazz, "peerConnectionStatus", "(Ljava/lang/String;J)V"); + myEnv->CallVoidMethod(js_cb.jobj, methodId, jSessionId, message->statusCode); + if(attached) retVal = js_cb.jvm->DetachCurrentThread(); + if(retVal != JNI_OK && attached) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to detach thread from JVM"); + } + // Tell java land to go to chat view. +__android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Returning from inviteCompleteCallback()"); + +} + + +void CALLBACK onStreamEventUpdateCallback(PSTCStreamEvent message, PVOID callbackArg) +{ + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Callback update streamEventUpdateCallback"); +} + +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativePeerInvitation + * Signature: (Ljava/lang/String;)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativePeerInvitation + (JNIEnv *env, jobject obj, jstring sessionId) +{ + std::stringstream logdata; + const char* strUUID = (*env).GetStringUTFChars(sessionId, NULL); + STC_RESULT stcResult = STC_SUCCESS; + HSTCINVITE hInvite; + GUID remoteSessionId; + StringToUuid(strUUID, &remoteSessionId); + GUID myApplicationId; + StringToUuid(s_applicationId.c_str(), &myApplicationId); + int timeout = 60;//60 sec + + logdata << "[Nativechat] Sending invitation to: " << strUUID; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, logdata.str().c_str()); + + char* myData = "NATIVE CHAT BLOB"; + stcResult = STCSendInviteRequestEx((STC_HANDLE)s_sdkHandle, &hInvite, remoteSessionId, myApplicationId, timeout, (BYTE*)myData, strlen(myData)); + if(stcResult == STC_SUCCESS) { + logdata << "[Nativechat] invitation Send Sucessfuly to : " << strUUID; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, logdata.str().c_str()); + } + else + { + logdata << "[Nativechat] invitation Send failed to : " <ReleaseStringUTFChars(sessionId, strUUID); + return stcResult; +} + + +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativeInviteStatus + * Signature: (Ljava/util/UUID;Z)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeInviteStatus + (JNIEnv *env, jobject obj,jstring string, jlong handle, jboolean IsconnectionStatus){ + std::stringstream logdata; + STC_RESULT stcResult = STC_SUCCESS; + HSTCINVITE hInvite = handle; + stcResult = STCSendInviteResponse(s_sdkHandle,hInvite,IsconnectionStatus); + if(stcResult == STC_SUCCESS) + { + logdata << "[Nativechat] STCSendInviteResponse Return value : "<ReleaseStringUTFChars(chattext, strMessage); + return sent; +} + +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeDisconnectPeer + (JNIEnv *env, jobject obj, jobject jobj){ + + std::stringstream logdata; + int retval = shutdown(s_sock,SHUT_RDWR); + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "CLosing the socket connection"); + logdata << "[Nativechat] CLosing the socket connection Return value : "<GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal == JNI_EDETACHED) { + retVal = js_cb.jvm->AttachCurrentThread(&myEnv, NULL); + if(retVal != JNI_OK) { + return; + } + if(retVal == JNI_OK) { + attached = true; + retVal = js_cb.jvm->GetEnv((void**)&myEnv, JNI_VERSION_1_6); + if(retVal != JNI_OK) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to getEnv after attaching to JVM."); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] NodePublishStatus Attached thread to JVM"); + } + } + else if(retVal == JNI_OK) { + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Already attached thread to JVM"); + } + else if(retVal == JNI_EVERSION) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Wrong version of JNI to attach to JVM"); + } + else if(retVal == JNI_ERR) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] JNI Error"); + } + if(!myEnv) return; + jstring jMessage = myEnv->NewStringUTF(Nodename.c_str()); + jmethodID methodId = myEnv->GetMethodID(js_cb.jclazz, "nodeStatusUpdates", "(Ljava/lang/String;I)V"); + + myEnv->CallVoidMethod(js_cb.jobj, methodId, jMessage, publishtype); + if(attached) retVal = js_cb.jvm->DetachCurrentThread(); + if(retVal != JNI_OK && attached) { + __android_log_write(ANDROID_LOG_ERROR, CSDK_TAG, "[Nativechat] Failed to detach thread from JVM"); + } + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, "[Nativechat] Send nodeStatusUpdates to Android"); + +} +void JoinNode(std::string Nodename) +{ + std::stringstream logdata; + int stcResult= STC_SUCCESS; + DWORD ServiceStatus; + stcResult = STCQueryDiscoveryNodeServiceStatus(s_sdkHandle, &ServiceStatus); + if(stcResult == S_OK) + { + if(ServiceStatus==STC_SERVICESTATUS_SERVICEONLINE) + { + DWORD SubscriptionResult =0 ; + STCDiscoveryNodeCredentials nodedetails={0}; + GUID myApplicationId; + StringToUuid(s_applicationId.c_str(), &myApplicationId); + nodedetails.nodeFlags = STC_NODE_TYPE_PUBLISH; + nodedetails.applicationId = myApplicationId; +// const char* nodeName = (*env).GetStringUTFChars(node, NULL); //Nodename + strcpy(nodedetails.data,Nodename.c_str()); + logdata << "[Nativechat] Cloud Service is online --> Joining node ---------->1 : "< Joining node ---------->2 : "<discoveryNodeCredentials.data<<" the lasterror:"<lastError<<" The satus :"<status; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, logdata.str().c_str()); + + switch(Update->lastError) + { + case STC_NODE_ERROR_NOERROR: + { + switch(Update->status) + { + + case STC_DISCOVERYNODESTATUS_PUBLISHED : + {// Add the node name into the list + char Nodename[1024]; + strcpy(Nodename,Update->discoveryNodeCredentials.data); + std::string strNodename(Nodename); + NodePublishStatus(STC_DISCOVERYNODESTATUS_PUBLISHED,strNodename); + return; + + } + + case STC_DISCOVERYNODESTATUS_DELETED : + { + char Nodename[1024]; + strcpy(Nodename,Update->discoveryNodeCredentials.data); + std::string strNodename(Nodename); + NodePublishStatus(STC_DISCOVERYNODESTATUS_DELETED,strNodename); + break; + } + + }//End of switch Update->status + + break; + } + case STC_NODE_ERROR_NODEEXISTS: + { +// CString msg; +// msg.Format(L" The node %s trying to be created already exists.",convertFromUTF8(Update->discoveryNodeCredentials.data).c_str()); +// ::MessageBox(Local_Hwnd_dlg,msg,L"File Transfer",MB_OK); + // Removing the Node from the list + logdata << "[Nativechat] The node "<< Update->discoveryNodeCredentials.data<<" created already : Please join the node"; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, logdata.str().c_str()); + + char Nodename[1024]; + strcpy(Nodename,Update->discoveryNodeCredentials.data); + JoinNode(Nodename); + break; + } + case STC_NODE_ERROR_NODENOTFOUND: + { +// CString msg; +// msg.Format(L" The node %s does not exist.Please create the node",convertFromUTF8(Update->discoveryNodeCredentials.data).c_str()); +// ::MessageBox(Local_Hwnd_dlg,msg,L"File Transfer",MB_OK); + + + logdata << "[Nativechat] The node "<< Update->discoveryNodeCredentials.data<<" doesnt exist Please create the node"; + __android_log_write(ANDROID_LOG_INFO, CSDK_TAG, logdata.str().c_str()); + // Removing the Node from the list + break; + } + case STC_NODE_ERROR_INSUFFICIENTPRIVILEGES://Insufficient privileges. + case STC_NODE_ERROR_INTERNALERROR:// The process performed on the node has experienced an internal error. If the problem persists, please contact a member of the CCF team. + case STC_NODE_ERROR_UNKNOWNERROR ://The process performed on the node has experienced an unknown error. If the problem persists, please contact a member of the CCF team. + break; + } + +} + + + +JNIEXPORT jint JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeConnectNode + (JNIEnv *env, jobject obj, jstring node, jboolean visible){ + std::stringstream logdata; + int stcResult= STC_SUCCESS; + DWORD ServiceStatus; + + stcResult = STCQueryDiscoveryNodeServiceStatus(s_sdkHandle, &ServiceStatus); + if(stcResult == S_OK) + { + if(ServiceStatus==STC_SERVICESTATUS_SERVICEONLINE) + { + + STCDiscoveryNodeCredentials nodedetails={0}; + GUID myApplicationId; + StringToUuid(s_applicationId.c_str(), &myApplicationId); + nodedetails.nodeFlags = STC_NODE_TYPE_PUBLISH; + nodedetails.applicationId = myApplicationId; + const char* nodeName = (*env).GetStringUTFChars(node, NULL); //Nodename + strcpy(nodedetails.data,nodeName); + logdata << "[Nativechat] Cloud Service is online --> Creating node "< Leaving node "< +#define CSDK_TAG "C_NativeChat" + +#endif +#endif /* STC_RESULTS_H_ */ diff --git a/samples/HelloCcf/proj.android/jni/com_intel_csdk_wrapper_JNIMediator.h b/samples/HelloCcf/proj.android/jni/com_intel_csdk_wrapper_JNIMediator.h new file mode 100755 index 0000000..f522934 --- /dev/null +++ b/samples/HelloCcf/proj.android/jni/com_intel_csdk_wrapper_JNIMediator.h @@ -0,0 +1,93 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class com_intel_csdk_wrapper_JNIMediator */ +typedef enum +{ +STC_ERROR_WIFI_NOT_AVAILABLE = -5, +STC_ERROR_BLUETOOTH_NOT_AVAILABLE, +STC_ERROR_INTERNET_NOT_AVAILABLE, +STC_ERROR_APPLICATION_ID, +STC_ERROR_CLIENT_ID, +STC_ERROR_CLIENT_SECRET, +STC_ERROR_ARGUMENT_ERROR, +STC_ERROR_INITIALIZE_FAIL, +STC_ERROR_DISCOVERU_FAIL, +}StcError; + +#ifndef _Included_com_intel_csdk_wrapper_JNIMediator +#define _Included_com_intel_csdk_wrapper_JNIMediator +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativeInit + * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeInit + (JNIEnv *, jobject, jstring, jstring, jstring, jstring); + +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativeIdentity + * Signature: (Ljava/lang/String;Ljava/lang/String;[B)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeIdentity + (JNIEnv *, jobject, jstring, jstring, jbyteArray,jint); + +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativePeerInvitation + * Signature: (Ljava/lang/String;)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativePeerInvitation + (JNIEnv *, jobject, jstring); + +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativeInviteStatus + * Signature: (Ljava/util/UUID;Z)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeInviteStatus + (JNIEnv *, jobject, jstring, jlong, jboolean); + +/* + * Class: com_intel_csdk_wrappjlonger_JNIMediator + * Method: nativeSendMsg + * Signature: (Ljava/lang/String;)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeSendMsg + (JNIEnv *, jobject, jstring); + +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativeDisconnectPeer + * Signature: (Ljava/util/UUID;)J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeDisconnectPeer + (JNIEnv *, jobject, jobject); + +/* + * Class: com_intel_csdk_wrapper_JNIMediator + * Method: nativeDestroyConnection + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeDestroyConnection + (JNIEnv *, jobject); + +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeRegisterDiscovery(); + +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeRegisterCommunication(); + +JNIEXPORT jint JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeConnectNode + (JNIEnv *, jobject, jstring, jboolean); + +JNIEXPORT jint JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeDisconnectNode + (JNIEnv *, jobject, jstring); + +JNIEXPORT jlong JNICALL Java_com_intel_csdk_wrapper_JNIMediator_nativeQueryCloudStatus(); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/samples/HelloCcf/proj.android/jni/hellocpp/main.cpp b/samples/HelloCcf/proj.android/jni/hellocpp/main.cpp new file mode 100644 index 0000000..171b73f --- /dev/null +++ b/samples/HelloCcf/proj.android/jni/hellocpp/main.cpp @@ -0,0 +1,99 @@ +#include "AppDelegate.h" +#include "cocos2d.h" +#include "platform/android/jni/JniHelper.h" +#include "ConnectionInterface.h" +#include +#include + +#define LOG_TAG "main" +#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__) + +using namespace cocos2d; + +void cocos_android_app_init (JNIEnv* env, jobject thiz) { + LOGD("cocos_android_app_init"); + AppDelegate *pAppDelegate = new AppDelegate(); +} + +extern "C" { + void Java_com_intel_csdk_wrapper_JNIMediator_nativePeerAdd(JNIEnv* env, jobject thiz, jobject obj_peer){ + LOGD("Java_com_intel_csdk_wrapper_JNIMediator_nativePeerAdd"); + + jclass peer_cls = env->GetObjectClass(obj_peer); + + jfieldID nameFieldID = env->GetFieldID(peer_cls,"_sessionName","Ljava/lang/String;"); + jfieldID idFieldID = env->GetFieldID(peer_cls,"_sessionId","Ljava/lang/String;"); + jfieldID idAviabileID = env->GetFieldID(peer_cls,"_availability","Z"); + jfieldID idCloudID = env->GetFieldID(peer_cls,"_availability_cloud","Z"); + jfieldID idProximityID = env->GetFieldID(peer_cls,"_availability_proximity","Z"); + + jstring sessionName = (jstring)env->GetObjectField(obj_peer , nameFieldID); + jstring sessionId = (jstring)env->GetObjectField(obj_peer , idFieldID); + + const char * c_name = env->GetStringUTFChars(sessionName ,NULL);//ת char * + const char * c_id = env->GetStringUTFChars(sessionId ,NULL);//ת char * + + tagPEER jniPeer; + jniPeer._sessionName = c_name; + jniPeer._sessionId = c_id; + jniPeer._availability = env->GetObjectField(obj_peer, idAviabileID); + jniPeer._availability_cloud = env->GetObjectField(obj_peer, idCloudID); + jniPeer._availability_proximity = env->GetObjectField(obj_peer, idProximityID); + jniPeer.add = true; + + ConnectionInterface::OnPeerUpdate(jniPeer); + + env->ReleaseStringUTFChars(sessionName, c_name); //ͷ + env->ReleaseStringUTFChars(sessionId, c_id); //ͷ + } + + void Java_com_intel_csdk_wrapper_JNIMediator_nativePeerRemove(JNIEnv* env, jobject thiz, jobject obj_peer){ + LOGD("Java_com_intel_csdk_wrapper_JNIMediator_nativePeerRemove"); + + jclass peer_cls = env->GetObjectClass(obj_peer); + + jfieldID nameFieldID = env->GetFieldID(peer_cls,"_sessionName","Ljava/lang/String;"); //get sessionName + jfieldID idFieldID = env->GetFieldID(peer_cls,"_sessionId","Ljava/lang/String;"); //get sessionId + + jstring sessionName = (jstring)env->GetObjectField(obj_peer , nameFieldID); + jstring sessionId = (jstring)env->GetObjectField(obj_peer , idFieldID); + + const char * c_name = env->GetStringUTFChars(sessionName ,NULL);//ת char * + const char * c_id = env->GetStringUTFChars(sessionId ,NULL);//ת char * + + tagPEER jniPeer; + jniPeer._sessionName = c_name; + jniPeer._sessionId = c_id; + jniPeer.add = false; + + ConnectionInterface::OnPeerUpdate(jniPeer); + + env->ReleaseStringUTFChars(sessionName, c_name); //ͷ + env->ReleaseStringUTFChars(sessionId, c_id); //ͷ + } + + void Java_com_intel_csdk_wrapper_JNIMediator_nativeInvite(JNIEnv* env, jobject thiz, jstring peerID){ + const char *cId = env->GetStringUTFChars(peerID, NULL); + LOGD("Java_com_intel_csdk_wrapper_JNIMediator_nativeInvite sessionName:%s", cId); + ConnectionInterface::OnReciveInvite(cId); + env->ReleaseStringUTFChars(peerID, cId); + } + + void Java_com_intel_csdk_wrapper_JNIMediator_nativeReceiveMsg(JNIEnv* env, jobject thiz, jstring msg){ + const char *cMsg = env->GetStringUTFChars(msg, NULL); + LOGD("Java_com_intel_csdk_wrapper_JNIMediator_nativeReceiveMsg :%s", cMsg); + ConnectionInterface::OnReceiveMessage(cMsg); + env->ReleaseStringUTFChars(msg, cMsg); + + } + + void Java_com_intel_csdk_wrapper_JNIMediator_nativeInviteAcknowledgment(JNIEnv* env, jobject thiz){ + LOGD("Java_com_intel_csdk_wrapper_JNIMediator_nativeInviteAcknowledgment"); + ConnectionInterface::OnAcknowledgment(); + } + + void Java_com_intel_csdk_wrapper_JNIMediator_nativeDisconnect(JNIEnv* env, jobject thiz){ + LOGD("Java_com_intel_csdk_wrapper_JNIMediator_nativeDisconnect"); + ConnectionInterface::OnDisconnect(); + } +} diff --git a/samples/HelloCcf/proj.android/jni/include/compatibility.h b/samples/HelloCcf/proj.android/jni/include/compatibility.h new file mode 100755 index 0000000..c5cac9b --- /dev/null +++ b/samples/HelloCcf/proj.android/jni/include/compatibility.h @@ -0,0 +1,285 @@ +//****************************************************************** +// +// Copyright 2007-2014 Intel Corporation All Rights Reserved. +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// +//****************************************************************** +// File name: +// compatibility.h +// +// Description: +// Header for Intel Common_Library cross-platform compatibility. +// +// +// +//********************************************************************* + + +#ifndef __COMPATIBILITYH__ +#define __COMPATIBILITYH__ + +// Remove this flag to return to using the non-CS output debug logging. +#define USE_STC_DEBUG_LOGGING 1 + +#include +#include +#include +#include +#include +#include +#include + +// Workaround for a re-def issue between stdint.h and intsafe.h in VS-2010 +#if defined(WIN32) || defined(_WIN32) +#undef INT8_MIN +#undef INT16_MIN +#undef INT32_MIN +#undef INT8_MAX +#undef INT16_MAX +#undef INT32_MAX +#undef UINT8_MAX +#undef UINT16_MAX +#undef UINT32_MAX +#undef INT64_MIN +#undef INT64_MAX +#undef UINT64_MAX +#include +#undef INT8_MIN +#undef INT16_MIN +#undef INT32_MIN +#undef INT8_MAX +#undef INT16_MAX +#undef INT32_MAX +#undef UINT8_MAX +#undef UINT16_MAX +#undef UINT32_MAX +#undef INT64_MIN +#undef INT64_MAX +#undef UINT64_MAX +#endif + +#include + +#ifdef _WINRT +#include "debug.h" +#endif + +#if defined(_WINRT) || defined(__APPLE__) +#define _RT(str) str +#define RTCHAR char +#else +#define _RT(str) _T(str) +#define RTCHAR TCHAR +#endif + +#if defined(WIN32) || defined(_WIN32) || defined(WINCE) || defined(_WIN32_WCE) +#include +#include +#include +#include +#else +#include +#include +#include +#include +#include +#include +#include +#if !defined(__ANDROID__) +#include +#include +#endif +// #include +#include "wintypes.h" + +#define GCC_VERSION (__GNUC__*10000+__GNUC_MINOR__*100+__GNUC_PATCHLEVEL__) +#endif + +#define __COMMONLIBDECL__ +#define __COMMONLIBEXTERN__ + +// Make certain that both _DEBUG and DEBUG are defined if either is defined +#if defined(_DEBUG) && !defined(DEBUG) +#define DEBUG +#endif +#if defined(DEBUG) && !defined(_DEBUG) +#define _DEBUG +#endif + +#if (defined(DEBUG) || defined(_DEBUG)) && defined(NDEBUG) +#undef NDEBUG +#endif + +#if defined(WIN32) || defined(_WIN32) || defined(WINCE) || defined(_WIN32_WCE) + +#ifndef min +#define min(x, y) (((x)<(y))? (x): (y)) +#endif +#ifndef max +#define max(x, y) (((x)>(y))? (x): (y)) +#endif + +/* The MS compiler has issues exporting templates with nested types + from a DLL, so this option is not expected to be used.*/ +#ifdef COMMONLIB_RELEASE_DLL +#undef __COMMONLIBDECL__ +#undef __COMMONLIBEXTERN__ +#ifdef __IMPORTDLL__ +#define __COMMONLIBDECL__ __declspec(dllimport) +#define __COMMONLIBEXTERN__ extern +#else +#ifdef __EXPORTDLL__ +#define __COMMONLIBDECL__ __declspec(dllexport) +#define __COMMONLIBEXTERN__ +#else +#define __COMMONLIBDECL__ +#define __COMMONLIBEXTERN__ +#endif +#endif +#endif + +#ifdef __cplusplus +class InterlockLockDebugMsg +{ + public: + InterlockLockDebugMsg(); + ~InterlockLockDebugMsg(); +}; +#define DEBUGMSG_TRANSACT() InterlockLockDebugMsg() +#else +#define DEBUGMSG_TRANSACT() +#endif + +#if !defined(WINCE) && !defined(_WIN32_WCE) +#if (defined(WIN32) || defined(_WIN32)) && !defined(_WINRT) +#if defined(USE_STC_DEBUG_LOGGING) && defined(__cplusplus) +#include "DebugLogging.h" + +#define RETAILMSG(cond, printf_exp) ((cond)? (::Intel::DebugLogging::DbgPrintF printf_exp): 0) +#ifdef DEBUG +#define DEBUGMSG(cond, printf_exp) ((cond)? (::Intel::DebugLogging::DbgPrintF printf_exp): 0) +#else +#define DEBUGMSG(cond, printf_exp) (0) +#endif +#else +/* Create a mapping for RETAILMSG and DEBUGMSG in the non-CE Windows C++ environment */ +#ifdef __cplusplus +extern "C" { +#endif +size_t EXTOutputDebugStringFT(const TCHAR *format, ...); +#ifdef __cplusplus +} +#endif + +#define RETAILMSG(cond, printf_exp) ((cond)? (EXTOutputDebugStringFT printf_exp): 0) +#ifdef DEBUG +#define DEBUGMSG(cond, printf_exp) ((cond)? (EXTOutputDebugStringFT printf_exp): 0) +#else +#define DEBUGMSG(cond, printf_exp) (0) +#endif +#endif +#elif defined(__ANDROID__) || defined(__APPLE__) || defined(_WINRT) +#define RETAILMSG(cond, printf_exp) DebugPrint(cond, printf_exp) +#ifdef DEBUG +#define DEBUGMSG(cond, printf_exp) DebugPrint(cond, printf_exp) +#else +#define DEBUGMSG(cond, printf_exp) (0) +#endif +#endif +#endif +#else /* defined(WIN32) || defined(_WIN32) || defined(WINCE) || defined(_WIN32_WCE) */ + +#define __COMMONLIBDECL__ + +#if !defined(__CYGWIN__) && !defined(__stdcall) +#define __stdcall +#endif + +typedef void *LPVOID; +typedef unsigned int DWORD; +typedef unsigned int BOOL; +typedef unsigned char BYTE; +typedef signed long LONG; +typedef wchar_t TCHAR; +typedef wchar_t OLECHAR; +typedef OLECHAR *BSTR; +typedef const OLECHAR *CONST_BSTR; +typedef void *HANDLE; +typedef void *HMODULE; +typedef void (*FARPROC)(void); +typedef unsigned long long ULONGLONG; + +#if defined(UNICODE) || defined(_UNICODE) +#define _T(str) L##str +#define _stprintf(buf, fmt, args...) swprintf((buf), INT_MAX, (fmt), args) +#define _tcscmp(str1, str2) wcscmp((str1), (str2)) +#define _tcsstr(str1, str2) wcsstr((str1), (str2)) +#define _tcsncpy_s(str1, n1, str2, n2) wcsncpy((str1), (str2), (n2)) +#define _stscanf(str, fmt, args...) swscanf((str), (fmt), args) +#define _tcslen(str) wcslen((str)) +#define _tprintf(fmt, args...) wprintf((fmt), args) +#else +#ifndef _T +#define _T(str) str +#endif +#define _stprintf(buf, fmt, args...) sprintf((buf), (fmt), args) +#define _tcscmp(str1, str2) strcmp((str1), (str2)) +#define _tcsstr(str1, str2) strstr((str1), (str2)) +#define _tcsncpy_s(str1, n1, str2, n2) strncpy((str1), (str2), (n2)) +#define _stscanf(str, fmt, args...) sscanf((str), (fmt), args) +#define _tcslen(str) strlen((str)) +#define _tprintf(fmt, args...) printf((fmt), args) +#endif + +#define RETAILMSG(zone, macro) ((zone)? _tprintf macro: 0) + +#ifdef DEBUG +#define DEBUGMSG(zone, macro) ((zone)? _tprintf macro: 0) +#else +#define DEBUGMSG(zone, macro) ((void)0) +#endif + +#define DEBUGMSG_TRANSACT() + +#define INFINITE 0xFFFFffff +#define WAIT_OBJECT_0 0 + +#define SUCCEEDED(result) ((result)>=0) +#define FAILED(result) ((result)<0) +#define S_FALSE 1 +#define S_OK 0 + +#if !defined(ERROR_SUCCESS) +#define ERROR_SUCCESS 0 +#endif + +// This may or may not function properly on multi-core systems. +/// \todo Improve this behavior or use library functions +#define InterlockedIncrement(value) ((*(value))++) +#define InterlockedDecrement(value) ((*(value))--) + +using std::max; +using std::min; + +#endif /* defined(WIN32) || defined(_WIN32) || defined(WINCE) || defined(_WIN32_WCE) */ + +/// Helper function to swap an array of bytes (used for GUID processing). In general this is +/// used as a replacement for ntohs and ntohl, which are not guaranteed to be available. +/// \todo Move this into a utility class as a static function +void swap_byte_array(void *vec, const size_t bytes); + +#ifndef stc_new +#if defined(WIN32) || defined(_WIN32) || defined(WINCE) || defined(_WIN32_WCE) +#define _CRTDBG_MAP_ALLOC +#include +#endif + +#ifdef DEBUG +#define stc_new new (_CLIENT_BLOCK, __FILE__, __LINE__) +#else +#define stc_new new (std::nothrow) +#endif +#endif + +#endif /*__COMPATIBILITYH__*/ diff --git a/samples/HelloCcf/proj.android/jni/include/guids.h b/samples/HelloCcf/proj.android/jni/include/guids.h new file mode 100755 index 0000000..fe82756 --- /dev/null +++ b/samples/HelloCcf/proj.android/jni/include/guids.h @@ -0,0 +1,256 @@ +//****************************************************************** +// +// Copyright 2005-2014 Intel Corporation All Rights Reserved. +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// +//****************************************************************** +// File name: +// guids.h +// +// Description: +// Header for Intel GUID parsing/storage helper functions +// +// +// +//********************************************************************* + + +#pragma once + +#ifndef __GUIDSH__ +#define __GUIDSH__ + +//NOTE: This is a temporary fix. A better solution would be to remove +//the dependency on APIs that are not intended to be public from libraries +//that use these APIs (portable C SDK) +#pragma GCC visibility push(default) + +#include "compatibility.h" + +#if defined(_WIN32) || defined(WIN32) || defined(WINCE) || defined(_WIN32_WCE) +#include "STLSupport.h" +#include "hash.h" +#include +#include +#endif + +#ifdef __ANDROID__ +#include "wintypes.h" +#endif + +#if !defined(_WIN32) && !defined(WIN32) && !defined(WINCE) && !defined(_WIN32_WCE) && !defined(GUID_NULL) +#include "uuid.h" +#define GUID_NULL NULL_GUID +#endif + +// If this is not a WINDOWS or ANDROID platform, define GUID +#if !defined(WIN32) && !defined(WINCE) && !defined(__ANDROID__) && !defined(__CYGWIN__) && !defined(__APPLE__) && !defined(__linux__) +typedef struct GUID +{ + unsigned int Data1; + unsigned short Data2; + unsigned short Data3; + unsigned char Data4[8]; +} GUID_t; +#endif + +#if defined(WIN32) && !defined(_WINRT) +typedef struct _GUID UUID_t; +#endif + +// If we are not using the local STL implementation or the STLPort +#if !defined(USE_STC_STL_LITE) && !defined(USE_STLPORT_STL) + +// ... and if this is a windows platform +#if defined(_WIN32) || defined(WIN32) || defined(WINCE) || defined(_WIN32_WCE) + +/// Specialization of the hash_compare traits template to provide hashing behavior using GUIDs as keys. +template <> class __COMMONLIBDECL__ stdext_dropin::hash_compare +{ + public: + /// Default bucket_size parameter + static const size_t bucket_size = 4; + /// Default minimum number of hash buckets + static const size_t min_buckets = 8; + + /// Functor implementing a hashing function on a GUID. This function uses a straighforward + /// hashing function on the entire GUID value (since some parts of a GUID are MAC-addresses + /// and remain the same on some architectures for multiple GUID instances). + /// \param[in] guid Globally unique identifier to hash. + /// \return 32-bit hash of the passed-in GUID value. + size_t operator()(const GUID &guid) const + { + size_t hash_val = 0; + for (int i = 0; i < sizeof(guid) / sizeof(DWORD); ++i) + { + hash_val <<= 3; + hash_val ^= ((DWORD *)&guid)[i]; + } + return hash_val; + } + + /// Functor implementing a less-than operator between GUIDs. + /// \param[in] guid1 GUID to compare. + /// \param[in] guid2 GUID to compare to guid1. + /// \return true iff guid1 is less than guid2 in the sense of being of a numerically smaller + /// value when the GUIDs are taken to be a 16-byte integers. + bool operator()(const GUID &guid1, const GUID &guid2) const + { + return memcmp(&guid1, &guid2, sizeof(guid1)) < 0; + } +}; + + +namespace std +{ + /// Specialization of the less functor to provide sorting behavior using GUIDs as keys. + /// \todo Convert to use std_dropin + template <> class __COMMONLIBDECL__ less + { + public: + /// Functor implementing a less-than operator between GUIDs. + /// \param[in] guid1 GUID to compare. + /// \param[in] guid2 GUID to compare to guid1. + /// \return true iff guid1 is less than guid2 in the sense of being of a numerically smaller + /// value when the GUIDs are taken to be a 16-byte integers. + bool operator()(const GUID &guid1, const GUID &guid2) const + { + return memcmp(&guid1, &guid2, sizeof(guid1)) < 0; + } + }; +} +#endif +#endif // !USE_STC_STL_LITE + + +#if (defined(_WIN32) || defined(WIN32) || defined(WINCE) || defined(_WIN32_WCE)) && !defined(_WINRT) + +namespace STC_std +{ + // Specialization of the hash functor to provide hashing behavior on the GUID type. + template <> struct hash + { + /// Functor implementing a hashing operator on a GUID type. + /// \param[in] guid GUID to hash. + /// \return 32-bit hash code representing the value of this GUID in the + /// finite group of hash codes. + size_t operator()(const GUID &guid) const + { + size_t hash_val = 0; + for (int i = 0; i < sizeof(guid) / sizeof(DWORD); ++i) + { + hash_val <<= 3; + hash_val ^= ((DWORD *)&guid)[i]; + } + return hash_val; + } + }; + + /// Specialization of the equal_to functor to provide an equality comparison on the GUID type. + template <> struct equal_to + { + /// Functor implementing an equality operator on a GUID type. + /// \param[in] guid1 GUID to compare. + /// \param[in] guid2 GUID to compare to guid1. + /// \return true if guid1==guid2, false otherwise + bool operator()(const GUID &guid1, const GUID &guid2) const + { + return !memcmp(&guid1, &guid2, sizeof(guid1)); + } + }; + + /// Specialization of the less functor to provide sorting behavior using GUIDs as keys. + template <> struct less + { + /// Functor implementing a less-than operator between GUIDs. + /// \param[in] guid1 GUID to compare. + /// \param[in] guid2 GUID to compare to guid1. + /// \return true iff guid1 is less than guid2 in the sense of being of a numerically smaller + /// value when the GUIDs are taken to be a 16-byte integers. + bool operator()(const GUID &guid1, const GUID &guid2) const + { + return memcmp(&guid1, &guid2, sizeof(guid1)) < 0; + } + }; + +} + +namespace Intel +{ + /// A global helper function to write a GUID to the kernel debug message + /// output queue in debug mode (only). + void debugWriteGUID(const GUID &guid); + /// A global helper function to write a GUID to the kernel debug message + /// output queue. + void retailWriteGUID(const GUID &guid); +} +#endif // defined(_WIN32) || defined(WIN32) || defined(WINCE) || defined(_WIN32_WCE) + + +namespace Intel +{ + class GUIDObjectBase + { + public: + GUIDObjectBase(GUID guid = GUID_NULL) : _guid(guid) {} + + inline operator const GUID() const throw() { return _guid; } + inline operator GUID() const throw() { return _guid; } + + static GUID createGUID(); + + inline bool operator==(const GUID &right) const throw() { return memcmp(&_guid, &right, sizeof(GUID)) == 0; } + inline bool operator!=(const GUID &right) const throw() { return memcmp(&_guid, &right, sizeof(GUID)) != 0; } + inline bool operator< (const GUID &right) const throw() { return memcmp(&_guid, &right, sizeof(GUID)) < 0; } + inline bool operator> (const GUID &right) const throw() { return memcmp(&_guid, &right, sizeof(GUID)) > 0; } + inline bool operator<=(const GUID &right) const throw() { return memcmp(&_guid, &right, sizeof(GUID)) <= 0; } + inline bool operator>=(const GUID &right) const throw() { return memcmp(&_guid, &right, sizeof(GUID)) >= 0; } + + inline const GUID &GetGuid() const { return _guid; } + + protected: + inline void SetGuid(const GUID &guid) { _guid = guid; } + private: + GUIDObjectBase(const GUIDObjectBase &); + GUIDObjectBase &operator=(const GUIDObjectBase &); + + private: + /// The object GUID + GUID _guid; + }; +} + + +namespace Intel +{ + /// Global comparison operators on GUID +#if !defined(_WIN32) && !defined(WIN32) && !defined(WINCE) && !defined(_WIN32_WCE) + bool operator==(const GUID &guid1, const GUID &guid2); + bool operator!=(const GUID &guid1, const GUID &guid2); +#endif + + + struct GUIDUtils + { +#if defined(WIN32) || defined(_WIN32) || defined(WINCE) || defined(_WIN32_WCE) + static std::string GUIDToString(const GUID &id); +#else + static std::string GUIDToString(const UUID_t &id); +#endif + + static GUID stringToGUID(const std::string &source); + }; +} + +bool operator<(const GUID &guid1, const GUID &guid2); +std::ostream &operator<<(std::ostream &os, const GUID &g); +std::istream &operator>>(std::istream &is, GUID &g); +GUID operator^(const GUID &guid1, const GUID &guid2); +GUID operator|(const GUID &guid1, const GUID &guid2); +GUID operator&(const GUID &guid1, const GUID &guid2); + + +#pragma GCC visibility pop + +#endif // __GUIDSH__ diff --git a/samples/HelloCcf/proj.android/jni/include/osal.h b/samples/HelloCcf/proj.android/jni/include/osal.h new file mode 100755 index 0000000..eb2376a --- /dev/null +++ b/samples/HelloCcf/proj.android/jni/include/osal.h @@ -0,0 +1,234 @@ +//****************************************************************** +// +// Copyright 2010-2014 Intel Corporation All Rights Reserved. +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// +//****************************************************************** +// File name: +// osal.h +// +// Description: Interface to the Operating System Abstraction Layer (OSAL). This +// module is used to facilitate porting to different OSes. +// +// +//********************************************************************* + +#ifndef __CS_OSAL__ +#define __CS_OSAL__ + +#include "platformtypes.h" + +typedef void *Mutex_t; +typedef void *RemoveLock_t; +typedef void *Thread_t; +typedef void *Event_t; + +// OSAL is only used in the portable stack +#define PORTABLE_STACK 1 + +#define OSAL_MAX(a, b) ((a) > (b)?(a):(b)) +#define OSAL_MIN(a, b) ((a) < (b)?(a):(b)) + +#define OSAL_TIMEOUT_INFINITE (0) +#define OSAL_TIMEOUT (1) +#define OSAL_DEFAULT_STACK_SIZE (0) +#define OSAL_THREAD_CLOSE_MILLISECOND_WAIT (500)_ + +/* Error codes return by this module */ +#define OSAL_ERROR (-200) +#define OSAL_ERROR_INVALID_PARAMETER (-201) +#define OSAL_ERROR_OVERFLOW (-202) +#define OSAL_ERROR_BUSY (-203) + +/* + Description: Prototype for the thread functions (See OSAL_Thread*). + context - optional parameter passed with the call the OSAL_ThreadCreate. + returns - not used + */ +typedef int (*OSAL_ThreadFunction_t)(void *context); + +//TODO In progress +RemoveLock_t OSAL_RemoveLockCreate(const char *name); +void OSAL_RemoveLockWaitAndFree(RemoveLock_t removeLock); +void OSAL_RemoveLockLock(RemoveLock_t removeLock); +void OSAL_RemoveLockRelease(RemoveLock_t removeLock); + +/* + Description: Creates a mutex + name - Name of the mutex (used for debugging error reporting) + returns - A Mutex_t on success. NULL on error. +*/ +Mutex_t OSAL_MutexCreate(const char *name); + +/* + Description: Frees a previously create mutex + mutex - mutex from a successful call to OSAL_MutexCreate. +*/ +void OSAL_MutexFree(Mutex_t mutex); + +/* + Description: Locks a the mutex. + mutex - mutex from a successful call to OSAL_MutexCreate. +*/ +void OSAL_MutexLock(Mutex_t mutex); + +/* + Description: Locks a the mutex + mutex - mutex from a successful call to OSAL_MutexCreate. +*/ +int OSAL_MutexTryLock(Mutex_t mutex); + +/* + Description: Releases a previously locked mutex (call to OSAL_MutexLock). + mutex - mutex from a successful call to OSAL_MutexCreate. +*/ +void OSAL_MutexRelease(Mutex_t mutex); + +#define THREAD_SELF_CLEAN 0x1 + +/* + Description: Creates a thread + startAddress - Function to be run as a thread (see OSAL_ThreadFunction_t). + threadContext - optional parameter (which will be included in OSAL_ThreadFunction_t parameter. + stackSize - Size of the thread stack, or OSAL_DEFAULT_STACK_SIZE; + flags - reserved . + name - Name of the thread (used for debugging error reporting). + return - handle to the thread, NULL on error. +*/ +Thread_t OSAL_ThreadCreate(OSAL_ThreadFunction_t startAddress, void *threadContext, + DWord_t stackSize, int flags = 0, const char *threadName = ""); + +/* + Description: Closes a previously created thread. This function will block waiting for + the thread up to OSAL_THREAD_CLOSE_MILLISECOND_WAIT. After the timeout, + if the thread has not closed the thread context will not be free (error + condition). + handle - Previously created handle (from OSAL_ThreadCreate). +*/ +void OSAL_ThreadClose(Thread_t handle); + +/* + Description: Set the name of the current thread + + name - The name to assign to the current thread + + return - 0 on success, otherwise, and error code + */ +int OSAL_ThreadSetName(const char *name); + + +template +Thread_t StartSharedThread(const T &sharedPtr, OSAL_ThreadFunction_t funct, const char *name, + int flags = 0) +{ + Thread_t retVal = 0; + + // myInterface is a pointer to a shared pointer, because we cannot cast + // a shared pointer to (void *) to pass it to InterfaceThread. When + // the thread terminates, it is responsible for freeing newInterface. + T *myPtr = new T(); + (*myPtr) = sharedPtr; + + retVal = OSAL_ThreadCreate(funct, myPtr, 0, flags, name); + + return retVal; +} + +/* + Description: Sleeps given amount of time. + milliseconds - number of milliseconds to sleep +*/ +void OSAL_Sleep(int milliseconds); + +/* + Description: Find the system current millisecond count + return - arbitrary start value revolving counter; +*/ +DWord_t OSAL_GetTickCount(void); + +/* + Description: Create an event object + name - Name of the event (used for debugging and error reporting) + returns - The Event_t used for all other OSAL_Event functions +*/ +Event_t OSAL_EventCreate(const char *name); + +/* + Description: Free a previously created event object + event - Event_t from a successful call to OSAL_EventCreate. +*/ +void OSAL_EventFree(Event_t event); + +/* + Description: Set an event on a previously created event object + event - Event_t from a successful call to OSAL_EventCreate. + eventFlagsToSet - This value will be logically ORed into the event value. The OSAL_EventWait + will get the combinations of all events set. +*/ +void OSAL_EventSet(Event_t event, DWord_t eventFlagsToSet); + +/* + Description: Wait on an event. + event - Event_t from a successful call to OSAL_EventCreate. + eventFlagsSet - Logical OR of all calls to OSAL_EventSet. Note, this value is not + cleared; therefore, any value passed in will be ORed with any events + values set. + millisecondTimeout - number of milliseconds to wait for the event. This value can be set + to OSAL_TIMEOUT_INFINITE. + returns - Negative value on error, 0 for event, and OSAL_TIMEOUT for timeout. +*/ +int OSAL_EventWait(Event_t event, DWord_t *eventFlagsSet, int millisecondTimeout); + + +/* + Description: Generates a pseudo random number + returns - The random number generated. +*/ +DWord_t OSAL_PseudoRandomWord(); + +/* + Description: gets the cloud.xml file path, that overrides built in settings + returns - wether it got path + */ +extern "C" bool OSAL_GetCloudPath(char *buf, unsigned int length); + +/* + Description: get the proxy host server, port, and URI (if applicable) + returns - whether the command was successful, true does not mean there is a valid proxy (it could be empty) + */ +extern "C" bool OSAL_GetProxyInfo(const char *serverURI, char *proxyHost, int hostlen, + int *proxyPort, char *proxyURI, int urilen); + +/* + Description: get the default directory in which we save agent logs. + returns - the character length of the path. if the length passed is less than the length required + call again passing a buffer and length that match the return of the first call. + */ +extern "C" DWord_t OSAL_GetDefaultAgentLoggingPath(char *buf, unsigned int length); + +/* + Description: get the version of the current OS as a string. + returns - the character length of the version. if the length passed is less than the length required + call again passing a buffer and length that match the return of the first call. + */ +extern "C" DWord_t OSAL_GetOSVersionString(char *buf, unsigned int length); + +/* + Description: get the memory size of the current device, in kilobytes. + returns - the memory size of the current device, in kilobytes, or 0 on error. + */ +extern "C" DWord_t OSAL_GetDeviceMemoryInKilobytes(); + +/* + Description: get the available disk size of the current device, in megabytes. + returns - the available disk size of the current device, in megabytes, or 0 on error. + */ +extern "C" DWord_t OSAL_GetDeviceSpaceInMegabytes(); + +int OSAL_DWordToString(DWord_t dword, char *outString, int outStringLength, int radix); + +// The following is declared extern "C" because iOS needs it +extern "C" bool OSAL_GetLocale(char *locale, int *localeLen); + +#endif diff --git a/samples/HelloCcf/proj.android/jni/include/platformtypes.h b/samples/HelloCcf/proj.android/jni/include/platformtypes.h new file mode 100755 index 0000000..57be781 --- /dev/null +++ b/samples/HelloCcf/proj.android/jni/include/platformtypes.h @@ -0,0 +1,31 @@ +//****************************************************************** +// +// Copyright 2010-2014 Intel Corporation All Rights Reserved. +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// +//****************************************************************** +// File name: +// platformtypes.h +// +// Description: +// +// +// +// +//********************************************************************* + + + +#ifndef __CS_PLATFORM_TYPE__ +#define __CS_PLATFORM_TYPE__ + +/* unsigned types */ +typedef unsigned char Byte_t; + +typedef unsigned short Word_t; + +typedef unsigned int DWord_t; + +#endif + diff --git a/samples/HelloCcf/proj.android/jni/include/stcapi.h b/samples/HelloCcf/proj.android/jni/include/stcapi.h new file mode 100755 index 0000000..74cb98f --- /dev/null +++ b/samples/HelloCcf/proj.android/jni/include/stcapi.h @@ -0,0 +1,2396 @@ +//****************************************************************** +// +// Copyright 2011-2014 Intel Corporation All Rights Reserved. +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// +//****************************************************************** +// File name: +// stcapi.h +// +// +//********************************************************************* + +#pragma once + +#if defined(_WIN32) || defined(_WIN64) +#include +#ifdef STCAPI_EXPORTS +#define STC_API __declspec(dllexport) +#else +#define STC_API __declspec(dllimport) +#endif +// Temporarily only available for Windows, remove when portable implemenation available +#define HAVE_APP_SPECIFIC_ADVERTISEMENT +#else +#define SOCKET int* +#include "guids.h" +typedef unsigned short WORD; +typedef void *PVOID; +typedef DWORD *PDWORD; +typedef BYTE *PBYTE; +#define CALLBACK +#define MAX_PATH (260) +#define STC_API + +#if defined(ANDROID) || defined(__linux__) +#define ENABLE_CLOUD_REGISTRATION +#endif + +#endif + +#ifndef __STCAPI_H +#define __STCAPI_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __cplusplus +typedef int bool; +#define TRUE 1 +#define FALSE 0 +#endif + +/** + * @defgroup STCMacros Macros + * + * @brief These defines specify flags that the CCF C/C++ SDK accepts + * or returns in its calls and callback functions. + */ +///@{ + +/** + * @defgroup STCResultCodes STC Result Codes + * + * @brief The result of an STC API call; either success or a reason for failure + */ +///@{ + +#define STC_SUCCESS (S_OK) ///< Returned when method has been completed with success +#define STC_WARNING_DEPRECATED_METHOD (0x00000002) ///< Returned when method's functionality has been removed because of deprecation. +#define STC_ERROR_NOT_INITIALIZED (0x87FF0001) ///< Error returned when STCInitialize() has not been called +#define STC_ERROR_COMPLETE_CALLBACK_NOT_SET (0x87FF0002) ///< Error returned when the callback is not set correctly +#define STC_ERROR_STREAM_CLOSED (0x87FF0003) ///< Error returned when the stream is closed +#define STC_ERROR_INVALID_LISTENING_TYPE (0x87FF0004) ///< Error returned when STCListenForInvites() is called with an invalid "mode" parameter. +#define STC_ERROR_OOB_DATA_SIZE_INVALID (0x87FF0005) ///< Error returned when too large an out-of-band invite data buffer is specified. + +///@} + +/** + * @defgroup STCSessionUpdateTypes STC Session Update Types + * @brief An integer indicating the event that triggered a session update + */ +///@{ + +#define STC_UPDATE_AVAILABLE (1) ///< Remote session is active and ready for connections. +#define STC_UPDATE_EXPIRED (2) ///< Remote session has expired. +#define STC_UPDATE_DISCOVERED (3) ///< Remote session has been discovered. +#define STC_UPDATE_INRANGE (4) ///< Remote session is in range. +#define STC_UPDATE_SHUTDOWN (5) ///< Remote session has shutdown. +#define STC_UPDATE_UNKNOWN (6) ///< Remote session has an unknown update type. This may be due to local version being out of date. + +///@} + +/** + * @defgroup STCStreamEventTypes STC Stream Event Types + * @brief An integer indicating the event that triggered a stream event + * + * When Intel CCF loses all available transports from the local session + * to a remote session, the stream is suspended until communication can + * be reestablished. When communication is reesstablished, CCF will send + * a resume event to tell the application it can expect the stream to + * be able to send and receive data again. + */ +///@{ + +#define STC_STREAM_EVENT_RESUMED (1) ///< A suspended stream has resumed sending data +#define STC_STREAM_EVENT_SUSPENDED (2) ///< A currently open stream has been suspended + +///@} + +/** + * @defgroup STCAvatarTypes STC Avatar Types + * @brief An integer indicating the format of the Avatar + */ +///@{ + +#define STC_FORMAT_NONE (0) ///< No image available. +#define STC_FORMAT_BMP (1) ///< BMP format. + +///@} + +/** + * @defgroup STCDiscoveryFlags STC Discovery Flags + * @brief Flags indicating the discovery properties of a session + * + * A user-supplied custom avatar could contain an image of anything that + * the user chooses. Application authors may choose to handle custom + * avatars differently from built-in avatars if they are concerned about + * the content a user may add to their avatar. + */ +///@{ + +#define STC_DISCOVERY_FLAGS_IS_SELF (0x00000001) ///< The discovered session is "self" (owned by the local user) +#define STC_DISCOVERY_FLAGS_IS_REGISTERED (0x00000002) ///< The discovered session is registered with Intel® Identity Services +#define STC_DISCOVERY_AVATAR_IS_CUSTOM (0x00000010) ///< The discovered session uses a custom, user-defined avatar + +///@} + +/** + * @defgroup STCListenType STC Listen Type + * @brief An integer indicating the mode in which the @ref STCSessionUpdateCallback callback will operate. + */ +///@{ + +#define STC_ACCEPT_NONE (0) ///< Do not accept any invitation. +#define STC_ACCEPT_ONE (1) ///< Accept only one invitation. Ignore all invitations that follow. +#define STC_ACCEPT_MANY (3) ///< Accept multiple invitations. + +///@} + +/** + * @defgroup STCInvitationAndStatusCodes STC Invitation and Status Codes + * @brief An integer indicating the status of a pending invitation. + */ +///@{ + +#define STC_INVITE_STATUS_GADGET_NOT_REGISTERED (2) ///< Application is not registered. +#define STC_INVITE_STATUS_ATTEMPTING_REMOTE_CONNECTION (3) ///< Attempting to create a connection with remote session. +#define STC_INVITE_STATUS_FAILED_REMOTE_CONNECTION (4) ///< Connection with remote session has failed. +#define STC_INVITE_STATUS_WAITING_FOR_GADGET_RESPONSE (5) ///< Connecting in progress. +#define STC_INVITE_STATUS_WAITING_FOR_CONNECT_BACK (6) ///< Connecting is progress. +#define STC_INVITE_STATUS_GADGET_NOT_INSTALLED (7) ///< Application is not installed. +#define STC_INVITE_STATUS_GADGET_LAUNCH_FAILURE (8) ///< Failed to launch the application. +#define STC_INVITE_STATUS_INVITE_IGNORED (9) ///< Invitation has been ignored. +#define STC_INVITE_STATUS_INVITE_TIMEOUT (10) ///< Invitation has timed out. +#define STC_INVITE_STATUS_INVITE_CANCELLED (11) ///< Invitation has been cancelled. +#define STC_INVITE_STATUS_INVITE_ACCEPTED (12) ///< Invitation has been accepted by remote session. +#define STC_INVITE_STATUS_INVITE_REJECTED (13) ///< Invitation has been rejected by remote session. +#define STC_INVITE_STATUS_INVITE_COMPLETE (14) ///< Invitation process completed. + +///@} + +/** + * @defgroup STCDiscoveryNodeServiceStatus STC Discovery Node Service Status + * @brief An integer indicating the status of the service for Discovery Nodes. + */ +///@{ + +#define STC_SERVICESTATUS_SERVICEONLINE (0) ///< Service is online. +#define STC_SERVICESTATUS_NETWORKNOTAVAILABLE (1) ///< Network is not available. --Not implemented in CCF 3.0 Beta +#define STC_SERVICESTATUS_SERVERNOTAVAILABLE (2) ///< Server is not available. --Not implemented in CCF 3.0 Beta +#define STC_SERVICESTATUS_NOTAUTHORIZED (3) ///< Not authorized. --Not implemented in CCF 3.0 Beta +#define STC_SERVICESTATUS_SERVICENOTAVAILABLE (4) ///< Service is not available. + +///@} + +/** + * @defgroup STCDiscoveryNodeStatus STC Discovery Node Status + * @brief An integer indicating the status of a Discovery Node. + */ +///@{ + +#define STC_DISCOVERYNODESTATUS_UNDEFINED (0) ///< Discovery Node status is undefined. +#define STC_DISCOVERYNODESTATUS_CREATING (1) ///< Sending request to create Discovery Node. +#define STC_DISCOVERYNODESTATUS_SUBSCRIBING (2) ///< Discovery Node is being subscribed to. +#define STC_DISCOVERYNODESTATUS_SUBSCRIBED (3) ///< Discovery Node is subscribed to. +#define STC_DISCOVERYNODESTATUS_PUBLISHING (4) ///< Publishing this session to the Discovery Node. +#define STC_DISCOVERYNODESTATUS_PUBLISHED (5) ///< This session has been published to the Discovery Node. +#define STC_DISCOVERYNODESTATUS_RETRACTING (6) ///< Discovery Node is in the process of being deleted. +#define STC_DISCOVERYNODESTATUS_UNSUBSCRIBING (7) ///< Discovery Node is being unsubscribed to. +#define STC_DISCOVERYNODESTATUS_DELETING (8) ///< Sending request to delete this Discovery Node. +#define STC_DISCOVERYNODESTATUS_DELETED (9) ///< This Discovery Node has been deleted. + +///@} + +/** + * @defgroup STCSubscriptionResult STC Subscription Result + * @brief Status Codes for Subscription Result + */ +///@{ + +#define STC_SUBSCRIPTIONRESULT_STCNOTINITIALIZED (-2) ///< CCF has not been initialized. +#define STC_SUBSCRIPTIONRESULT_FAILED (-1) ///< Failure using Discovery Node API. +#define STC_SUBSCRIPTIONRESULT_SUBSCRIPTIONCHANGED (0) ///< Service status for cloud communications has completed succesfully/updated. +#define STC_SUBSCRIPTIONRESULT_SUBSCRIPTIONNOTFOUND (1) ///< Service status for cloud communications was not found. +#define STC_SUBSCRIPTIONRESULT_SUBSCRIPTIONEXISTS (2) ///< Discovery Node already exists. +#define STC_SUBSCRIPTIONRESULT_SUBSCRIPTIONDENIED (3) ///< Service status for cloud communications has denied your request. +#define STC_SUBSCRIPTIONRESULT_PUBLICATIONEXISTS (4) ///< Social Node already exists with same credentials. +#define STC_SUBSCRIPTIONRESULT_PUBLICATIONNOTFOUND (5) ///< Social Node doesn't exist. Check your discovery node credentials and try again. +#define STC_SUBSCRIPTIONRESULT_PUBLICATIONREFERENCENOTFOUND (6) ///< Social Node doesn't exist. Check your discovery node credentials and try again. +#define STC_SUBSCRIPTIONRESULT_SERVICENOTAVAILABLE (7) ///< Service for cloud communications is not available. Please try again later. +#define STC_SUBSCRIPTIONRESULT_NETWORKNOTAVAILABLE (8) ///< Network not found. + +///@} + +/** + * @defgroup STCNodeType STC Node Type + * @brief Status Codes for Node Types + */ +///@{ + +#define STC_NODE_TYPE_NONE (0) ///< If passed as parameter to @ref STCCreateDiscoveryNode or @ref STCJoinDiscoveryNode, the current user will not be visible to any users also marked as STC_NODE_TYPE_NONE. +#define STC_NODE_TYPE_PUBLISH (4) ///< If passed as parameter to @ref STCCreateDiscoveryNode or @ref STCJoinDiscoveryNode, the current user will be visible to all others subscribed to node. + +///@} + +/** + * @defgroup STCNodeLastError STC Discovery Node Last Error + * @brief Last Error cases for Discovery Node Updates + * @remarks Errors are only valid if and only if the + * Discovery Node Status is "Deleted." + */ +///@{ + +#define STC_NODE_ERROR_NOERROR (0) ///< The node update was processed without error. +#define STC_NODE_ERROR_NODEEXISTS (1) ///< The node trying to be created already exists. +#define STC_NODE_ERROR_NODENOTFOUND (2) ///< The node does not exist. +#define STC_NODE_ERROR_INSUFFICIENTPRIVILEGES (3) ///< Insufficient privileges. +#define STC_NODE_ERROR_INTERNALERROR (4) ///< The process performed on the node has experienced an internal error. If the problem persists, please contact a member of the CCF team. +#define STC_NODE_ERROR_UNKNOWNERROR (5) ///< The process performed on the node has experienced an unknown error. If the problem persists, please contact a member of the CCF team. + +///@} + +/** + * @defgroup STCStringLength STC String Length + * @brief Maximum values for lengths of char arrays. + */ +///@{ + +#define STC_MAX_VERSION_LENGTH (250) ///< Maximum length of Platform and SDK Version. +#define STC_MAX_DISCOVERYNODEDATA_LENGTH (250) ///< Maximum length of STCDiscoveryNode Name. +#define STC_MAX_CLIENTID_LENGTH (250) ///< Maximum length of Client Id. +#define STC_MAX_CLIENTSECRET_LENGTH (250) ///< Maximum length of Client Secret. +#define STC_MAX_CHAR_ARRAY_LENGTH (250) ///< General maximum length of char arrays for STCAPI C/C++ SDK. +#define STC_MAX_REDIRECTURI_LENGTH (250) ///< Maximum length of RedirectURI +#define STC_MAX_LASTERROR_LENGTH (250) ///< Maximum length of the Last Error found in Discovery Node Updates. @ref STCDiscoveryNodeUpdateCallback +#define STC_MAX_OOB_INVITE_DATA_SIZE (16384) ///< Maximum supported length of the invitation out-of-band data payload. @ref STCInviteRequest +#ifdef HAVE_APP_SPECIFIC_ADVERTISEMENT +#define STC_MAX_ADVERTISEMENT_DATA_SIZE (8192) ///< Maximum supported length of the advertisement payload. @ref STCSetLocalAdvertisement +#endif + +#if defined(ANDROID) || defined(__linux__) +#define STC_MAX_APP_NAME_LENGTH (41) +#define STC_MAX_APP_DESCRIPTION_LENGTH (241) +#define STC_MAX_INTENT_LENGTH (241) +#define STC_MAX_ACTIVITY_LENGTH (241) +#define STC_MAX_USER_NAME_LENGTH (129) +#define STC_MAX_SESSION_NAME_LENGTH (257) +#endif +///@} + +/** + * @brief Variable types defined to identify handles. + */ +///@{ +typedef long STC_RESULT; +typedef PVOID STC_HANDLE, + *PSTC_HANDLE; ///< Pointer to an SDK handle. A handle can be retrieved by calling STCInit(). +typedef DWORD HSTCINVITE, *PSTCINVITE; ///< Invitation Handle. +typedef PVOID HSTCSTREAM, *PSTCSTREAM; ///< Stream Handle. + +///@} + + + +/** + * @defgroup STCTransportMode STC Transport Mode + * @brief An integer indicating the type of transport available. Types of transports available for STCSetAllowedTransports and STCGetAllowedTransports. + */ +///@{ + +#define STC_TRANSPORT_NONE (0x00) ///< STCSetAllowedTransports or STCGetAllowedTransports to allow no transport. +#define STC_TRANSPORT_BLUETOOTH (0x01) ///< STCSetAllowedTransports or STCGetAllowedTransports to allow Bluetooth transport. +#define STC_TRANSPORT_INET (0x02) ///< STCSetAllowedTransports or STCGetAllowedTransports to allow WiFi or Ethernet transport. +#define STC_TRANSPORT_CLOUD (0x04) ///< STCSetAllowedTransports or STCGetAllowedTransports to allow Cloud transport using STUN and TURN. +#define STC_TRANSPORT_ALL (0xFFFFFFFF) ///< STCSetAllowedTransports or STCGetAllowedTransports to allow all transports. + +//TODO: Future use +//#define STC_TRANSPORT_INET_WIFI (0x00000002) +//#define STC_TRANSPORT_WIFI_DIRECT (0x00000004) +//#define STC_TRANSPORT_CLOUD_P2P (0x00000008) +//#define STC_TRANSPORT_CLOUD_RELAY (0x00000010) +//#define STC_TRANSPORT_TRANSPORT_ALL (0xFFFFFFFF) + +///@} + + +/** + * @defgroup LogLevel Level Types + * @brief The log level ordered from lowest to highest priority + */ +///@{ +typedef enum +{ + LogLevel_None = 0, ///< Always First + LogLevel_Verbose, + LogLevel_Debug, + LogLevel_Info, + LogLevel_Warning, + LogLevel_Error, + LogLevel_Fatal, + LogLevel_Max, ///< Always Last + +} LogLevel; +///@} + + + +/** + * @defgroup LogMode LogMode Types + * @brief Log mode to log to a file or live to Developer Central + */ +///@{ +typedef enum +{ + LogMode_None = 0, ///< Always First + LogMode_Offline, + LogMode_Online, + LogMode_Both, + LogMode_Max, ///< Always Last + +} LogMode; +///@} + +/** + * @defgroup Module Module Types + * @brief Filter the log based on modules + */ +///@{ +typedef enum +{ + Module_None = 0, + Module_Application = 1, + Module_Registration = 2, + Module_ProximityDiscovery = 4, + Module_CloudDiscovery = 8, + Module_Invitation = 16, + Module_DataStream = 32, + Module_AllModules = 0x0000003f, + Module_Max, + +} Module; +///@} + +///@} +/** + * @defgroup STCStruct STC Structure + * @brief This structure is passed when initializing the STC framework by calling @ref STCInit. + * It stores the information necessary for platform and cloud registration. + */ +///@{ +typedef struct _STCAPPLICATIONID +{ + GUID applicationId; ///< The application Id that identifies the application. + char clientId[STC_MAX_CLIENTID_LENGTH]; ///< The identifier for the user (if the application is user-specific) or application (if application not user-specific). + char clientSecret[STC_MAX_CLIENTSECRET_LENGTH]; ///< The passphrase for the user (if the application is user-specific) or application (if application not user-specific). +#if defined(ANDROID) || defined(__linux__) + char applicationName[STC_MAX_APP_NAME_LENGTH]; ///< Name of the application to be presented by dashboard (if present) + char applicationDescription[STC_MAX_APP_DESCRIPTION_LENGTH]; ///< Description of the application to be presented by dashboard (if present) + char inviteIntent[STC_MAX_INTENT_LENGTH]; /// + *

E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid double pointer.) + *
E_FAIL + *
Initialization failed for some unspecified reason + * + */ + +STC_API STC_RESULT STCInit(PSTC_HANDLE sdkHandle, STCApplicationId id, DWORD reserved); +#else + +/** + * @brief This function initializes the STC framework and registers your + * application with the framework. + * + * @remarks @ref STCInit should be the first function called by the application + * or DLL. All API calls made before calling @ref STCInit will return + * @ref STC_ERROR_NOT_INITIALIZED. + * @param [in] applicationPath - Hold the path of the application. + * @param[out] sdkHandle - Returns the handle to an instance of the Intel CCF SDK. + * + * @param[in] id - Holds information about the application such as the + * Application Id, Client Id and Client Secret. + * @param[in] reserved - Reserved for future use. Must be 0. + * + * @return STCInit returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid double pointer.) + *
E_FAIL + *
Initialization failed for some unspecified reason + *
+ */ +STC_API STC_RESULT STCInit(const char *applicationPath, PSTC_HANDLE sdkHandle, STCApplicationId id, + DWORD reserved); +/** + * This function will set the local user name. + * + * @remarks Null terminated user name, max char length = STC_MAX_USER_NAME_LENGTH. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] szUserName - the screen name to be associated with Intel CCF. + * + * @return STCSetUserName returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid double pointer.) + *
E_FAIL + *
Initialization failed for some unspecified reason + *
+ */ +STC_API STC_RESULT STCSetUserName(STC_HANDLE sdkHandle, const char *szUserName); +/** + * This function will set the local device name. + * + * @remarks Null terminated user name, max char length = STC_MAX_USER_NAME_LENGTH. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] szDeviceName - the Device name to be associated with Intel CCF. + * + * @return STCSetDeviceName returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid double pointer.) + *
E_FAIL + *
Initialization failed for some unspecified reason + *
+ */ +STC_API STC_RESULT STCSetDeviceName(STC_HANDLE sdkHandle, const char *szDeviceName); +/** + * This function will set the local user avatar + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * @param[in] avatarSize - The size of the app icon[Avatar]. + * @param[in] avatarType - The format of the app icon[Avatar]. + * @param[in] avatar - The bytes of the local session's avatar. + * + * @return STCSetAvatar returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid double pointer.) + *
E_FAIL + *
Initialization failed for some unspecified reason + *
+ */ +STC_API STC_RESULT STCSetAvatar(STC_HANDLE sdkHandle, DWORD avatarSize, BYTE avatarType, + PBYTE avatar); +/** + * This function will set the local session status[Mood of the user] + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] szStatus - The Status of the Session[Mood of the Session]. + * + * + * @return STCSetStatus returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid double pointer.) + *
E_FAIL + *
Initialization failed for some unspecified reason + *
+ */ +STC_API STC_RESULT STCSetStatus(STC_HANDLE sdkHandle, const char *szStatus); +/** + * This function will provide unboxed state of the app. + * + * @remarks isUnboxed will be true if avatar, session name, and user name have been set. + + * @param[in] sdkHandle - The handle to the instance of the CCF SDK to use for this API. + * + * @param[in] isUnboxed - The Status does APP is unboxed. + * + * + * @return STCSetStatus returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid double pointer.) + *
E_FAIL + *
Initialization failed for some unspecified reason + *
+ */ +STC_API STC_RESULT STCQueryUnboxedState(STC_HANDLE sdkHandle, bool *isUnboxed); + +#endif +/** + * @brief STCInitialize is provided for backwards compatibility with + * earlier versions of Intel CCF. + */ +#define STCInitialize STCInit + +/** + * @brief This function will release all resources associated with the STC + * API. All CCF Framework calls made after calling STCCleanUp() will return + * @ref STC_ERROR_NOT_INITIALIZED. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @return STCCleanUp returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application is not initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
E_FAIL + *
De-Initialization against the CCF service has failed. This possibly due to WINAPI SOCKET_ERROR. According to [WSAGetLastError()](http://msdn.microsoft.com/en-us/library/windows/desktop/ms741580.aspx) may provide a specific error code for further debugging. + *
+ */ +STC_API STC_RESULT STCCleanUp(STC_HANDLE sdkHandle); + +/** + * @brief This function gets the local session Id. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] LocalSessionId A pointer to the local session Id. + * + * @return STCGetLocalSessionId returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCGetLocalSessionId(STC_HANDLE sdkHandle, GUID *LocalSessionId); + +/** + * @brief This function gets the local session's discovery flags. + * + * @remarks Valid session flags are: @ref STC_DISCOVERY_FLAGS_IS_SELF, @ref STC_DISCOVERY_FLAGS_IS_REGISTERED + * and @ref STC_DISCOVERY_AVATAR_IS_CUSTOM + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] flags A set of flags, bitwise OR'ed together describing local session state + * + * @return STCGetLocalSessionFlags returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCGetLocalSessionFlags(STC_HANDLE sdkHandle, PDWORD flags); + +/** + * @brief This function gets the Device GUID for a given Session GUID. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] sessionId The Session GUID whose Device GUID is sought. + * + * @param[out] deviceId A pointer to the remote Device GUID. + * + * @return STCLookupDeviceId returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle is an invalid pointer.) + *
E_FAIL + *
The sessionId is not a valid GUID or the sessionId is not a known sessionId. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCLookupDeviceId(STC_HANDLE sdkHandle, GUID sessionId, GUID *deviceId); + +/** + * @brief This function gets the version information of STCServ.exe, the + * Intel CCF service running on Windows. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] platformVersion - A pointer to a string that will be populated with the Platform Version by this call. + * Make sure to allocate enough memory to platformVersion. Refer to STC_MAX_VERSION_LENGTH in group of defines: @ref STCStringLength + * + * @return STCQueryPlatformVersion returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle or platformVersion is an invalid pointer.) + *
E_FAIL + *
"STCServ.exe" is/was not properly installed on this machine. More than likely, CCFManager was not installed correctly. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCQueryPlatformVersion(STC_HANDLE sdkHandle, char *platformVersion); + +/** + * @brief This function gets the version information of STCAPI.dll, the Intel CCF + * SDK library that allows for integration with the CCF platform. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] sdkVersion - A pointer to a string that will be populated with SDK Version by this call. + * Make sure to allocate enough memory to sdkVersion. Refer to STC_MAX_VERSION_LENGTH in group of defines: @ref STCStringLength + * + * @return STCQuerySDKVersion returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle or sdkVersion is an invalid pointer.) + *
E_FAIL + *
"STCAPI.dll" is/was not properly installed on this machine. More than likely, CCFManager was not installed correctly. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCQuerySDKVersion(STC_HANDLE sdkHandle, char *sdkVersion); + +/** + * @brief This function allows to send out of band signaling to remote device using session ID. + * + * @param[in] sdkHandle - The handle to the instance of the CCF SDK to use for this API. + * @param[in] sessionId - remote session ID. + * @param[in] pMessage - siganling message. + * + * @return STCSendSignalData returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e., sdkHandle or platformVersion is an invalid pointer.) + *
E_FAIL + *
"STCServ.exe" is/was not properly installed on this machine. More than likely, CCFManager was not installed correctly. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ */ +STC_API STC_RESULT STCSendSignalDataW(STC_HANDLE sdkHandle, GUID sessionId, wchar_t *pMessage); + +STC_API STC_RESULT STCSendSignalDataA(STC_HANDLE sdkHandle, GUID sessionId, char *pMessage); + + + + +/** + * @brief This function allows to choose which transports should be used for Intel CCF connectivity. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * @param[in] transports - The type of transports chosen by the application. NOTE: @ref STC_TRANSPORT_INET will always be enabled. + * + * @return STCSetAllowedTransports returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e. sdkHandle or platformVersion is an invalid pointer.) + *
E_FAIL + *
"STCServ.exe" is/was not properly installed on this machine. More than likely, CCFManager was not installed correctly. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ */ +STC_API STC_RESULT STCSetAllowedTransports(STC_HANDLE sdkHandle, DWORD transports); + +/** +* @brief this function returns transports allowed to be used for Intel CCF connectivity. +* +* @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. +* @param[out] transports - The type of transports chosen by the application. NOTE: @ref STC_TRANSPORT_INET will always be enabled. +* +* @return STCGetAllowedTransports returns @ref STC_SUCCESS upon success or a code indicating +* why it failed. The return code may be a STC Result Code +* or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). +* Common error STC_RESULT%s include: +*
+*
E_INVALIDARG +*
One of the parameters passed is invalid (i.e. sdkHandle or platformVersion is an invalid pointer.) +*
E_FAIL +*
"STCServ.exe" is/was not properly installed on this machine. More than likely, CCFManager was not installed correctly. +*
STC_ERROR_NOT_INITIALIZED +*
The application has not been initialized against the Intel CCF service. +*
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" +*
The application needs to re-initialize with the Intel CCF service. +*
+*/ + +STC_API STC_RESULT STCGetAllowedTransports(STC_HANDLE sdkHandle, PDWORD transports); +///@} + +/** + ******************************************************************************************* + * @defgroup DiscoveryAPI Discovery/Session Update + * + * @brief This API alerts the application to changes in remote sessions + * + * Upon registration for Discovery event, the @ref STCSessionUpdateCallback will be triggered + * every time the STC framework discovers a new session or observes a change in a remote session. \ref TutorialDiscovery "How to use". + * + * + * @remarks Session Ids are only valid for the lifetime of Intel CCF platform. + * Suspend/resume, reboot, and restarting the Intel CCF platform invalidates + * the session Id. Some versions of Intel CCF keep the session Id constant + * across system events. Relying on this constancy will create problems + * with other STC releases. The device and session Ids are constant. + * These should be used for purposes of constancy instead of the session GUID. + * + * @note Calling other STC functions from a callback is discouraged + * as it may result in a deadlock. + ******************************************************************************************* + */ + +///@{ + + +/** + * The Intel CCF service calls this callback upon any/all updates to either local or remote + * session updates. + * + * @remarks To get local session info/updates, use @ref STCSetLocalSessionInfoCallback. + * @remarks To get remote session presence/info/updates, use @ref STCSetSessionUpdateCallback. + * + * @param[out] update - A pointer to a @ref _STCSESSIONUPDATE struct containing the most up-to-date + * information about the session. + * + * @param[out] callbackArg - The pointer passed when registering the callback. + * + */ +typedef void (CALLBACK *STCSessionUpdateCallback)(PSTCSessionUpdate update, PVOID callbackArg); + +/** + * This function registers the callback to be associated with any/all updates to + * remote session(s). + * + * @remarks Upon initial registration of this callback, the callback will be called + * immediately and sequentially for each and every currently known session. + * @remarks It is the application's responsibility to maintain the session list. + * @remarks Setting this callback to NULL at any time will end further announcements. + * @remarks Calling the function again with the same callback function will cause the + * STC service to resend the list of remote sessions again. + * @remarks It is the application's responsibility to copy the 'update' struct or its + * contents. This needs to be done to avoid losing data the Intel CCF Service or SDK + * may release or overwrite at anytime after the callback. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that will be called by the Intel CCF service upon any/all + * updates to remote sessions. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetSessionUpdateCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ + +STC_API STC_RESULT STCSetSessionUpdateCallback(STC_HANDLE sdkHandle, + STCSessionUpdateCallback callback, PVOID callbackArg); + + +/** + * This function registers the callback to be associated with any/all updates to the + * local session. + * + * @remarks Upon initial registration of this callback, the callback will be called + * immediately by the Intel CCF service. + * @remarks Setting this callback to NULL at any time will end further announcements. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that will be called by the Intel CCF service upon any/all + * updates to the local session. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetLocalSessionInfoCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetLocalSessionInfoCallback(STC_HANDLE sdkHandle, + STCSessionUpdateCallback callback, PVOID callbackArg); + +#ifdef HAVE_APP_SPECIFIC_ADVERTISEMENT +/** + * The CCF service calls this callback upon any updates to session adverisements. + * + * @remarks If the session has stopped advertising data, update->size will be zero. + * + * @param[out] update - A pointer to a @ref _STCADVERTISEMENTUPDATE struct containing the most recent + * advertised data. + * + * @param[out] callbackArg - The pointer passed when registering the callback. + */ +typedef void(CALLBACK *STCAdvertisementUpdateCallback)(PSTCAdvertisementUpdate update, + PVOID callbackArg); + +/** + * This function registers the callback to be associated with any updates to session + * advertised data. + * + * @remarks Setting this callback to NULL at any time will end further announcements. + * + * @param[in] sdkHandle - The handle to the instance of the CCF SDK to use for this API. + * + * @param[in] callback - Callback that will be called by the CCF service. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetAdvertisementUpdateCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetAdvertisementUpdateCallback(STC_HANDLE sdkHandle, + STCAdvertisementUpdateCallback callback, PVOID callbackArg); + +/** + * @brief Reserved + */ +typedef void STC_ADVERTISEMENT_FILTER; + +/* + * This function registers advertisement data that will be visible to other sessions. + */ + +STC_API STC_RESULT STCSetLocalAdvertisement(STC_HANDLE sdkHandle, GUID type, size_t size, + void *data, STC_ADVERTISEMENT_FILTER *filter); + +/* + * This function clears any previously set advertisement data. To change the data + * advertised, multiple STCSetLocalAdvertisement calls can be made in a row + * (i.e. it is _not_ necessary to clear the advertisement data before setting new data). + * + * Use this function to stop advertising any data. +*/ + +STC_API STC_RESULT STCClearLocalAdvertisement(STC_HANDLE sdkHandle); +#endif +///@} + +/** + ******************************************************************************************* + * @defgroup InvitationAndConnectionAPI Invitation & Connection + * + * @brief This API allows for application control over invitations and connections. + * + * For the purpose of Intel CCF, an invitation is defined as a request to connect. The invitation + * can be accepted, rejected or ignored by the remote session.\ref TutorialInvites "How to use" + * + * @note Calling other STC functions from a callback is discouraged + * as it may result in a deadlock. + ******************************************************************************************* + */ +///@{ + +/** + * The Intel CCF service calls this callback when a remote session + * wishes to connect to the local session. + * + * @remarks The application should respond by calling @ref STCSendInviteResponse, + * either during the callback, or after the callback without the timeout period. + * @remarks It is the application's responsibility to copy the 'message' struct or its + * contents. This needs to be done to avoid losing data the Intel CCF Service or SDK + * may release or overwrite at anytime after the callback. + * + * @param[out] message - A pointer to STCInviteRequest struct. + * + * @param[out] callbackArg - The pointer passed when registering the callback. + * + */ +typedef void (CALLBACK *STCInviteRequestCallback)(PSTCInviteRequest message, PVOID callbackArg); + +/** + * The Intel CCF service calls this callback when an invitation handshake + * completes. It will be called in response to calling + * @ref STCSendInviteResponse or @ref STCSendInviteRequest. If the + * invitation was accepted, a valid HSTCSTREAM will be sent to be used + * for communications with the remote session. + * + * @remarks It is the application's responsibility to copy the 'message' struct or its + * contents. This needs to be done to avoid losing data the Intel CCF service + * or SDK may release or overwrite at anytime after the callback. + * + * @param[out] message - A pointer to STCInviteComplete struct. + * + * @param[out] callbackArg - The pointer passed when registering the callback. + * + */ +typedef void (CALLBACK *STCInviteCompleteCallback)(PSTCInviteComplete message, PVOID callbackArg); + +/** + * The Intel CCF service calls this callback when a stream with a + * a remote session either becomes suspended, or resumes + * from being suspended. + * + * @param[out] message - A pointer to a @ref _STREAMEVENT struct containing a stream event. + * + * @param[out] callbackArg - The pointer passed when registering the callback. + * + */ +typedef void (CALLBACK *STCStreamEventUpdateCallback)(PSTCStreamEvent message, PVOID callbackArg); + +/** + * The Intel CCF service calls this callback for incoming out of band signaling message. + * + * @param[out] update - A pointer to a @ref PSTCSignalingUpdate struct containing a signaling message. + * + * @param[out] callbackArg - The pointer passed when registering the callback. + * + */ +typedef void (CALLBACK *STCSignalingUpdateCallback)(PSTCSignalingUpdate update, PVOID callbackArg); + +/** + * This function enables the application to accept invitation requests + * from remote sessions. The Intel CCF service executes the callback when + * an invitation request is received and allows the application to + * accept or reject the invitation using STCSendInviteResponse(). + * + * @remarks Mode can be defined as operational mode as defined below:\n + * STC_ACCEPT_NONE - No longer accept invitations.\n + * STC_ACCEPT_ONE - Accept one invitation only.\n + * STC_ACCEPT_MANY - Accept until disabled.\n + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that will be called by the Intel CCF service upon any/all incoming invites. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @param[in] mode - Allow multiple invitations per this session, allow only one, or allow none. @ref STCListenType + * + * @return STCListenForInvites returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer or mode is not a valid selection.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCListenForInvites(STC_HANDLE sdkHandle, STCInviteRequestCallback callback, + PVOID callbackArg, BYTE mode); + +/** + * This function registers the callback that will be associated with a successful connection to a remote session. + * + * @remarks This function must be called on both sides, Inviter and Invitee, before calling @ref STCListenForInvites or @ref STCSendInviteRequest. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that the Intel CCF service will call upon a successful connection to a remote session. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetInviteCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetInviteCallback(STC_HANDLE sdkHandle, STCInviteCompleteCallback callback, + PVOID callbackArg); + +/** + * This function registers the callback that will be associated with any stream event/update. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that the Intel CCF service will call upon any stream event/update. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetInviteCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetStreamEventCallback(STC_HANDLE sdkHandle, + STCStreamEventUpdateCallback callback, PVOID callbackArg); + + + +/** + * This function registers the callback that will be associated with any out of band siganling message. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that the Intel CCF service will call upon any stream event/update. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetInviteCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetSignalingUpdateCallback(STC_HANDLE sdkHandle, + STCSignalingUpdateCallback callback, PVOID callbackArg); + + +/** + * This function sets the maximum number of invites per remote session. + * A remote session may only be able to send X amount of invites + * for this app only. Default value of 0 defaults within the SDK. + * + * @remarks In most cases this API function does not need to be called. + * Without calling this, the default value is 0. + * Max incoming invites is set by the service in default mode. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] maxIncomingInvites The maximum number of invites the application is willing to process at one time. + * + * @return STCSetMaxIncomingInvites returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetMaxIncomingInvites(STC_HANDLE sdkHandle, int maxIncomingInvites); + +/** + * This function sends an invitation request to a remote session. The response + * is received using the STCInvitationCompleteCallback that is set + * using STCSetInviteCallback(). + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] hInvite - Handle to the invitation. + * + * @param[out] sessionId - session Id of remote session you are trying to connect. + * + * @param[out] applicationId - Your application Id used during STCInitialize. + * + * @param[in] dwTimeout - Timeout for invitation request. + * + * @return STCSendInviteRequest returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle or hInvite is an invalid pointer.) + *
E_FAIL + *
Possible Reason: The remote session has been lost in the duration of this request. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSendInviteRequest(STC_HANDLE sdkHandle, PSTCINVITE hInvite, GUID sessionId, + GUID applicationId, DWORD dwTimeout); + +/** + * This function sends an invitation request to a remote session. The response + * is received using the STCInvitationCompleteCallback that is set + * using STCSetInviteCallback(). + * + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] hInvite - Handle to the invitation. + * + * @param[out] sessionId - session Id of remote session you are trying to connect. + * + * @param[out] applicationId - Your application Id used during STCInitialize. + * + * @param[in] dwTimeout - Timeout for invitation request. + * + * @param[in] OOBData - Out-of-band data to send with the invitation request. If NULL, no data will be sent. + * + * @param[in] OOBDataSize - Size of the out-of-band data buffer. Sending a buffer of length greater than STC_MAX_OOB_INVITE_DATA_SIZE + * will result in an error. + * + * @return STCSendInviteRequest returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, hInvite, or OOBData is an invalid pointer.) + *
E_FAIL + *
Possible Reason: The remote session has been lost in the duration of this request. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_ERROR_OOB_DATA_SIZE_INVALID + *
The specified out-of-band invitation data buffer is too large. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSendInviteRequestEx(STC_HANDLE sdkHandle, PSTCINVITE hInvite, GUID sessionId, + GUID applicationId, DWORD dwTimeout, const BYTE *OOBData, size_t OOBDataSize); + + +/** + * The application should call this function in response to the + * invitation request given in the STCInviteCompleteCallback. Once + * the invitation is accepted and the stream is established, + * the invitation complete callback will be executed. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] hInvite - The invitation handle passed in from STCInviteRequestCallback. + * + * @param[in] response - TRUE to accept and FALSE to reject. + * + * @return STCSendInviteResponse returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle or hInvite is an invalid pointer.) + *
E_FAIL + *
Possible Reason: The remote session has been lost in the duration of this call. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSendInviteResponse(STC_HANDLE sdkHandle, HSTCINVITE hInvite, bool response); + +///@} + + +/** + ******************************************************************************************* + * @defgroup CommunicationAPI Communication + * + * @brief This API allows you to send and receive data to and from the remote sessions.\ref TutorialComms "How to use" + * + * @note Calling other STC functions from a callback is discouraged + * as it may result in a deadlock. + ******************************************************************************************* + */ +///@{ + +/** + * This function connects the supplied socket to the datasource represented by hSteram. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] sock - A valid WinSock2 socket created for AF_INET, SOCK_STREAM, IPPROTO_TCP. + * + * @param[in] hStream - The stream given in the invite complete callback. + * + * @return STCConnectSocket returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer or the socket is invalid, corrupt, or already connected.) + *
E_FAIL + *
Possible Reason: Socket failed to connect on WINAPI connect function. According to http://msdn.microsoft.com, WSAGetLastError() may provide a specific error code for further debugging. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * @code +// create the socket +sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); +if( sock != INVALID_SOCKET ){ + // Initialize the socket with hstream got from the callback on STCInviteCompleteCallback. + STC_RESULT = STCConnectSocket(sock, hStream); + if(! SUCCEEDED( STC_RESULT ) ) + { + //ERROR:STCConnectSocket connect Failed + return E_HANDLE; + } +} + * @endcode + * + */ +STC_API STC_RESULT STCConnectSocket(STC_HANDLE sdkHandle, SOCKET sock, HSTCSTREAM hStream); + +///@} +#ifdef ENABLE_CLOUD_REGISTRATION +/** + ******************************************************************************************* + * @defgroup CloudCheckAPI Cloud Registration + * + * @brief This API allows you to perform checks and the initial steps needed to + * register and communicate with the Cloud. + * + * @remarks On Windows, it is suggested to use the ISVLib APIs for cloud registration. + * + * @note Calling other STC functions from a callback is discouraged + * as it may result in a deadlock. + ******************************************************************************************* + */ +///@{ + +/** + * @brief This callback is used to obtain the LoginURI from the service. + * + * @param[out] message - A pointer to a @ref _CLOUDLOGINURI struct containing LoginURI from the service. + * + */ +typedef void (CALLBACK *STCCloudURIUpdateCallback)(PSTCCloudLoginURI message, PVOID callbackArg); + +/** + * @brief This callback is used to obtain the LoginURI Properties from the service. + * @note This callback will be returned on any/all updates to the authorization (including registration status). + * + * @param[out] message - A pointer to a @ref _CLOUDAUTHORIZATION struct containing authorization properties. + * + */ + +typedef void (CALLBACK *STCCloudAuthorizationUpdateCallback)(PSTCCloudAuthorization message, + PVOID callbackArg); + +/** + * @brief This callback is used to obtain information about the status of Registration with the Cloud from the service. + * + * @note This callback is guaranteed to only be returned immediately after calling @ref STCQueryRegistrationStatus. + * + * @param[out] message - A pointer to a @ref _CLOUDREGISTRATION struct containing registration properties. + * + */ + +typedef void (CALLBACK *STCCloudRegistrationStatusChangedCallback)(PSTCCloudRegistration message, + PVOID callbackArg); + +/** + * This function registers the callback that will be called in response to @ref STCQueryLoginURI. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that the Intel CCF SDK will call in response to @ref STCQueryLoginURI. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetCloudURIUpdateCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetCloudURIUpdateCallback(STC_HANDLE sdkHandle, + STCCloudURIUpdateCallback callback, PVOID callbackArg); + +/** + * This function registers the callback that will be called in response to any cloud authorization updates. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that the Intel CCF SDK will call in response to @ref STCRegisterWithCloud or + * @ref STCCheckCloudAuthorization. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetCloudAuthorizationUpdateCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetCloudAuthorizationUpdateCallback(STC_HANDLE sdkHandle, + STCCloudAuthorizationUpdateCallback callback, PVOID callbackArg); + +/** + * This function registers the callback that will be called in response to any cloud authorization updates. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Callback that the Intel CCF SDK will call in response to @ref STCQueryRegistrationStatus. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetCloudRegistrationStatusChangedCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetCloudRegistrationStatusChangedCallback(STC_HANDLE sdkHandle, + STCCloudRegistrationStatusChangedCallback callback, PVOID callbackArg); + +/** + * @brief Set the cloud token and query ID to use for connecting to cloud resources. + * + * After calling STCQueryLoginURI, Intel CCF will call the STCCloudURIUpdateCallback + * function passed to STCQueryLoginURI with the login URI as a parameter. + * The registration token and query Id will be included as GET parmeters + * on the login URI. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API + * + * @param[in] registrationToken[STC_MAX_CHAR_ARRAY_LENGTH] - The token for use with registering with cloud + * + * @param[out] queryId - JobId/queryId returns 0 if error. Otherwise it is the jobId. + * + * @return STCRegisterWithCloud returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle or queryId is an invalid pointer.) + *
E_FAIL | E_NOT_VALID_STATE + *
Check internet connectivity. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCRegisterWithCloud(STC_HANDLE sdkHandle, char registrationToken[1024], + PDWORD queryId); + +/** + * @brief This function sets the callback for URI Updates and retrieves the jobId number. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Upon callback, will return the LoginURI Properties. + * + * @param[in] clientID[STC_MAX_CHAR_ARRAY_LENGTH] - The session or application(if applicable) Id registered with FedId. + * + * @param[in] redirectURI[STC_MAX_CHAR_ARRAY_LENGTH] - URI/URL to be used as the redirect from the cloud servers. (i.e. https://www.google.com) + * + * @param[out] queryId - JobId /queryId returns 0 if error. Otherwise it is the jobId. + * + * @return STCQueryLoginURI returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG
+ *
One of the parameters passed is invalid (i.e.sdkHandle or queryId is an invalid pointer.) + * @ref STCInit was called with incorrect parameters for @ref _STCAPPLICATIONID struct. + * One or more of the parameters given in this call were incorrect or invalid. + *
E_FAIL | E_NOT_VALID_STATE
+ *
Check internet connectivity. + *
STC_ERROR_NOT_INITIALIZED
+ *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCQueryLoginURI(STC_HANDLE sdkHandle, char clientID[STC_MAX_CHAR_ARRAY_LENGTH], + char redirectURI[STC_MAX_CHAR_ARRAY_LENGTH], PDWORD queryId); + +/** + * @brief This function is used for expansion of LoginURI properties. + * + * It works in accordance with the STCQueryLoginURI() function. Any + * properties added with this method will be passed once STCQueryLoginURI() is called. + * + * @note Do not add parameters that are already included in the STCQueryLoginURI() function call. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] extendedProperty[] - Array of parameters to be added to LoginURI Properties list. + * + * @param[in] sizeOfArray - Number of properties to be added to the LoginURI properties list. 0 is not a valid. + * + * @return STCAddExtendedProperty returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle or extendedProperty is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCAddExtendedProperty(STC_HANDLE sdkHandle, + STCExtendedProperty *extendedProperty[], int sizeOfArray); + +/** + * @brief This call obtains the status of Registration with the Cloud from the service. The jobId is handed back. + * + * @note This callback is only guaranteed to be returned immediately after making this call. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Upon callback, hands up status information regarding the cloud servers/local service certificates/tokens. + * + * @param[out] queryId - JobId/QueryId returns 0 if error, otherwise it is the jobId. + * + * @return STCQueryRegistrationStatus returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle queryId is an invalid pointer.) + *
E_FAIL | E_NOT_VALID_STATE + *
Check internet connectivity. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCQueryRegistrationStatus(STC_HANDLE sdkHandle, PDWORD queryId); + +/** + * @brief This call obtains the local service's authorization status with the cloud servers. + * @note This callback will be returned on any/all updates to the authorization (including registration status). + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - Upon callback, hands up status information regarding the cloud servers/local service certificates/tokens. + * + * @return STCCheckCloudAuthorization returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
E_FAIL | E_NOT_VALID_STATE + *
Check internet connectivity. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCCheckCloudAuthorization(STC_HANDLE sdkHandle, PDWORD queryId); + +///@} + +#endif //ENABLE_CLOUD_REGISTRATION + + + +/** + ******************************************************************************************* + * @defgroup DiscoveryNodeAPI Discovery Node + * + * @brief This API allows creating, joining & leaving the node in Discovery Node services. + * Updates for these functionalities will be provided in STCDiscoveryNodeUpdateCallback() + * by registering the function in STCSetDiscoveryNodeUpdateCallback(). \ref TutorialDiscoveryoverNode "How to Use" + * + * @note Calling other STC functions from a callback is discouraged + * as it may result in a deadlock. + ******************************************************************************************* + */ +///@{ + +/** + * This callback is called from the CCF service whenever an update to a discovery node is available. + * + * @param[out] discoveryNode_Update - A pointer to @ref _STCDISCOVERYNODECREDENTIALSUPDATE struct that contains information pertaining to a specific discovery node. + * + * @param[out] callbackArg - The pointer passed when setting the callback. + * + * @remarks Your application must handle the possible error cases appropriately. @ref STCNodeLastError + * + */ +typedef void (CALLBACK *STCDiscoveryNodeUpdateCallback)(PSTCDiscoveryNodeCredentialsUpdate + discoveryNode_Update, PVOID callbackArg); + +/** + * This function sets the callback that will be called when a discovery node is updated from the cloud. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] callback - The callback to be associated with any/all Discovery Node updates. + * + * @param[in] callbackArg (OPTIONAL) - Verifying argument to be sent back with callback. + * + * @return STCSetDiscoveryNodeUpdateCallback returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) + *
STC_ERROR_COMPLETE_CALLBACK_NOT_SET | E_FAIL + *
Invalid pointer to callback. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCSetDiscoveryNodeUpdateCallback(STC_HANDLE sdkHandle, + STCDiscoveryNodeUpdateCallback callback, PVOID callbackArg); + + +/** + * @brief This function joins the current session to the Discovery Node specified by the discoveryNodeCredentials parameter. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] discoveryNodeCredentials - A populated @ref _STCDISCOVERYNODECREDENTIALS struct to choose the proper node to join (data(Node Name) & nodeFlags are the arguments need to be updated in the struct). + * + * @param[out] SubscriptionResult - A result of type @ref STCSubscriptionResult handed down from the stack regarding the cloud connections. + * + * @remark You may only have one subscription to a specific Discovery Node. + * + * @return STCJoinDiscoveryNode returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, discoveryNodeCredentials, or SubscriptionResult is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCJoinDiscoveryNode(STC_HANDLE sdkHandle, + STCDiscoveryNodeCredentials *discoveryNodeCredentials, PDWORD SubscriptionResult); + +/** + * @brief This function creates a Discovery Node specified by the discoveryNodeCredentials parameter. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] discoveryNodeCredentials - A populated @ref _STCDISCOVERYNODECREDENTIALS struct to choose the proper node to create/join (data(Nodename) & nodeFlags are the arguments need to be updated in the struct). + * + * @param[out] SubscriptionResult - A result of type @ref STCSubscriptionResult handed down from the stack regarding the cloud connections. + * + * @remark You may only have one subscription to a specific Discovery Node. + * + * @return STCCreateDiscoveryNode returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, discoveryNodeCredentials, or SubscriptionResult is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * @code + STC_RESULT STC_RESULT = STC_SUCCESS; + discveroyNodeCredentials structName = {0}; //Initialize struct to 0. + DWORD subscriptionResult = 0; + structName.data = NodeA ; + structName.nodeFlags = STC_NODE_TYPE_PUBLISH; + STC_RESULT = STCCreateDiscoveryNode(&structName, &subscriptionResult); + if(STC_RESULT == STC_SUCCESS) + { + If(subscriptionResult == STC_SUBSCRIPTIONRESULT_SUBSCRIPTIONCHANGED) + { + //Request send to the Discovery Node server to create your discovery Node + } + } + * @endcode + * + */ +STC_API STC_RESULT STCCreateDiscoveryNode(STC_HANDLE sdkHandle, + STCDiscoveryNodeCredentials *discoveryNodeCredentials, PDWORD SubscriptionResult); + +/** + * @brief This function unjoins the current session from the Discovery Node specified by the discoveryNodeCredentials parameter. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] discoveryNodeCredentials - A populated @ref _STCDISCOVERYNODECREDENTIALS struct to choose the proper node to leave (data(Node Name) & nodeFlags are the arguments need to be updated in the struct) + * + * @param[out] SubscriptionResult - A result of type @ref STCSubscriptionResult handed down from the stack regarding the cloud connections. + * + * @return STCLeaveDiscoveryNode returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, discoveryNodeCredentials, or SubscriptionResult is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCLeaveDiscoveryNode(STC_HANDLE sdkHandle, + STCDiscoveryNodeCredentials *discoveryNodeCredentials, PDWORD SubscriptionResult); + +#ifndef ANDROID +/** + * @brief This function indicates which transports are enabled on this device. + * + * @param[in] STC_HANDLE - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] DWORD - Bit values indicating which transports are enabled. + * Possible values are: STC_TRANSPORT_NONE (0x00) + * STC_TRANSPORT_BLUETOOTH (0x01) + * STC_TRANSPORT_ALL (0xFFFFFFFF) + * @return STCActiveDiscoveryIsEnabled returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. This API indicates which transports, in any, are enabled. + * The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * @code + STC_RESULT stcResult; + STCTransport transport; + + STC_RESULT = STCActiveDiscoveryIsEnabled(&sdkHandle, &transport); + * @endcode + * + */ +STC_API STC_RESULT STCActiveDiscoveryIsEnabled(STC_HANDLE sdkHandle, DWORD *pTransport); + +/** + * @brief This function indicates the transports on which we are visible to others. + * + * @param[in] STC_HANDLE - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] DWORD - Bit values indicating the transports on which we are visible to others. + * Possible values are: STC_TRANSPORT_NONE (0x00) + * STC_TRANSPORT_BLUETOOTH (0x01) + * STC_TRANSPORT_ALL (0xFFFFFFFF) + * @return STCActiveDiscoveryIsVisible returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. This API indicating the transports on which we are visible to others. + * The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * @code + STC_RESULT stcResult; + STCTransport transport; + + STC_RESULT = STCActiveDiscoveryIsVisible(&sdkHandle, *pTransport); + * @endcode + * + */ +STC_API STC_RESULT STCActiveDiscoveryIsVisible(STC_HANDLE sdkHandle, DWORD *pTransport); + +/** + * @brief This function enables visiblity on the transports that are functionally enabled. + * + * @param[in] STC_HANDLE - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] STCTransport - Enum bit values indicating the transports where we will be visible to others. + * Possible values are: STC_TRANSPORT_NONE (0x00) + * STC_TRANSPORT_BLUETOOTH (0x01) + * STC_TRANSPORT_ALL (0xFFFFFFFF) + * @return STCActiveDiscoveryEnableVisibility returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. This API indicates which transports, in any, will allow you to be visible + * to others. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
E_FAIL + *
The requested transport failed to make this device become visible. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * @code + STC_RESULT stcResult; + STCTransport transport; + + STC_RESULT = STCActiveDiscoveryEnableVisibility(&sdkHandle, *pTransport); + * @endcode + * + */ +STC_API STC_RESULT STCActiveDiscoveryEnableVisibility(STC_HANDLE sdkHandle, DWORD transport); + +/** + * @brief This function initiates a BlueTooth discovery. + * + * @param[in] STC_HANDLE - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[in] long - A value indicating how long a scan will run. + * + * @return STCActiveDiscoveryTriggerDiscovery returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. This API starts a BlueTooth discovery only. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid. + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
E_FAIL + *
The transport failed to start a discovery process. + *
+ * @code + STC_RESULT stcResult; + STC_HANDLE sdkHandle = NULL; //Initialize. + + STC_RESULT = STCActiveDiscoveryTriggerDiscovery(&sdkHandle, timeout); + * @endcode + * + */ +STC_API STC_RESULT STCActiveDiscoveryTriggerDiscovery(STC_HANDLE sdkHandle, long timeout); +#endif // ANDROID + +/** + * @brief This function gets the status of the Discovery Node Service. + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * + * @param[out] status - The Discovery Node Service Status + * + * @return STCQueryDiscoveryNodeServiceStatus returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e., sdkHandle or status is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCQueryDiscoveryNodeServiceStatus(STC_HANDLE sdkHandle, PDWORD status); + +///@} + + + +/** + ******************************************************************************************* + * @defgroup Logging Logging APIs + * + * @brief This API allows starting, stopping the Debug Agent and writing log + * + ******************************************************************************************* + */ +///@{ +#if defined(UNICODE) && !defined(STC_NO_UNICODE) +#define STCStartAgent STCStartAgentW +#define STCWriteLog STCWriteLogW + +#define STCSendSignalData STCSendSignalDataW +#else +#define STCStartAgent STCStartAgentA +#define STCWriteLog STCWriteLogA + +#define STCSendSignalData STCSendSignalDataA +#endif +/** + * This function starts the Debug Agent and specifies a log file to write to. + * + * @remarks The following parameters can be used as default values if you don't require extra functionality: + * pFileName = NULL, module = Module_AllModules, logLevel = LogLevel_Info, enableDataLogging = false + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * @param[in] appGuid - The GUID of the application calling this function. + * @param[in] pAppName - A pointer to the wchar_t array with the name of the application calling this function. + * @param[in] loggingMode - A list of flags that determine the logging modes to be used: (defined above) + * Offline logging only = 1 + * Online logging only = 2 + * Both offline and online logging = 3 + * @param[in] pFileName - A pointer to the wchar_t array of the offline logging file name. If pFileName == NULL, a default name is used. + * This parameter must only contain a file name and must not include a path. All logs are save to user's "temp" directory + * @param[in] module - The modules that will act as a filter for logging messages. Consists of several tags as a bitmask. + * @param[in] logLevel - The lowest(inclusive) log level, per tag, to include in the file. + * @param[in] enableDataLogging - A flag, enabling/disabling data logging. + * + * @return STCStartAgentW returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, pAppName, or pFileName is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ + +STC_API STC_RESULT STCStartAgentW(STC_HANDLE sdkHandle, GUID appGuid, wchar_t *pAppName, + LogMode loggingMode, wchar_t *pFileName, Module module, LogLevel logLevel, bool enableDataLogging); + +/** + * This function starts the Debug Agent and specifies a log file to write to. + * + * @remarks The following parameters can be used as default values if you don't require extra functionality: + * pFileName = NULL, module = Module_AllModules, logLevel = LogLevel_Info, enableDataLogging = false + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * @param[in] appGuid - The GUID of the application calling this function. + * @param[in] szAppName - A pointer to the char array with the name of the application calling this function. + * @param[in] loggingMode - A list of flags that determine the logging modes to be used: (defined above) + * Offline logging only = 1 + * Online logging only = 2 + * Both offline and online logging = 3 + * @param[in] szFileName - A pointer to the char array of the offline logging file name. If szFileName == NULL, a default name is used. + * This parameter must only contain a file name and must not include a path. All logs are save to user's "temp" directory + * @param[in] module - The modules that will act as a filter for logging messages. Consists of several tags as a bitmask. + * @param[in] logLevel - The lowest(inclusive) log level, per tag, to include in the file. + * @param[in] enableDataLogging - A flag, enabling/disabling data logging. + * + * @return STCStartAgent returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, pAppName, or pFileName is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ + +STC_API STC_RESULT STCStartAgentA(STC_HANDLE sdkHandle, GUID appGuid, char *szAppName, + LogMode loggingMode, char *szFileName, Module module, LogLevel logLevel, bool enableDataLogging); + +/** +* This function stops the Debug Agent. +* +* @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. +* @param[in] appGuid - The GUID of the application calling this function. +* +* @return STCStopAgent returns @ref STC_SUCCESS upon success or a code indicating +* why it failed. The return code may be a STC Result Code +* or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). +* Common error STC_RESULT%s include: +*
+*
E_INVALIDARG +*
One of the parameters passed is invalid (i.e.sdkHandle is an invalid pointer.) +*
STC_ERROR_NOT_INITIALIZED +*
The application has not been initialized against the Intel CCF service. +*
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" +*
The application needs to re-initialize with the Intel CCF service. +*
+* +*/ +STC_API STC_RESULT STCStopAgent(STC_HANDLE sdkHandle, GUID appGuid); + +/** + * This function writes a log entry. + * + * @remarks The following parameters can be used as default values if you don't require extra functionality: + * pMessage = NULL, sizeInBytes = 0, pData = NULL + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * @param[in] appGuid - The GUID of the application calling this function. + * @param[in] module - The tag (source module) of this entry. + * @param[in] logLevel - The log level of this entry. + * @param[in] pMessage - Text message of the log entry (NULL Terminated). + * @param[in] sizeInBytes - The size (in bytes) of the data (optional) that may be associated with this message. May Be Zero. + * @param[in] pData - A pointer to binary data. May Be NULL. + * + * @return STCWriteLogW returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, pMessage, or pData is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCWriteLogW(STC_HANDLE sdkHandle, GUID appGuid, Module module, + LogLevel logLevel, wchar_t *pMessage, int sizeInBytes, char *pData); + +/** + * This function writes a log entry. + * + * @remarks The following parameters can be used as default values if you don't require extra functionality: + * pMessage = NULL, sizeInBytes = 0, pData = NULL + * + * @param[in] sdkHandle - The handle to the instance of the Intel CCF SDK to use for this API. + * @param[in] appGuid - The GUID of the application calling this function. + * @param[in] module - The tag (source module) of this entry. + * @param[in] logLevel - The log level of this entry. + * @param[in] szMessage - Text message of the log entry (NULL Terminated). + * @param[in] sizeInBytes - The size (in bytes) of the data (optional) that may be associated with this message. May Be Zero. + * @param[in] pData - A pointer to binary data. May Be NULL. + * + * @return STCWriteLog returns @ref STC_SUCCESS upon success or a code indicating + * why it failed. The return code may be a STC Result Code + * or a Windows [STC_RESULT](http://msdn.microsoft.com/en-us/library/cc704587.aspx). + * Common error STC_RESULT%s include: + *
+ *
E_INVALIDARG + *
One of the parameters passed is invalid (i.e.sdkHandle, pMessage, or pData is an invalid pointer.) + *
STC_ERROR_NOT_INITIALIZED + *
The application has not been initialized against the Intel CCF service. + *
STC_RESULT Error Code: 0x800706BA "The RPC Server is unavailable" + *
The application needs to re-initialize with the Intel CCF service. + *
+ * + */ +STC_API STC_RESULT STCWriteLogA(STC_HANDLE sdkHandle, GUID appGuid, Module module, + LogLevel logLevel, char *szMessage, int sizeInBytes, char *pData); +///@} + +/** +* INTEL(R) CONFIDENTIAL +*/ + +///@} + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/samples/HelloCcf/proj.android/jni/include/uuid.h b/samples/HelloCcf/proj.android/jni/include/uuid.h new file mode 100755 index 0000000..f0a3f44 --- /dev/null +++ b/samples/HelloCcf/proj.android/jni/include/uuid.h @@ -0,0 +1,103 @@ +//****************************************************************** +// +// Copyright 2010-2014 Intel Corporation All Rights Reserved. +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// +//****************************************************************** +// File name: +// uuid.h +// +// Description: Helper UUID funtions +// +// +// +//********************************************************************* + +#ifndef __CS_UUID__H +#define __CS_UUID__H + +//NOTE: This is a temporary fix. A better solution would be to remove +//the dependency on APIs that are not intended to be public from libraries +//that use these APIs (portable C SDK) +#pragma GCC visibility push(default) + +#include +#include + +#define UUID_STRING_SIZE (37) //AAAABBBB-CCCC-DDDD-EEEE-001122334455 + + +#ifdef _WINRT + +// The UUID definition comes from windows +#include "stcdef.h" + +#else //_WINRT + +typedef struct UUID_t +{ + uint32_t data1; + uint16_t data2; + uint16_t data3; + uint8_t data4[8]; +} UUID_t; + +#define DECLARE_GUID(name) extern "C" const UUID_t name + +#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) extern "C" const UUID_t name = { l,w1,w2, {b1,b2,b3,b4,b5,b6,b7,b8} } + + +//#define DECLARE_GUID(name) extern const UUID_t name = { l,w1,w2, {b1,b2,b3,b4,b5,b6,b7,b8} } + +#define IS_UUID_EQUAL(_x, _y) ((_x.data1 == _y.data1) && (_x.data2 == _y.data2) && (_x.data3 == _y.data3) && (_x.data4[0] == _y.data4[0]) && (_x.data4[1] == _y.data4[1]) && (_x.data4[2] == _y.data4[2]) && (_x.data4[3] == _y.data4[3]) && (_x.data4[4] == _y.data4[4]) && (_x.data4[5] == _y.data4[5]) && (_x.data4[6] == _y.data4[6]) && (_x.data4[7] == _y.data4[7])) +#define IS_UUID_NULL(_x) ((_x.data1 == 0) && (_x.data2 == 0) && (_x.data3 == 0) && (_x.data4[0] == 0) && (_x.data4[1] == 0) && (_x.data4[2] == 0) && (_x.data4[3] == 0) && (_x.data4[4] == 0) && (_x.data4[5] == 0) && (_x.data4[6] == 0) && (_x.data4[7] == 0)) + +#define ASSIGN_UUID_TO_UUID(_dst, _src) ((UUID_t *)_src)->data1 = ((UUID_t *)_dst)->data1; \ + ((UUID_t *)_src)->data2 = ((UUID_t *)_dst)->data2; \ + ((UUID_t *)_src)->data3 = ((UUID_t *)_dst)->data3; \ + ((UUID_t *)_src)->data4[0] = ((UUID_t *)_dst)->data4[0]; \ + ((UUID_t *)_src)->data4[1] = ((UUID_t *)_dst)->data4[1]; \ + ((UUID_t *)_src)->data4[2] = ((UUID_t *)_dst)->data4[2]; \ + ((UUID_t *)_src)->data4[3] = ((UUID_t *)_dst)->data4[3]; \ + ((UUID_t *)_src)->data4[4] = ((UUID_t *)_dst)->data4[4]; \ + ((UUID_t *)_src)->data4[5] = ((UUID_t *)_dst)->data4[5]; \ + ((UUID_t *)_src)->data4[6] = ((UUID_t *)_dst)->data4[6]; \ + ((UUID_t *)_src)->data4[7] = ((UUID_t *)_dst)->data4[7]; + +#endif // _WINRT + + +DECLARE_GUID(NULL_GUID); + +typedef char UUIDString_t[UUID_STRING_SIZE]; + +/* + * Converts a uuid string to the qwarq ipc uuid + */ +int StringToUuid(const char *guidString, UUID_t *out); + +/* + * Converts a uuid string to the transport uuid + */ +//int UuidStringToTransportUuid(char *guidString, UUID_t *out); + +/* + * Converts a uuid to a string + */ +void UuidToString(const UUID_t &uuid, char *guidString, bool lowerCase = false); + + +std::string UuidToString(const UUID_t &uuid, bool lowerCase = false); + +/** + * Generate a UUID. + */ +void OSAL_GenerateUUID(UUID_t *uuid); + +void DebugMessageUuid(const UUID_t &uuid); + +typedef std::list GuidList_t; + +#pragma GCC visibility pop +#endif diff --git a/samples/HelloCcf/proj.android/jni/include/wintypes.h b/samples/HelloCcf/proj.android/jni/include/wintypes.h new file mode 100755 index 0000000..749027a --- /dev/null +++ b/samples/HelloCcf/proj.android/jni/include/wintypes.h @@ -0,0 +1,31 @@ +//****************************************************************** +// +// Copyright 2013-2014 Intel Corporation All Rights Reserved. +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// +//****************************************************************** +// File name: +// wintypes.h +// +// Description: +// +// +// +// +//********************************************************************* + +#pragma once +#ifndef __WINTYPES_H +#define __WINTYPES_H + +#include "uuid.h" + +typedef unsigned char BYTE, *PBYTE; +typedef unsigned char UINT8; +typedef UUID_t GUID; +typedef unsigned long ULONG; +typedef const wchar_t *LPCWSTR; +typedef char CHAR; +typedef wchar_t WCHAR; +#endif diff --git a/samples/HelloCcf/proj.android/libs/.DS_Store b/samples/HelloCcf/proj.android/libs/.DS_Store new file mode 100644 index 0000000..97fd107 Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/.DS_Store differ diff --git a/samples/HelloCcf/proj.android/libs/android-support-v4.jar b/samples/HelloCcf/proj.android/libs/android-support-v4.jar new file mode 100755 index 0000000..9056828 Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/android-support-v4.jar differ diff --git a/samples/HelloCcf/proj.android/libs/armeabi-v7a/.DS_Store b/samples/HelloCcf/proj.android/libs/armeabi-v7a/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/armeabi-v7a/.DS_Store differ diff --git a/samples/HelloCcf/proj.android/libs/armeabi-v7a/libAFE.so b/samples/HelloCcf/proj.android/libs/armeabi-v7a/libAFE.so new file mode 100755 index 0000000..1f9cb02 Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/armeabi-v7a/libAFE.so differ diff --git a/samples/HelloCcf/proj.android/libs/armeabi-v7a/libSTC.so b/samples/HelloCcf/proj.android/libs/armeabi-v7a/libSTC.so new file mode 100755 index 0000000..d54a7f4 Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/armeabi-v7a/libSTC.so differ diff --git a/samples/HelloCcf/proj.android/libs/armeabi-v7a/libstcapi.so b/samples/HelloCcf/proj.android/libs/armeabi-v7a/libstcapi.so new file mode 100755 index 0000000..a931e74 Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/armeabi-v7a/libstcapi.so differ diff --git a/samples/HelloCcf/proj.android/libs/armeabi-v7a/libstcjnimediator.so b/samples/HelloCcf/proj.android/libs/armeabi-v7a/libstcjnimediator.so new file mode 100755 index 0000000..e720a92 Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/armeabi-v7a/libstcjnimediator.so differ diff --git a/samples/HelloCcf/proj.android/libs/armeabi/.DS_Store b/samples/HelloCcf/proj.android/libs/armeabi/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/armeabi/.DS_Store differ diff --git a/samples/HelloCcf/proj.android/libs/armeabi/libAFE.so b/samples/HelloCcf/proj.android/libs/armeabi/libAFE.so new file mode 100755 index 0000000..d97d3bf Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/armeabi/libAFE.so differ diff --git a/samples/HelloCcf/proj.android/libs/armeabi/libSTC.so b/samples/HelloCcf/proj.android/libs/armeabi/libSTC.so new file mode 100755 index 0000000..32f9aab Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/armeabi/libSTC.so differ diff --git a/samples/HelloCcf/proj.android/libs/armeabi/libstcapi.so b/samples/HelloCcf/proj.android/libs/armeabi/libstcapi.so new file mode 100755 index 0000000..90efa95 Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/armeabi/libstcapi.so differ diff --git a/samples/HelloCcf/proj.android/libs/armeabi/libstcjnimediator.so b/samples/HelloCcf/proj.android/libs/armeabi/libstcjnimediator.so new file mode 100755 index 0000000..6d6defc Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/armeabi/libstcjnimediator.so differ diff --git a/samples/HelloCcf/proj.android/libs/stclibcc.jar b/samples/HelloCcf/proj.android/libs/stclibcc.jar new file mode 100755 index 0000000..4883b4b Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/stclibcc.jar differ diff --git a/samples/HelloCcf/proj.android/libs/x86/.DS_Store b/samples/HelloCcf/proj.android/libs/x86/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/x86/.DS_Store differ diff --git a/samples/HelloCcf/proj.android/libs/x86/libAFE.so b/samples/HelloCcf/proj.android/libs/x86/libAFE.so new file mode 100755 index 0000000..48d5d32 Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/x86/libAFE.so differ diff --git a/samples/HelloCcf/proj.android/libs/x86/libSTC.so b/samples/HelloCcf/proj.android/libs/x86/libSTC.so new file mode 100755 index 0000000..609ec26 Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/x86/libSTC.so differ diff --git a/samples/HelloCcf/proj.android/libs/x86/libstcapi.so b/samples/HelloCcf/proj.android/libs/x86/libstcapi.so new file mode 100755 index 0000000..6eb116e Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/x86/libstcapi.so differ diff --git a/samples/HelloCcf/proj.android/libs/x86/libstcjnimediator.so b/samples/HelloCcf/proj.android/libs/x86/libstcjnimediator.so new file mode 100755 index 0000000..a14a5cd Binary files /dev/null and b/samples/HelloCcf/proj.android/libs/x86/libstcjnimediator.so differ diff --git a/samples/HelloCcf/proj.android/local.properties b/samples/HelloCcf/proj.android/local.properties new file mode 100644 index 0000000..d910bde --- /dev/null +++ b/samples/HelloCcf/proj.android/local.properties @@ -0,0 +1,10 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. + +# location of the SDK. This is only used by Ant +# For customization when using a Version Control System, please read the +# header note. +sdk.dir=/Users/calf/android-sdk-macosx diff --git a/samples/HelloCcf/proj.android/proguard-project.txt b/samples/HelloCcf/proj.android/proguard-project.txt new file mode 100644 index 0000000..f2fe155 --- /dev/null +++ b/samples/HelloCcf/proj.android/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/samples/HelloCcf/proj.android/res/.DS_Store b/samples/HelloCcf/proj.android/res/.DS_Store new file mode 100644 index 0000000..02e90d8 Binary files /dev/null and b/samples/HelloCcf/proj.android/res/.DS_Store differ diff --git a/samples/HelloCcf/proj.android/res/drawable-hdpi/generic_avatar50x50.png b/samples/HelloCcf/proj.android/res/drawable-hdpi/generic_avatar50x50.png new file mode 100755 index 0000000..94f29bd Binary files /dev/null and b/samples/HelloCcf/proj.android/res/drawable-hdpi/generic_avatar50x50.png differ diff --git a/samples/HelloCcf/proj.android/res/drawable-hdpi/icon.png b/samples/HelloCcf/proj.android/res/drawable-hdpi/icon.png new file mode 100644 index 0000000..8aa4767 Binary files /dev/null and b/samples/HelloCcf/proj.android/res/drawable-hdpi/icon.png differ diff --git a/samples/HelloCcf/proj.android/res/drawable-ldpi/generic_avatar50x50.png b/samples/HelloCcf/proj.android/res/drawable-ldpi/generic_avatar50x50.png new file mode 100755 index 0000000..94f29bd Binary files /dev/null and b/samples/HelloCcf/proj.android/res/drawable-ldpi/generic_avatar50x50.png differ diff --git a/samples/HelloCcf/proj.android/res/drawable-ldpi/icon.png b/samples/HelloCcf/proj.android/res/drawable-ldpi/icon.png new file mode 100644 index 0000000..17ce11a Binary files /dev/null and b/samples/HelloCcf/proj.android/res/drawable-ldpi/icon.png differ diff --git a/samples/HelloCcf/proj.android/res/drawable-mdpi/generic_avatar50x50.png b/samples/HelloCcf/proj.android/res/drawable-mdpi/generic_avatar50x50.png new file mode 100755 index 0000000..94f29bd Binary files /dev/null and b/samples/HelloCcf/proj.android/res/drawable-mdpi/generic_avatar50x50.png differ diff --git a/samples/HelloCcf/proj.android/res/drawable-mdpi/icon.png b/samples/HelloCcf/proj.android/res/drawable-mdpi/icon.png new file mode 100644 index 0000000..3780aac Binary files /dev/null and b/samples/HelloCcf/proj.android/res/drawable-mdpi/icon.png differ diff --git a/samples/HelloCcf/proj.android/res/layout/unbox_layout.xml b/samples/HelloCcf/proj.android/res/layout/unbox_layout.xml new file mode 100755 index 0000000..89a0cf6 --- /dev/null +++ b/samples/HelloCcf/proj.android/res/layout/unbox_layout.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/HelloCcf/proj.android/res/values/strings.xml b/samples/HelloCcf/proj.android/res/values/strings.xml new file mode 100644 index 0000000..dd14136 --- /dev/null +++ b/samples/HelloCcf/proj.android/res/values/strings.xml @@ -0,0 +1,4 @@ + + + HelloCcf + diff --git a/samples/HelloCcf/proj.android/src/.DS_Store b/samples/HelloCcf/proj.android/src/.DS_Store new file mode 100644 index 0000000..ff4e6da Binary files /dev/null and b/samples/HelloCcf/proj.android/src/.DS_Store differ diff --git a/samples/HelloCcf/proj.android/src/com/intel/csdk/listeners/JNIListener.java b/samples/HelloCcf/proj.android/src/com/intel/csdk/listeners/JNIListener.java new file mode 100755 index 0000000..349b119 --- /dev/null +++ b/samples/HelloCcf/proj.android/src/com/intel/csdk/listeners/JNIListener.java @@ -0,0 +1,56 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package com.intel.csdk.listeners; + +import com.intel.csdk.wrapper.Peer; + +public interface JNIListener { + + public enum JNIStatus{ + INITIALIZED(0), + DISCOVERED(1), + CONNECTED(2), + DISCONNECTED(3); + + private int i; + JNIStatus(int i){ + this.i = i; + } + + public int getJNIStatus(){ + return this.i; + } + }; + + public void onPeerUpdated(Peer peer); + public void onP2PConnectionStatus(Peer peer, long value); + public void receiveP2PMessage(String msg); + public void onP2PConnectionRequest(Peer peer, long handle); + public void onJNIStatusUpdate(JNIStatus status); +} diff --git a/samples/HelloCcf/proj.android/src/com/intel/csdk/listeners/P2PEventListener.java b/samples/HelloCcf/proj.android/src/com/intel/csdk/listeners/P2PEventListener.java new file mode 100755 index 0000000..e6058dc --- /dev/null +++ b/samples/HelloCcf/proj.android/src/com/intel/csdk/listeners/P2PEventListener.java @@ -0,0 +1,35 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package com.intel.csdk.listeners; + +public interface P2PEventListener { + + public void P2PMessageUpdate(String msg); + public void disconnectP2P(); +} diff --git a/samples/HelloCcf/proj.android/src/com/intel/csdk/wrapper/Connection.java b/samples/HelloCcf/proj.android/src/com/intel/csdk/wrapper/Connection.java new file mode 100755 index 0000000..a216b3e --- /dev/null +++ b/samples/HelloCcf/proj.android/src/com/intel/csdk/wrapper/Connection.java @@ -0,0 +1,69 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package com.intel.csdk.wrapper; + +import java.util.UUID; + +public class Connection { + private JNIMediator mJNI; + + public Connection(Initialization init) { + if(init == null) + return; + + mJNI = init.getJNIReference(); + } + + public void requestP2PConnection(String sessionId){ + mJNI.nativePeerInvitation(sessionId); + } + + public void notifyP2PRequestACK(Peer peer, long handle, boolean value){ + if(peer == null) + return; + mJNI.nativeInviteStatus(UUID.fromString(peer.getSessionId()), handle, value); + } + + public void disconnectP2PConnection(Peer peer){ + if(peer == null) + return; + mJNI.nativeDisconnectPeer(UUID.fromString(peer.getSessionId())); + } + + public void sendP2PMessage(String msg){ + mJNI.nativeSendMsg(msg); + } + + public void notifyRegisterCommunication(){ + mJNI.nativeRegisterCommunication(); + } + public void notifyRegisterDiscovery(){ + mJNI.nativeRegisterDiscovery(); + } +} diff --git a/samples/HelloCcf/proj.android/src/com/intel/csdk/wrapper/Initialization.java b/samples/HelloCcf/proj.android/src/com/intel/csdk/wrapper/Initialization.java new file mode 100755 index 0000000..3ecb6bc --- /dev/null +++ b/samples/HelloCcf/proj.android/src/com/intel/csdk/wrapper/Initialization.java @@ -0,0 +1,56 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package com.intel.csdk.wrapper; + +import android.content.Context; + +import com.intel.csdk.listeners.JNIListener; + +public class Initialization { + + private JNIMediator mJNI = null; + + public enum InitilizationStatus{ + SUCCESS, + FAILED, + NOT_INITIALIZED + }; + + public Initialization(Context context, JNIListener listen){ + mJNI = new JNIMediator(context, listen); + } + + public void initialize(String appId, String clientId, String clientSecret, String userName, String deviceName, byte [] avatar){ + mJNI.startSTCPlatform(appId, clientId, clientSecret, userName, deviceName, avatar); + } + + JNIMediator getJNIReference(){ + return mJNI; + } +} diff --git a/samples/HelloCcf/proj.android/src/com/intel/csdk/wrapper/JNIMediator.java b/samples/HelloCcf/proj.android/src/com/intel/csdk/wrapper/JNIMediator.java new file mode 100755 index 0000000..13556ee --- /dev/null +++ b/samples/HelloCcf/proj.android/src/com/intel/csdk/wrapper/JNIMediator.java @@ -0,0 +1,242 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package com.intel.csdk.wrapper; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import android.content.Context; +import android.content.SharedPreferences; +import android.util.Log; +import android.widget.Toast; + +import com.intel.csdk.listeners.JNIListener; +import com.intel.csdk.listeners.JNIListener.JNIStatus; +import com.intel.csdk.wrapper.Initialization.InitilizationStatus; +import com.intel.stc.csdk.STCPlatform; + +public class JNIMediator extends STCPlatform{ + + private Context mContext; + private JNIListener mListener = null; + private static final String LOGC = "Helloccf"; + private String mAppId = null; + private String mClientId = null; + private String mClientSecret = null; + private String mUserName = null; + private String mDeviceName = null; + private byte [] mAvatar = null; + private SharedPreferences mPreference = null; + public static List mPeerList = new ArrayList(); + + static { + System.loadLibrary("AFE"); + System.loadLibrary("STC"); + System.loadLibrary("stcapi"); + System.loadLibrary("stcjnimediator"); + } + + public native long nativeInit(String path, String app_id, String client_id,String client_secret); + public native long nativeIdentity(String userName, String deviceName, byte[] avatar,int size); + public native long nativeRegisterCommunication(); + public native long nativePeerInvitation(String peerID); + public native long nativeInviteStatus(UUID peerID,long handle, boolean value); + public native long nativeSendMsg(String msg); + public native long nativeDisconnectPeer(UUID peerID); + public native long nativeDestroyConnection(); + public native long nativeRegisterDiscovery(); + + public native void nativePeerAdd(Peer peer); + public native void nativePeerRemove(Peer peer); + public native void nativeInvite(String peerID); + public native void nativeReceiveMsg(String msg); + public native void nativeInviteAcknowledgment(); + public native void nativeDisconnect(); + + public JNIMediator(Context context, JNIListener listen){ + mContext = context; + mListener = listen; + if(mContext!=null) + mPreference = mContext.getSharedPreferences("Helloccf", Context.MODE_PRIVATE); + } + + void startSTCPlatform(String appId, String clientId,String clientSecret, String userName, String deviceName, byte [] avatar){ + mAppId = appId; + mClientId = clientId; + mClientSecret = clientSecret; + mUserName = userName; + mDeviceName = deviceName; + mAvatar = avatar; + this.start(); + Log.i(LOGC, "Starting STCPlatform to initialize the application with CSDK."); + } + public void onLocalPeerUpdates(UUID peerID, String userName, String deviceName, byte [] avatar, boolean isAvailableCloud, boolean isAvailableProximity){ + Log.i(LOGC, "sessionName: "+userName+ "sessionId: "+" availability: "+isAvailableCloud); + final Peer peer = new Peer(userName, avatar, userName, null, isAvailableCloud, isAvailableCloud, isAvailableProximity); + + if(peer.getAvailability()){ + add(peer); + }else{ + remove(peer); + } + } + + public void onPeerDiscovery(String peerID, String userName, String deviceName, byte [] avatar,Object [] appList, boolean isAvailable, boolean isAvailableCloud, boolean isAvailableProximity){ + if(peerID.length() == 0) return; + + Log.i(LOGC, "sessionName: "+userName+ "sessionId: "+" availability: "+isAvailable+ "appList size: "+appList.length); + UUID[] _appList = new UUID[appList.length]; + for(int i=0; i getPeerList(){ + synchronized (mPeerList) { + return mPeerList; + } + } + + public void onInvitationReceived(String peerID, long handle){ + Log.i(LOGC, "JNI onInviteReceived called peerID: "+peerID+" handle: "+handle); + Peer peer = queryPeer(peerID); + if(peer == null) + return; + + Log.i(LOGC, "JNI onInviteReceived called by "+ mListener); + if(mListener!=null){ + Log.i(LOGC, "JNI onInviteReceived called by "+peer.getName()); + mListener.onP2PConnectionRequest(peer, handle); + nativeInvite(peerID); + } + } + + private Peer queryPeer(String peerID){ + Peer peer = null; + for(int i=0; i{ + private String _sessionName; + private byte[] _avatar; + private String _sessionId; + private UUID[] _appList; + private boolean _availability; + private boolean _availability_cloud; + private boolean _availability_proximity; + + Peer(String sessionName, byte[] avatar, String sessionId, UUID[] appList, boolean availability, boolean isAvailableCloud, boolean isAvailableProximity) { + _sessionName = sessionName; + _avatar = avatar; + _sessionId = sessionId; + _appList = appList; + _availability = availability; + _availability_cloud = isAvailableCloud; + _availability_proximity = isAvailableProximity; + } + + Peer(String sessionName, String sessionId, boolean availability, boolean isAvailableCloud, boolean isAvailableProximity) { + _sessionName = sessionName; + _avatar = null; + _sessionId = sessionId; + _appList = null; + _availability = availability; + _availability_cloud = isAvailableCloud; + _availability_proximity = isAvailableProximity; + } + + public String getName() { + return _sessionName; + } + public byte[] getAvatar() { + return _avatar; + } + public String getSessionId() { + return _sessionId; + } + public UUID[] getAppList() { + return _appList; + } + @Override + public int compareTo(Peer o) { + return getSessionId().compareTo(o.getSessionId()); + } + public boolean getAvailability() { + return _availability; + } + public boolean isAvailableCloud(){ + return _availability_cloud; + } + public boolean isAvailableProximity(){ + return _availability_proximity; + } +} diff --git a/samples/HelloCcf/proj.android/src/org/cocos2dx/helloccf/AppActivity.java b/samples/HelloCcf/proj.android/src/org/cocos2dx/helloccf/AppActivity.java new file mode 100644 index 0000000..409339a --- /dev/null +++ b/samples/HelloCcf/proj.android/src/org/cocos2dx/helloccf/AppActivity.java @@ -0,0 +1,354 @@ +/**************************************************************************** +Copyright (c) 2008-2010 Ricardo Quesada +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2011 Zynga Inc. +Copyright (c) 2013-2014 Chukong Technologies Inc. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ +package org.cocos2dx.helloccf; + +import java.io.ByteArrayOutputStream; + +import org.cocos2dx.lib.Cocos2dxActivity; +import org.cocos2dx.lib.Cocos2dxGLSurfaceView; + +import android.annotation.SuppressLint; +import android.app.AlertDialog; +import android.app.Dialog; +import android.app.ProgressDialog; +import android.content.ComponentName; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.ServiceConnection; +import android.content.SharedPreferences; +import android.content.SharedPreferences.Editor; +import android.content.res.Configuration; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.Bitmap.CompressFormat; +import android.os.Bundle; +import android.os.Handler; +import android.os.IBinder; +import android.os.Message; +import android.util.Base64; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.EditText; +import android.widget.Toast; + +import com.cocos2dx.helloccf.R; +import com.intel.csdk.listeners.P2PEventListener; +import com.intel.csdk.wrapper.Peer; + +@SuppressLint("HandlerLeak") +public class AppActivity extends Cocos2dxActivity implements P2PEventListener { + private String mServiceIntent = "org.cocos2dx.cpp.ApplicationService"; + private Handler mHandler = new MyHandler(); + private boolean isBound; + private static final String LOGC = "Helloccf"; + private ApplicationServiceConnection mConnection = new ApplicationServiceConnection(); + private ApplicationService mService; + private SharedPreferences mPreference; + public static AppActivity sAppActivity = null; + private Dialog inviteDialog = null; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + mPreference = getSharedPreferences(LOGC, Context.MODE_PRIVATE); + startService(new Intent(mServiceIntent)); + + mPreference = getSharedPreferences("Helloccf", Context.MODE_PRIVATE); + sAppActivity = this; + } + + public Cocos2dxGLSurfaceView onCreateView() { + Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this); + glSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8); + return glSurfaceView; + } + + @Override + protected void onResume() { + Log.i(LOGC, "resuming"); + doBindService(); + super.onResume(); + } + + + @Override + protected void onPause() { + Log.i(LOGC, "pausing"); + doUnbindService(); + super.onPause(); + } + + /* private method to do the binding */ + private void doBindService() { + if(!isBound) + { + Log.i(LOGC, "binding service"); + Intent servIntent = new Intent(mServiceIntent); + isBound = bindService(servIntent, mConnection, 0); + if( !isBound ) + Log.i(LOGC, "service did not bind."); + } + } + + /* private method to do the unbinding */ + private void doUnbindService() { + if(isBound) + { + Log.i(LOGC, "unbinding service "); + isBound = false; + unbindService(mConnection); + } + } + + /*** + * Must be called by the 'starting activity'. Can be called more than once, but + * should not be called anytime after 'shutdown' has been called. + */ + protected void doStartService() { + Log.i(LOGC, "starting service"); + Intent servIntent = new Intent(mServiceIntent); + startService(servIntent); + } + + /*** + * Called to indicate that the application is finally existing. + */ + protected void doStopService() { + Log.i(LOGC, "shutting down"); + Intent servIntent = new Intent(mServiceIntent); + + mConnection.serviceExited(); + doUnbindService(); + stopService(servIntent); + } + + @Override + public void onBackPressed() + { + Log.i(LOGC, "back pressed"); + /*if(discoveryNodeFrag!=null){ + discoveryNodeFrag.removeAllDiscoveryNode(); + }*/ + finish(); + doStopService(); + super.onBackPressed(); + } + + //To save the users details in preference file. + private void setPreferences(String userName, String deviceName, String avatar){ + Editor edit = mPreference.edit(); + edit.putString("UserName", userName); + edit.putString("DeviceName", deviceName); + edit.putString("Avatar", avatar); + edit.commit(); + mService.setUserDetails(); + Log.i(LOGC, "Shared preference saved "); + } + + //Display dialog to input userName and Device Name from local user to complete unboxing process. + private void completeUnboxing(){ + Log.i(LOGC, "Identity set up started "); + + final AlertDialog.Builder alert = new AlertDialog.Builder(this); + alert.setTitle("Input your details:"); + alert.setCancelable(false); + + LayoutInflater inflater = (LayoutInflater)this.getApplicationContext() + .getSystemService(Context.LAYOUT_INFLATER_SERVICE); + View parent = inflater.inflate(R.layout.unbox_layout, null); + final EditText userName = (EditText)parent.findViewById(R.id.userName); + userName.setText(android.os.Build.MANUFACTURER+" "+android.os.Build.MODEL); + final EditText deviceName = (EditText)parent.findViewById(R.id.deviceName); + deviceName.setText("Android "+ (isTablet(this)?"Tablet" : "Phone")); + alert.setView(parent); + + alert.setPositiveButton("Save", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int whichButton) { + String user = userName.getText().toString().trim(); + String device = deviceName.getText().toString().trim(); + + Bitmap bitmap = BitmapFactory.decodeResource(AppActivity.this.getResources(), R.drawable.generic_avatar50x50); + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + bitmap.compress(CompressFormat.PNG, 0, bos); + byte [] avatar = bos.toByteArray(); + String saveAvatar = Base64.encodeToString(avatar, Base64.DEFAULT); + + Log.i(LOGC, "User Input completed -----> "); + + setPreferences(user!=null && !user.equals("")?user:android.os.Build.MANUFACTURER+android.os.Build.MODEL,device!=null && !device.equals("")?device:"Android",saveAvatar); + } + }); + alert.show(); + } + + //Validating device is a Tablet or Phone. + private boolean isTablet(Context context) { + return (context.getResources().getConfiguration().screenLayout + & Configuration.SCREENLAYOUT_SIZE_MASK) + >= Configuration.SCREENLAYOUT_SIZE_LARGE; + } + + /* ServiceConnection implementation to bind Service and Activity class*/ + public class ApplicationServiceConnection implements ServiceConnection + { + boolean serviceStopped = false; + + public void onServiceConnected(ComponentName className, IBinder binder) + { + synchronized(this) { + Log.i(LOGC, "service connected."); + if(mService == null){ + mService = (ApplicationService)((ApplicationService.LocalBinder)binder).getService(); + mService.setHandler(mHandler); + mService.intializeJNIPlatform(); + + //FriendViewByCCF.getInstance().initInstance(AppActivity.this, mService); + mService.setChatListener(AppActivity.this); + } + } + } + + public void onServiceDisconnected(ComponentName className) + { + Log.i(LOGC, "service disconnected."); + mService.stopSelf(); + } + + public void serviceExited() + { + synchronized(this) { + serviceStopped = true; + } + } + } + + /** + * This handler class is used to handle Activity events. + * + */ + private class MyHandler extends Handler{ + @Override + public void handleMessage(Message msg) { + //if(msg.what !=4) FriendViewByCCF.getInstance().hideWindow(); + + super.handleMessage(msg); + + switch(msg.what){ + + case 0: + //Set your identity. + completeUnboxing(); + break; + case 1: + //Invite received + inviteAlert(); + break; + case 2: + //Send invitation + inviteDialog = ProgressDialog.show(AppActivity.this, "", "Waiting for connection"); + break; + case 3: + //Sent invitation acknowledgment. + if(inviteDialog!=null && inviteDialog.isShowing()){ + inviteDialog.dismiss(); + } + + break; + case 5: + //Invitation rejected or timeout + if(inviteDialog!=null && inviteDialog.isShowing()){ + inviteDialog.dismiss(); + if(msg.arg1 == 0){ + Toast.makeText(AppActivity.this, "Invitation timeout!!", Toast.LENGTH_SHORT).show(); + }else{ + Toast.makeText(AppActivity.this, "Invitation rejected!!", Toast.LENGTH_SHORT).show(); + } + } + break; + } + + } + } + + //Invitation dialog to receive input from user + private void inviteAlert(){ + final AlertDialog.Builder builder = new AlertDialog.Builder(this); + + mHandler.post(new Runnable() { + + public void run() { + + builder.setPositiveButton("Accept", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + mService.sendInviteResponse(true); + } + }); + builder.setNegativeButton("Ignore", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + mService.sendInviteResponse(false); + } + }); + + builder.setTitle("Earth Warrior invite"); + builder.setMessage("Accept connection from "+mService.getInviterDetails()+" ?"); + builder.setCancelable(false); + builder.show(); + } + }); + } + + @Override + public void P2PMessageUpdate(String msg) { + } + + @Override + public void disconnectP2P() { + } + + public static void invitePeer(Peer peer) { + Log.i(LOGC, "invitePeer in AppActivity"); + AppActivity.sAppActivity.mService.invitePeer(peer); + } + + public static void sendInviteResponse(boolean value) { + Log.i(LOGC, "invitePeer in sendInviteResponse"); + AppActivity.sAppActivity.mService.sendInviteResponse(value); + } + + public static void remoteDisconnectJni() { + Log.i(LOGC, "invitePeer in remoteDisconnectJni"); + AppActivity.sAppActivity.mService.disconnectConnection(); + } + + public static void sendMessage(String msg) { + AppActivity.sAppActivity.mService.sendMsg2JNI(msg); + } + + +} diff --git a/samples/HelloCcf/proj.android/src/org/cocos2dx/helloccf/ApplicationService.java b/samples/HelloCcf/proj.android/src/org/cocos2dx/helloccf/ApplicationService.java new file mode 100755 index 0000000..74078a8 --- /dev/null +++ b/samples/HelloCcf/proj.android/src/org/cocos2dx/helloccf/ApplicationService.java @@ -0,0 +1,274 @@ +/* +Copyright (c) 2011-2013, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package org.cocos2dx.helloccf; + +import java.util.UUID; + +import android.app.Service; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.os.Binder; +import android.os.Handler; +import android.os.IBinder; +import android.os.Message; +import android.util.Base64; +import android.util.Log; + +import com.intel.csdk.listeners.P2PEventListener; +import com.intel.csdk.listeners.JNIListener; +import com.intel.csdk.wrapper.Connection; +import com.intel.csdk.wrapper.Initialization; +import com.intel.csdk.wrapper.Peer; + +/** + * This is a service class which will listen to wrapper classes like Initialization, Discovery, + * and Connection module. + * This service is responsible for following functionalities: + *

Initializing the application. + *

To register the discovery process and will discover other sessions. + *

To register the connection process to communicate with other sessions. + *

sending and receiving Invitation. + *

Sending and receiving messages. + *

+ * + */ +public class ApplicationService extends Service implements JNIListener{ + + private LocalBinder mBinder = new LocalBinder(); + private Handler mHandler; + private static final String LOGC = "Helloccf"; + private Initialization mInitialize = null; + SharedPreferences mPreference; + private Connection mConnect = null; + /** + * Binder class used to bind the service with Activity. + * + */ + public class LocalBinder extends Binder { + ApplicationService getService() { + // Return this instance of LocalService so clients can call public methods + return ApplicationService.this; + } + } + + /*Service life cycle callback, on binding the service.*/ + @Override + public IBinder onBind(Intent intent) { + + return mBinder; + } + + /*This method will set the Hanlder passed through Activity.*/ + public void setHandler(Handler handle){ + mHandler = handle; + } + + //To validate the user details saved in preference file. + private boolean validatePreferences(){ + if(mPreference.contains("UserName") && mPreference.contains("DeviceName")){ + return true; + } + return false; + } + + /** + * This method will pass the user details to Initialization wrapper. + */ + public void setUserDetails(){ + String userName = mPreference.getString("UserName", "No Data available"); + String deviceName = mPreference.getString("DeviceName", "No Data available"); + String temp = mPreference.getString("Avatar", "No Data available"); + byte[] avatar = Base64.decode(temp, Base64.DEFAULT); + mInitialize.initialize("7A1B397B-B576-44C4-943F-1BEF4F490C07", "WqODOHahg3xw6WVB0BbTMi9yazTkBoQH", "i8wP2TGxoVjINdX7", userName, deviceName, avatar); + } + + //To receive identity details from user by passing the event to activity, + private void receiveInputFromUser(Initialization init){ + mPreference = getSharedPreferences(LOGC, Context.MODE_PRIVATE); + + if(validatePreferences()){ + setUserDetails(); + }else{ + Message msg = Message.obtain(); + msg.what = 0; + mHandler.sendMessage(msg); + Log.i(LOGC, "Showing dialog to receive input from user."); + } + } + + /** + * This method is used to initialize the Initialization wrapper + */ + public void intializeJNIPlatform(){ + if(mInitialize == null){ + mInitialize = new Initialization(getApplicationContext(),ApplicationService.this); + receiveInputFromUser(mInitialize); + } + } + + @Override + public void onPeerUpdated(Peer peer) { + + Log.i(LOGC, "onPeerUpdated: "+peer.getName()); + final UUID app_id = UUID.fromString("7A1B397B-B576-44C4-943F-1BEF4F490C07"); + for(UUID hasapp : peer.getAppList()){ + if(hasapp.compareTo(app_id)==0){ + if(peer.getAvailability()){ + //mPeerAdapter.add(peer); + }else{ + //mPeerAdapter.remove(peer); + } + break; + } + } + Message msg = Message.obtain(); + msg.what = 4; + mHandler.sendMessage(msg); + } + + public void invitePeer(Peer peer){ + Log.i(LOGC, "Inviting Peer: "+peer.getName()); + mConnect.requestP2PConnection(peer.getSessionId()); + Message msg = Message.obtain(); + msg.what = 2; + mHandler.sendMessage(msg); + mInviteHandler = new InviteHandler(peer, -1); + } + + @Override + public void onP2PConnectionStatus(Peer peer, long value) { + + if(peer!=null) + Log.i(LOGC, "peer: "+peer.getName()+" Connection status: "+value); + + switch((int)value){ + + case 10: + //Invitation timeout + Message msg10 = Message.obtain(); + msg10.what = 5; + msg10.arg1 = 0; + mHandler.sendMessage(msg10); + break; + case 12: + //Invitation accepted. + Message msg12 = Message.obtain(); + msg12.what = 3; + mHandler.sendMessage(msg12); + break; + case 13: + //Invitation rejected + Message msg13 = Message.obtain(); + msg13.what = 5; + msg13.arg1 = 1; + mHandler.sendMessage(msg13); + break; + case 14: + //Invitation completed. + Message msg14 = Message.obtain(); + msg14.what = 3; + mHandler.sendMessage(msg14); + break; + case 25: + //Invitation disconnected + if(mP2PListener!=null){ + mP2PListener.disconnectP2P(); + } + break; + + } + + } + + @Override + public void receiveP2PMessage(String msg) { + Log.i(LOGC, "peer Msg: "+ msg); + if(mP2PListener!=null){ + mP2PListener.P2PMessageUpdate(msg); + } + } + + @Override + public void onP2PConnectionRequest(Peer peer, long handle) { + mInviteHandler = new InviteHandler(peer, handle); + } + + private InviteHandler mInviteHandler; + private class InviteHandler{ + private Peer mPeer; + private long mHandle; + public InviteHandler(Peer peer, long handle) { + mPeer = peer; + mHandle = handle; + } + public long getConnectionHandle(){ + return mHandle; + } + public Peer getPeer(){ + return mPeer; + } + } + + public String getInviterDetails(){ + return mInviteHandler.getPeer().getName(); + } + + public void sendInviteResponse(boolean value){ + mConnect.notifyP2PRequestACK(mInviteHandler.getPeer(), mInviteHandler.getConnectionHandle(), value); + } + + @Override + public void onJNIStatusUpdate(JNIStatus status) { + + if(status.equals(JNIStatus.INITIALIZED)){ + mConnect = new Connection(mInitialize); + mConnect.notifyRegisterCommunication(); + mConnect.notifyRegisterDiscovery(); + } + + } + + private P2PEventListener mP2PListener; + public void setChatListener(P2PEventListener listener){ + mP2PListener = listener; + } + + public void sendMsg2JNI(String msg){ + if(mConnect!=null){ + mConnect.sendP2PMessage(msg); + } + } + + public void disconnectConnection(){ + if(mConnect!=null && mInviteHandler!=null){ + mConnect.disconnectP2PConnection(mInviteHandler.getPeer()); + } + } +} diff --git a/samples/HelloCcf/proj.ios_mac/.DS_Store b/samples/HelloCcf/proj.ios_mac/.DS_Store new file mode 100644 index 0000000..67a503c Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/.DS_Store differ diff --git a/samples/HelloCcf/proj.ios_mac/HelloCcf.xcodeproj/project.pbxproj b/samples/HelloCcf/proj.ios_mac/HelloCcf.xcodeproj/project.pbxproj new file mode 100644 index 0000000..a6b53fb --- /dev/null +++ b/samples/HelloCcf/proj.ios_mac/HelloCcf.xcodeproj/project.pbxproj @@ -0,0 +1,1002 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1AC6FB1F180E996B004C840B /* libbox2d Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FAFF180E9839004C840B /* libbox2d Mac.a */; }; + 1AC6FB20180E996B004C840B /* libchipmunk Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FAFD180E9839004C840B /* libchipmunk Mac.a */; }; + 1AC6FB21180E996B004C840B /* libcocos2dx Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FAF9180E9839004C840B /* libcocos2dx Mac.a */; }; + 1AC6FB22180E996B004C840B /* libcocos2dx-extensions Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FAFB180E9839004C840B /* libcocos2dx-extensions Mac.a */; }; + 1AC6FB23180E996B004C840B /* libCocosDenshion Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB01180E9839004C840B /* libCocosDenshion Mac.a */; }; + 1AC6FB2E180E99EB004C840B /* libbox2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB0D180E9839004C840B /* libbox2d iOS.a */; }; + 1AC6FB2F180E99EB004C840B /* libchipmunk iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB0B180E9839004C840B /* libchipmunk iOS.a */; }; + 1AC6FB30180E99EB004C840B /* libcocos2dx iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB07180E9839004C840B /* libcocos2dx iOS.a */; }; + 1AC6FB31180E99EB004C840B /* libcocos2dx-extensions iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB09180E9839004C840B /* libcocos2dx-extensions iOS.a */; }; + 1AC6FB32180E99EB004C840B /* libCocosDenshion iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB0F180E9839004C840B /* libCocosDenshion iOS.a */; }; + 1AFAF8B716D35DE700DB1158 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFAF8B316D35DE700DB1158 /* AppDelegate.cpp */; }; + 1AFAF8B816D35DE700DB1158 /* HelloWorldScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFAF8B516D35DE700DB1158 /* HelloWorldScene.cpp */; }; + 1AFAF8BC16D35E4900DB1158 /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AFAF8B916D35E4900DB1158 /* CloseNormal.png */; }; + 1AFAF8BD16D35E4900DB1158 /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AFAF8BA16D35E4900DB1158 /* CloseSelected.png */; }; + 1AFAF8BE16D35E4900DB1158 /* HelloWorld.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AFAF8BB16D35E4900DB1158 /* HelloWorld.png */; }; + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; + 503AE0F817EB97AB00D1A890 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 503AE0F617EB97AB00D1A890 /* Icon.icns */; }; + 503AE10017EB989F00D1A890 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503AE0FB17EB989F00D1A890 /* AppController.mm */; }; + 503AE10117EB989F00D1A890 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 503AE0FC17EB989F00D1A890 /* main.m */; }; + 503AE10217EB989F00D1A890 /* RootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503AE0FF17EB989F00D1A890 /* RootViewController.mm */; }; + 503AE10517EB98FF00D1A890 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 503AE10317EB98FF00D1A890 /* main.cpp */; }; + 503AE11217EB99EE00D1A890 /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 503AE11117EB99EE00D1A890 /* libcurl.dylib */; }; + 503AE11B17EB9C5A00D1A890 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 503AE11A17EB9C5A00D1A890 /* IOKit.framework */; }; + 5087E75317EB910900C73F5D /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AFAF8B916D35E4900DB1158 /* CloseNormal.png */; }; + 5087E75417EB910900C73F5D /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AFAF8BA16D35E4900DB1158 /* CloseSelected.png */; }; + 5087E75517EB910900C73F5D /* HelloWorld.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AFAF8BB16D35E4900DB1158 /* HelloWorld.png */; }; + 5087E75717EB910900C73F5D /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFAF8B316D35DE700DB1158 /* AppDelegate.cpp */; }; + 5087E75817EB910900C73F5D /* HelloWorldScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFAF8B516D35DE700DB1158 /* HelloWorldScene.cpp */; }; + 5087E76317EB910900C73F5D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 5087E76517EB910900C73F5D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; + 5087E76717EB910900C73F5D /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB412928DE900B8313A /* libz.dylib */; }; + 5087E76817EB910900C73F5D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF1C47EA1293683800B63C5D /* QuartzCore.framework */; }; + 5087E76917EB910900C73F5D /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620B132DFF330009C878 /* OpenAL.framework */; }; + 5087E76A17EB910900C73F5D /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620D132DFF430009C878 /* AVFoundation.framework */; }; + 5087E76B17EB910900C73F5D /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620F132DFF4E0009C878 /* AudioToolbox.framework */; }; + 5087E77D17EB970100C73F5D /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77217EB970100C73F5D /* Default-568h@2x.png */; }; + 5087E77E17EB970100C73F5D /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77317EB970100C73F5D /* Default.png */; }; + 5087E77F17EB970100C73F5D /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77417EB970100C73F5D /* Default@2x.png */; }; + 5087E78017EB970100C73F5D /* Icon-114.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77517EB970100C73F5D /* Icon-114.png */; }; + 5087E78117EB970100C73F5D /* Icon-120.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77617EB970100C73F5D /* Icon-120.png */; }; + 5087E78217EB970100C73F5D /* Icon-144.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77717EB970100C73F5D /* Icon-144.png */; }; + 5087E78317EB970100C73F5D /* Icon-152.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77817EB970100C73F5D /* Icon-152.png */; }; + 5087E78417EB970100C73F5D /* Icon-57.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77917EB970100C73F5D /* Icon-57.png */; }; + 5087E78517EB970100C73F5D /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77A17EB970100C73F5D /* Icon-72.png */; }; + 5087E78617EB970100C73F5D /* Icon-76.png in Resources */ = {isa = PBXBuildFile; fileRef = 5087E77B17EB970100C73F5D /* Icon-76.png */; }; + 5087E78917EB974C00C73F5D /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5087E78817EB974C00C73F5D /* AppKit.framework */; }; + 5087E78B17EB975400C73F5D /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5087E78A17EB975400C73F5D /* OpenGL.framework */; }; + 50EF629617ECD46A001EB2F8 /* Icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF629217ECD46A001EB2F8 /* Icon-40.png */; }; + 50EF629717ECD46A001EB2F8 /* Icon-58.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF629317ECD46A001EB2F8 /* Icon-58.png */; }; + 50EF629817ECD46A001EB2F8 /* Icon-80.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF629417ECD46A001EB2F8 /* Icon-80.png */; }; + 50EF629917ECD46A001EB2F8 /* Icon-100.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF629517ECD46A001EB2F8 /* Icon-100.png */; }; + 50EF62A217ECD613001EB2F8 /* Icon-29.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF62A017ECD613001EB2F8 /* Icon-29.png */; }; + 50EF62A317ECD613001EB2F8 /* Icon-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF62A117ECD613001EB2F8 /* Icon-50.png */; }; + AC0C8992197F9B07001127EF /* PeerButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC0C8990197F9B07001127EF /* PeerButton.cpp */; }; + AC0C8993197F9B07001127EF /* PeerButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC0C8990197F9B07001127EF /* PeerButton.cpp */; }; + AC1E5FF81986257700DAFDA3 /* ChatScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC1E5FF61986257700DAFDA3 /* ChatScene.cpp */; }; + AC1E5FF91986257700DAFDA3 /* ChatScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC1E5FF61986257700DAFDA3 /* ChatScene.cpp */; }; + AC36AA701988C6A00019A7AC /* listviewbg.png in Resources */ = {isa = PBXBuildFile; fileRef = AC36AA6F1988C6A00019A7AC /* listviewbg.png */; }; + AC36AA711988C6A00019A7AC /* listviewbg.png in Resources */ = {isa = PBXBuildFile; fileRef = AC36AA6F1988C6A00019A7AC /* listviewbg.png */; }; + AC36AA761988C86C0019A7AC /* backtotopnormal.png in Resources */ = {isa = PBXBuildFile; fileRef = AC36AA741988C86C0019A7AC /* backtotopnormal.png */; }; + AC36AA771988C86C0019A7AC /* backtotopnormal.png in Resources */ = {isa = PBXBuildFile; fileRef = AC36AA741988C86C0019A7AC /* backtotopnormal.png */; }; + AC36AA781988C86C0019A7AC /* backtotoppressed.png in Resources */ = {isa = PBXBuildFile; fileRef = AC36AA751988C86C0019A7AC /* backtotoppressed.png */; }; + AC36AA791988C86C0019A7AC /* backtotoppressed.png in Resources */ = {isa = PBXBuildFile; fileRef = AC36AA751988C86C0019A7AC /* backtotoppressed.png */; }; + AC4894A51980EF7F00BDB706 /* ConnectionInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC4894A31980EF7F00BDB706 /* ConnectionInterface.cpp */; }; + AC4894A61980EF7F00BDB706 /* ConnectionInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC4894A31980EF7F00BDB706 /* ConnectionInterface.cpp */; }; + AC7E4ADD1981F26900ADFD5E /* PopLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC7E4ADB1981F26900ADFD5E /* PopLayer.cpp */; }; + AC7E4ADE1981F26900ADFD5E /* PopLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AC7E4ADB1981F26900ADFD5E /* PopLayer.cpp */; }; + BF171245129291EC00B8313A /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB012928DE900B8313A /* OpenGLES.framework */; }; + BF1712471292920000B8313A /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB412928DE900B8313A /* libz.dylib */; }; + BF1C47F01293687400B63C5D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF1C47EA1293683800B63C5D /* QuartzCore.framework */; }; + D44C620C132DFF330009C878 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620B132DFF330009C878 /* OpenAL.framework */; }; + D44C620E132DFF430009C878 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620D132DFF430009C878 /* AVFoundation.framework */; }; + D44C6210132DFF4E0009C878 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620F132DFF4E0009C878 /* AudioToolbox.framework */; }; + D6B0611B1803AB670077942B /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6B0611A1803AB670077942B /* CoreMotion.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 1AC6FAF8180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 1551A33F158F2AB200E66CFE; + remoteInfo = "cocos2dx Mac"; + }; + 1AC6FAFA180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2FD617814595006731B9; + remoteInfo = "cocos2dx-extensions Mac"; + }; + 1AC6FAFC180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2CB81780BD04006731B9; + remoteInfo = "chipmunk Mac"; + }; + 1AC6FAFE180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2D9B1780BDF7006731B9; + remoteInfo = "box2d Mac"; + }; + 1AC6FB00180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2ED617814268006731B9; + remoteInfo = "CocosDenshion Mac"; + }; + 1AC6FB06180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4D641783777C0073F6A7; + remoteInfo = "cocos2dx iOS"; + }; + 1AC6FB08180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4EFC1783867C0073F6A7; + remoteInfo = "cocos2dx-extensions iOS"; + }; + 1AC6FB0A180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4F3B178387670073F6A7; + remoteInfo = "chipmunk iOS"; + }; + 1AC6FB0C180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4F9E1783876B0073F6A7; + remoteInfo = "box2d iOS"; + }; + 1AC6FB0E180E9839004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4FB4178387730073F6A7; + remoteInfo = "CocosDenshion iOS"; + }; + 1AC6FB15180E9959004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 1551A33E158F2AB200E66CFE; + remoteInfo = "cocos2dx Mac"; + }; + 1AC6FB17180E9959004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2FC117814595006731B9; + remoteInfo = "cocos2dx-extensions Mac"; + }; + 1AC6FB19180E9959004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2B781780BD04006731B9; + remoteInfo = "chipmunk Mac"; + }; + 1AC6FB1B180E9959004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2E9817814268006731B9; + remoteInfo = "CocosDenshion Mac"; + }; + 1AC6FB1D180E9963004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2D5D1780BDF7006731B9; + remoteInfo = "box2d Mac"; + }; + 1AC6FB24180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4C241783777C0073F6A7; + remoteInfo = "cocos2dx iOS"; + }; + 1AC6FB26180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4E111783867C0073F6A7; + remoteInfo = "cocos2dx-extensions iOS"; + }; + 1AC6FB28180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4EFD178387670073F6A7; + remoteInfo = "chipmunk iOS"; + }; + 1AC6FB2A180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4F3C1783876B0073F6A7; + remoteInfo = "box2d iOS"; + }; + 1AC6FB2C180E99E1004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4F9F178387730073F6A7; + remoteInfo = "CocosDenshion iOS"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../cocos2d/build/cocos2d_libs.xcodeproj; sourceTree = ""; }; + 1ACB3243164770DE00914215 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../../cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = ""; }; + 1AFAF8B316D35DE700DB1158 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AppDelegate.cpp; path = ../Classes/AppDelegate.cpp; sourceTree = ""; }; + 1AFAF8B416D35DE700DB1158 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ../Classes/AppDelegate.h; sourceTree = ""; }; + 1AFAF8B516D35DE700DB1158 /* HelloWorldScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HelloWorldScene.cpp; path = ../Classes/HelloWorldScene.cpp; sourceTree = ""; }; + 1AFAF8B616D35DE700DB1158 /* HelloWorldScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HelloWorldScene.h; path = ../Classes/HelloWorldScene.h; sourceTree = ""; }; + 1AFAF8B916D35E4900DB1158 /* CloseNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CloseNormal.png; sourceTree = ""; }; + 1AFAF8BA16D35E4900DB1158 /* CloseSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CloseSelected.png; sourceTree = ""; }; + 1AFAF8BB16D35E4900DB1158 /* HelloWorld.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = HelloWorld.png; sourceTree = ""; }; + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1D6058910D05DD3D006BFB54 /* HelloCcf iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloCcf iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 503AE0F617EB97AB00D1A890 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = ""; }; + 503AE0F717EB97AB00D1A890 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 503AE0FA17EB989F00D1A890 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = ios/AppController.h; sourceTree = SOURCE_ROOT; }; + 503AE0FB17EB989F00D1A890 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppController.mm; path = ios/AppController.mm; sourceTree = SOURCE_ROOT; }; + 503AE0FC17EB989F00D1A890 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ios/main.m; sourceTree = SOURCE_ROOT; }; + 503AE0FD17EB989F00D1A890 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = ios/Prefix.pch; sourceTree = SOURCE_ROOT; }; + 503AE0FE17EB989F00D1A890 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RootViewController.h; path = ios/RootViewController.h; sourceTree = SOURCE_ROOT; }; + 503AE0FF17EB989F00D1A890 /* RootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RootViewController.mm; path = ios/RootViewController.mm; sourceTree = SOURCE_ROOT; }; + 503AE10317EB98FF00D1A890 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = mac/main.cpp; sourceTree = ""; }; + 503AE10417EB98FF00D1A890 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = mac/Prefix.pch; sourceTree = ""; }; + 503AE11117EB99EE00D1A890 /* libcurl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcurl.dylib; path = usr/lib/libcurl.dylib; sourceTree = SDKROOT; }; + 503AE11A17EB9C5A00D1A890 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; + 5087E76F17EB910900C73F5D /* HelloCcf Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloCcf Mac.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5087E77217EB970100C73F5D /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 5087E77317EB970100C73F5D /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 5087E77417EB970100C73F5D /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 5087E77517EB970100C73F5D /* Icon-114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-114.png"; sourceTree = ""; }; + 5087E77617EB970100C73F5D /* Icon-120.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-120.png"; sourceTree = ""; }; + 5087E77717EB970100C73F5D /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-144.png"; sourceTree = ""; }; + 5087E77817EB970100C73F5D /* Icon-152.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-152.png"; sourceTree = ""; }; + 5087E77917EB970100C73F5D /* Icon-57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-57.png"; sourceTree = ""; }; + 5087E77A17EB970100C73F5D /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; + 5087E77B17EB970100C73F5D /* Icon-76.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-76.png"; sourceTree = ""; }; + 5087E77C17EB970100C73F5D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5087E78817EB974C00C73F5D /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 5087E78A17EB975400C73F5D /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + 50EF629217ECD46A001EB2F8 /* Icon-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-40.png"; sourceTree = ""; }; + 50EF629317ECD46A001EB2F8 /* Icon-58.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-58.png"; sourceTree = ""; }; + 50EF629417ECD46A001EB2F8 /* Icon-80.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-80.png"; sourceTree = ""; }; + 50EF629517ECD46A001EB2F8 /* Icon-100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-100.png"; sourceTree = ""; }; + 50EF62A017ECD613001EB2F8 /* Icon-29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-29.png"; sourceTree = ""; }; + 50EF62A117ECD613001EB2F8 /* Icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-50.png"; sourceTree = ""; }; + AC0C8990197F9B07001127EF /* PeerButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PeerButton.cpp; path = ../Classes/PeerButton.cpp; sourceTree = ""; }; + AC0C8991197F9B07001127EF /* PeerButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PeerButton.h; path = ../Classes/PeerButton.h; sourceTree = ""; }; + AC1E5FF61986257700DAFDA3 /* ChatScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChatScene.cpp; path = ../Classes/ChatScene.cpp; sourceTree = ""; }; + AC1E5FF71986257700DAFDA3 /* ChatScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChatScene.h; path = ../Classes/ChatScene.h; sourceTree = ""; }; + AC36AA6F1988C6A00019A7AC /* listviewbg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = listviewbg.png; sourceTree = ""; }; + AC36AA741988C86C0019A7AC /* backtotopnormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = backtotopnormal.png; sourceTree = ""; }; + AC36AA751988C86C0019A7AC /* backtotoppressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = backtotoppressed.png; sourceTree = ""; }; + AC4894A31980EF7F00BDB706 /* ConnectionInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConnectionInterface.cpp; path = ../Classes/ConnectionInterface.cpp; sourceTree = ""; }; + AC4894A41980EF7F00BDB706 /* ConnectionInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConnectionInterface.h; path = ../Classes/ConnectionInterface.h; sourceTree = ""; }; + AC7E4ADB1981F26900ADFD5E /* PopLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PopLayer.cpp; path = ../Classes/PopLayer.cpp; sourceTree = ""; }; + AC7E4ADC1981F26900ADFD5E /* PopLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PopLayer.h; path = ../Classes/PopLayer.h; sourceTree = ""; }; + BF170DB012928DE900B8313A /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + BF170DB412928DE900B8313A /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + BF1C47EA1293683800B63C5D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + D44C620B132DFF330009C878 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + D44C620D132DFF430009C878 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + D44C620F132DFF4E0009C878 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + D6B0611A1803AB670077942B /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1AC6FB2E180E99EB004C840B /* libbox2d iOS.a in Frameworks */, + 1AC6FB2F180E99EB004C840B /* libchipmunk iOS.a in Frameworks */, + 1AC6FB30180E99EB004C840B /* libcocos2dx iOS.a in Frameworks */, + 1AC6FB31180E99EB004C840B /* libcocos2dx-extensions iOS.a in Frameworks */, + 1AC6FB32180E99EB004C840B /* libCocosDenshion iOS.a in Frameworks */, + D6B0611B1803AB670077942B /* CoreMotion.framework in Frameworks */, + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, + BF171245129291EC00B8313A /* OpenGLES.framework in Frameworks */, + BF1712471292920000B8313A /* libz.dylib in Frameworks */, + BF1C47F01293687400B63C5D /* QuartzCore.framework in Frameworks */, + D44C620C132DFF330009C878 /* OpenAL.framework in Frameworks */, + D44C620E132DFF430009C878 /* AVFoundation.framework in Frameworks */, + D44C6210132DFF4E0009C878 /* AudioToolbox.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5087E75C17EB910900C73F5D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1AC6FB1F180E996B004C840B /* libbox2d Mac.a in Frameworks */, + 1AC6FB20180E996B004C840B /* libchipmunk Mac.a in Frameworks */, + 1AC6FB21180E996B004C840B /* libcocos2dx Mac.a in Frameworks */, + 1AC6FB22180E996B004C840B /* libcocos2dx-extensions Mac.a in Frameworks */, + 1AC6FB23180E996B004C840B /* libCocosDenshion Mac.a in Frameworks */, + 503AE11217EB99EE00D1A890 /* libcurl.dylib in Frameworks */, + 5087E76717EB910900C73F5D /* libz.dylib in Frameworks */, + 503AE11B17EB9C5A00D1A890 /* IOKit.framework in Frameworks */, + 5087E78B17EB975400C73F5D /* OpenGL.framework in Frameworks */, + 5087E78917EB974C00C73F5D /* AppKit.framework in Frameworks */, + 5087E76317EB910900C73F5D /* Foundation.framework in Frameworks */, + 5087E76517EB910900C73F5D /* CoreGraphics.framework in Frameworks */, + 5087E76817EB910900C73F5D /* QuartzCore.framework in Frameworks */, + 5087E76917EB910900C73F5D /* OpenAL.framework in Frameworks */, + 5087E76A17EB910900C73F5D /* AVFoundation.framework in Frameworks */, + 5087E76B17EB910900C73F5D /* AudioToolbox.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* ios */ = { + isa = PBXGroup; + children = ( + 5087E77117EB970100C73F5D /* Icons */, + 503AE0FA17EB989F00D1A890 /* AppController.h */, + 503AE0FB17EB989F00D1A890 /* AppController.mm */, + 503AE0FC17EB989F00D1A890 /* main.m */, + 503AE0FD17EB989F00D1A890 /* Prefix.pch */, + 503AE0FE17EB989F00D1A890 /* RootViewController.h */, + 503AE0FF17EB989F00D1A890 /* RootViewController.mm */, + ); + name = ios; + path = Classes; + sourceTree = ""; + }; + 15AA9C4015B7EC450033D6C2 /* Classes */ = { + isa = PBXGroup; + children = ( + 1AFAF8B316D35DE700DB1158 /* AppDelegate.cpp */, + 1AFAF8B416D35DE700DB1158 /* AppDelegate.h */, + 1AFAF8B516D35DE700DB1158 /* HelloWorldScene.cpp */, + 1AFAF8B616D35DE700DB1158 /* HelloWorldScene.h */, + AC0C8990197F9B07001127EF /* PeerButton.cpp */, + AC0C8991197F9B07001127EF /* PeerButton.h */, + AC4894A31980EF7F00BDB706 /* ConnectionInterface.cpp */, + AC4894A41980EF7F00BDB706 /* ConnectionInterface.h */, + AC7E4ADB1981F26900ADFD5E /* PopLayer.cpp */, + AC7E4ADC1981F26900ADFD5E /* PopLayer.h */, + AC1E5FF61986257700DAFDA3 /* ChatScene.cpp */, + AC1E5FF71986257700DAFDA3 /* ChatScene.h */, + ); + name = Classes; + path = ../classes; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* HelloCcf iOS.app */, + 5087E76F17EB910900C73F5D /* HelloCcf Mac.app */, + ); + name = Products; + sourceTree = ""; + }; + 1AC6FAE6180E9839004C840B /* Products */ = { + isa = PBXGroup; + children = ( + 1AC6FAF9180E9839004C840B /* libcocos2dx Mac.a */, + 1AC6FAFB180E9839004C840B /* libcocos2dx-extensions Mac.a */, + 1AC6FAFD180E9839004C840B /* libchipmunk Mac.a */, + 1AC6FAFF180E9839004C840B /* libbox2d Mac.a */, + 1AC6FB01180E9839004C840B /* libCocosDenshion Mac.a */, + 1AC6FB07180E9839004C840B /* libcocos2dx iOS.a */, + 1AC6FB09180E9839004C840B /* libcocos2dx-extensions iOS.a */, + 1AC6FB0B180E9839004C840B /* libchipmunk iOS.a */, + 1AC6FB0D180E9839004C840B /* libbox2d iOS.a */, + 1AC6FB0F180E9839004C840B /* libCocosDenshion iOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */, + 15AA9C4015B7EC450033D6C2 /* Classes */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 080E96DDFE201D6D7F000001 /* ios */, + 503AE10617EB990700D1A890 /* mac */, + 19C28FACFE9D520D11CA2CBB /* Products */, + 78C7DDAA14EBA5050085D0C2 /* Resources */, + ); + name = CustomTemplate; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + D6B0611A1803AB670077942B /* CoreMotion.framework */, + 503AE11A17EB9C5A00D1A890 /* IOKit.framework */, + 503AE11117EB99EE00D1A890 /* libcurl.dylib */, + 5087E78A17EB975400C73F5D /* OpenGL.framework */, + 5087E78817EB974C00C73F5D /* AppKit.framework */, + 1ACB3243164770DE00914215 /* libcurl.a */, + BF170DB412928DE900B8313A /* libz.dylib */, + D44C620F132DFF4E0009C878 /* AudioToolbox.framework */, + D44C620D132DFF430009C878 /* AVFoundation.framework */, + 288765A40DF7441C002DB57D /* CoreGraphics.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + D44C620B132DFF330009C878 /* OpenAL.framework */, + BF170DB012928DE900B8313A /* OpenGLES.framework */, + BF1C47EA1293683800B63C5D /* QuartzCore.framework */, + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 503AE0F517EB97AB00D1A890 /* Icons */ = { + isa = PBXGroup; + children = ( + 503AE0F617EB97AB00D1A890 /* Icon.icns */, + 503AE0F717EB97AB00D1A890 /* Info.plist */, + ); + name = Icons; + path = mac; + sourceTree = SOURCE_ROOT; + }; + 503AE10617EB990700D1A890 /* mac */ = { + isa = PBXGroup; + children = ( + 503AE0F517EB97AB00D1A890 /* Icons */, + 503AE10317EB98FF00D1A890 /* main.cpp */, + 503AE10417EB98FF00D1A890 /* Prefix.pch */, + ); + name = mac; + sourceTree = ""; + }; + 5087E77117EB970100C73F5D /* Icons */ = { + isa = PBXGroup; + children = ( + 5087E77217EB970100C73F5D /* Default-568h@2x.png */, + 5087E77317EB970100C73F5D /* Default.png */, + 5087E77417EB970100C73F5D /* Default@2x.png */, + 50EF62A017ECD613001EB2F8 /* Icon-29.png */, + 50EF62A117ECD613001EB2F8 /* Icon-50.png */, + 50EF629217ECD46A001EB2F8 /* Icon-40.png */, + 50EF629317ECD46A001EB2F8 /* Icon-58.png */, + 50EF629417ECD46A001EB2F8 /* Icon-80.png */, + 50EF629517ECD46A001EB2F8 /* Icon-100.png */, + 5087E77517EB970100C73F5D /* Icon-114.png */, + 5087E77617EB970100C73F5D /* Icon-120.png */, + 5087E77717EB970100C73F5D /* Icon-144.png */, + 5087E77817EB970100C73F5D /* Icon-152.png */, + 5087E77917EB970100C73F5D /* Icon-57.png */, + 5087E77A17EB970100C73F5D /* Icon-72.png */, + 5087E77B17EB970100C73F5D /* Icon-76.png */, + 5087E77C17EB970100C73F5D /* Info.plist */, + ); + name = Icons; + path = ios; + sourceTree = SOURCE_ROOT; + }; + 78C7DDAA14EBA5050085D0C2 /* Resources */ = { + isa = PBXGroup; + children = ( + 1AFAF8B916D35E4900DB1158 /* CloseNormal.png */, + AC36AA741988C86C0019A7AC /* backtotopnormal.png */, + AC36AA751988C86C0019A7AC /* backtotoppressed.png */, + 1AFAF8BA16D35E4900DB1158 /* CloseSelected.png */, + 1AFAF8BB16D35E4900DB1158 /* HelloWorld.png */, + AC36AA6F1988C6A00019A7AC /* listviewbg.png */, + ); + name = Resources; + path = ../Resources; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* HelloCcf iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "HelloCcf iOS" */; + buildPhases = ( + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 1AC6FB25180E99E1004C840B /* PBXTargetDependency */, + 1AC6FB27180E99E1004C840B /* PBXTargetDependency */, + 1AC6FB29180E99E1004C840B /* PBXTargetDependency */, + 1AC6FB2B180E99E1004C840B /* PBXTargetDependency */, + 1AC6FB2D180E99E1004C840B /* PBXTargetDependency */, + ); + name = "HelloCcf iOS"; + productName = iphone; + productReference = 1D6058910D05DD3D006BFB54 /* HelloCcf iOS.app */; + productType = "com.apple.product-type.application"; + }; + 5087E73D17EB910900C73F5D /* HelloCcf Mac */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5087E76C17EB910900C73F5D /* Build configuration list for PBXNativeTarget "HelloCcf Mac" */; + buildPhases = ( + 5087E74817EB910900C73F5D /* Resources */, + 5087E75617EB910900C73F5D /* Sources */, + 5087E75C17EB910900C73F5D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 1AC6FB1E180E9963004C840B /* PBXTargetDependency */, + 1AC6FB16180E9959004C840B /* PBXTargetDependency */, + 1AC6FB18180E9959004C840B /* PBXTargetDependency */, + 1AC6FB1A180E9959004C840B /* PBXTargetDependency */, + 1AC6FB1C180E9959004C840B /* PBXTargetDependency */, + ); + name = "HelloCcf Mac"; + productName = iphone; + productReference = 5087E76F17EB910900C73F5D /* HelloCcf Mac.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0500; + TargetAttributes = { + 1D6058900D05DD3D006BFB54 = { + DevelopmentTeam = MDDB52YB8L; + }; + }; + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HelloCcf" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 1AC6FAE6180E9839004C840B /* Products */; + ProjectRef = 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* HelloCcf iOS */, + 5087E73D17EB910900C73F5D /* HelloCcf Mac */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 1AC6FAF9180E9839004C840B /* libcocos2dx Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx Mac.a"; + remoteRef = 1AC6FAF8180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FAFB180E9839004C840B /* libcocos2dx-extensions Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx-extensions Mac.a"; + remoteRef = 1AC6FAFA180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FAFD180E9839004C840B /* libchipmunk Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libchipmunk Mac.a"; + remoteRef = 1AC6FAFC180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FAFF180E9839004C840B /* libbox2d Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libbox2d Mac.a"; + remoteRef = 1AC6FAFE180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB01180E9839004C840B /* libCocosDenshion Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libCocosDenshion Mac.a"; + remoteRef = 1AC6FB00180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB07180E9839004C840B /* libcocos2dx iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx iOS.a"; + remoteRef = 1AC6FB06180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB09180E9839004C840B /* libcocos2dx-extensions iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx-extensions iOS.a"; + remoteRef = 1AC6FB08180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB0B180E9839004C840B /* libchipmunk iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libchipmunk iOS.a"; + remoteRef = 1AC6FB0A180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB0D180E9839004C840B /* libbox2d iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libbox2d iOS.a"; + remoteRef = 1AC6FB0C180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB0F180E9839004C840B /* libCocosDenshion iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libCocosDenshion iOS.a"; + remoteRef = 1AC6FB0E180E9839004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5087E78117EB970100C73F5D /* Icon-120.png in Resources */, + 5087E78617EB970100C73F5D /* Icon-76.png in Resources */, + AC36AA761988C86C0019A7AC /* backtotopnormal.png in Resources */, + 5087E77F17EB970100C73F5D /* Default@2x.png in Resources */, + 50EF629917ECD46A001EB2F8 /* Icon-100.png in Resources */, + 1AFAF8BC16D35E4900DB1158 /* CloseNormal.png in Resources */, + 5087E78317EB970100C73F5D /* Icon-152.png in Resources */, + 5087E77D17EB970100C73F5D /* Default-568h@2x.png in Resources */, + 5087E78517EB970100C73F5D /* Icon-72.png in Resources */, + 1AFAF8BD16D35E4900DB1158 /* CloseSelected.png in Resources */, + 50EF62A317ECD613001EB2F8 /* Icon-50.png in Resources */, + 5087E78017EB970100C73F5D /* Icon-114.png in Resources */, + 1AFAF8BE16D35E4900DB1158 /* HelloWorld.png in Resources */, + 50EF62A217ECD613001EB2F8 /* Icon-29.png in Resources */, + 50EF629617ECD46A001EB2F8 /* Icon-40.png in Resources */, + 5087E78217EB970100C73F5D /* Icon-144.png in Resources */, + AC36AA781988C86C0019A7AC /* backtotoppressed.png in Resources */, + 50EF629817ECD46A001EB2F8 /* Icon-80.png in Resources */, + AC36AA701988C6A00019A7AC /* listviewbg.png in Resources */, + 5087E78417EB970100C73F5D /* Icon-57.png in Resources */, + 5087E77E17EB970100C73F5D /* Default.png in Resources */, + 50EF629717ECD46A001EB2F8 /* Icon-58.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5087E74817EB910900C73F5D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5087E75317EB910900C73F5D /* CloseNormal.png in Resources */, + 503AE0F817EB97AB00D1A890 /* Icon.icns in Resources */, + 5087E75417EB910900C73F5D /* CloseSelected.png in Resources */, + 5087E75517EB910900C73F5D /* HelloWorld.png in Resources */, + AC36AA791988C86C0019A7AC /* backtotoppressed.png in Resources */, + AC36AA771988C86C0019A7AC /* backtotopnormal.png in Resources */, + AC36AA711988C6A00019A7AC /* listviewbg.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 503AE10017EB989F00D1A890 /* AppController.mm in Sources */, + AC7E4ADD1981F26900ADFD5E /* PopLayer.cpp in Sources */, + AC1E5FF81986257700DAFDA3 /* ChatScene.cpp in Sources */, + 503AE10217EB989F00D1A890 /* RootViewController.mm in Sources */, + 1AFAF8B716D35DE700DB1158 /* AppDelegate.cpp in Sources */, + AC4894A51980EF7F00BDB706 /* ConnectionInterface.cpp in Sources */, + AC0C8992197F9B07001127EF /* PeerButton.cpp in Sources */, + 503AE10117EB989F00D1A890 /* main.m in Sources */, + 1AFAF8B816D35DE700DB1158 /* HelloWorldScene.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5087E75617EB910900C73F5D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5087E75717EB910900C73F5D /* AppDelegate.cpp in Sources */, + AC1E5FF91986257700DAFDA3 /* ChatScene.cpp in Sources */, + AC0C8993197F9B07001127EF /* PeerButton.cpp in Sources */, + 5087E75817EB910900C73F5D /* HelloWorldScene.cpp in Sources */, + AC7E4ADE1981F26900ADFD5E /* PopLayer.cpp in Sources */, + 503AE10517EB98FF00D1A890 /* main.cpp in Sources */, + AC4894A61980EF7F00BDB706 /* ConnectionInterface.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 1AC6FB16180E9959004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx Mac"; + targetProxy = 1AC6FB15180E9959004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB18180E9959004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx-extensions Mac"; + targetProxy = 1AC6FB17180E9959004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB1A180E9959004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "chipmunk Mac"; + targetProxy = 1AC6FB19180E9959004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB1C180E9959004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "CocosDenshion Mac"; + targetProxy = 1AC6FB1B180E9959004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB1E180E9963004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "box2d Mac"; + targetProxy = 1AC6FB1D180E9963004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB25180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx iOS"; + targetProxy = 1AC6FB24180E99E1004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB27180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx-extensions iOS"; + targetProxy = 1AC6FB26180E99E1004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB29180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "chipmunk iOS"; + targetProxy = 1AC6FB28180E99E1004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB2B180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "box2d iOS"; + targetProxy = 1AC6FB2A180E99E1004C840B /* PBXContainerItemProxy */; + }; + 1AC6FB2D180E99E1004C840B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "CocosDenshion iOS"; + targetProxy = 1AC6FB2C180E99E1004C840B /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COMPRESS_PNG_FILES = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ios/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + USE_FILE32API, + CC_TARGET_OS_IPHONE, + "COCOS2D_DEBUG=1", + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../cocos2d/cocos/platform/ios", + "$(SRCROOT)/../cocos2d/cocos/platform/ios/Simulation", + ); + INFOPLIST_FILE = ios/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + LIBRARY_SEARCH_PATHS = ""; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COMPRESS_PNG_FILES = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ios/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + USE_FILE32API, + CC_TARGET_OS_IPHONE, + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../cocos2d/cocos/platform/ios", + "$(SRCROOT)/../cocos2d/cocos/platform/ios/Simulation", + ); + INFOPLIST_FILE = ios/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + LIBRARY_SEARCH_PATHS = ""; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Release; + }; + 5087E76D17EB910900C73F5D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = mac/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + USE_FILE32API, + CC_TARGET_OS_MAC, + "COCOS2D_DEBUG=1", + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../cocos2d/cocos/platform/mac", + "$(SRCROOT)/../cocos2d/external/glfw3/include/mac", + ); + INFOPLIST_FILE = mac/Info.plist; + LIBRARY_SEARCH_PATHS = ""; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Debug; + }; + 5087E76E17EB910900C73F5D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = mac/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + USE_FILE32API, + CC_TARGET_OS_MAC, + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../cocos2d/cocos/platform/mac", + "$(SRCROOT)/../cocos2d/external/glfw3/include/mac", + ); + INFOPLIST_FILE = mac/Info.plist; + LIBRARY_SEARCH_PATHS = ""; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + COPY_PHASE_STRIP = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../cocos2d", + "$(SRCROOT)/../cocos2d/cocos", + "$(SRCROOT)/../cocos2d/cocos/base", + "$(SRCROOT)/../cocos2d/cocos/physics", + "$(SRCROOT)/../cocos2d/cocos/math", + "$(SRCROOT)/../cocos2d/cocos/2d", + "$(SRCROOT)/../cocos2d/cocos/ui", + "$(SRCROOT)/../cocos2d/cocos/network", + "$(SRCROOT)/../cocos2d/cocos/audio/include", + "$(SRCROOT)/../cocos2d/cocos/editor-support", + "$(SRCROOT)/../cocos2d/extensions", + "$(SRCROOT)/../cocos2d/external", + "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", + ); + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../cocos2d", + "$(SRCROOT)/../cocos2d/cocos", + "$(SRCROOT)/../cocos2d/cocos/base", + "$(SRCROOT)/../cocos2d/cocos/physics", + "$(SRCROOT)/../cocos2d/cocos/math", + "$(SRCROOT)/../cocos2d/cocos/2d", + "$(SRCROOT)/../cocos2d/cocos/ui", + "$(SRCROOT)/../cocos2d/cocos/network", + "$(SRCROOT)/../cocos2d/cocos/audio/include", + "$(SRCROOT)/../cocos2d/cocos/editor-support", + "$(SRCROOT)/../cocos2d/extensions", + "$(SRCROOT)/../cocos2d/external", + "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", + ); + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "HelloCcf iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 5087E76C17EB910900C73F5D /* Build configuration list for PBXNativeTarget "HelloCcf Mac" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5087E76D17EB910900C73F5D /* Debug */, + 5087E76E17EB910900C73F5D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HelloCcf" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/samples/HelloCcf/proj.ios_mac/HelloCcf.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/HelloCcf/proj.ios_mac/HelloCcf.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..cfacc12 --- /dev/null +++ b/samples/HelloCcf/proj.ios_mac/HelloCcf.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/HelloCcf/proj.ios_mac/ios/AppController.h b/samples/HelloCcf/proj.ios_mac/ios/AppController.h new file mode 100644 index 0000000..978e6e3 --- /dev/null +++ b/samples/HelloCcf/proj.ios_mac/ios/AppController.h @@ -0,0 +1,12 @@ +#import + +@class RootViewController; + +@interface AppController : NSObject { + UIWindow *window; +} + +@property(nonatomic, readonly) RootViewController* viewController; + +@end + diff --git a/samples/HelloCcf/proj.ios_mac/ios/AppController.mm b/samples/HelloCcf/proj.ios_mac/ios/AppController.mm new file mode 100644 index 0000000..94f112f --- /dev/null +++ b/samples/HelloCcf/proj.ios_mac/ios/AppController.mm @@ -0,0 +1,142 @@ +/**************************************************************************** + 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. + ****************************************************************************/ + +#import "AppController.h" +#import "CCEAGLView.h" +#import "cocos2d.h" +#import "AppDelegate.h" +#import "RootViewController.h" + +@implementation AppController + +#pragma mark - +#pragma mark Application lifecycle + +// cocos2d application instance +static AppDelegate s_sharedApplication; + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + + // Override point for customization after application launch. + + // Add the view controller's view to the window and display. + window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; + + // Init the CCEAGLView + CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [window bounds] + pixelFormat: kEAGLColorFormatRGBA8 + depthFormat: GL_DEPTH24_STENCIL8_OES + preserveBackbuffer: NO + sharegroup: nil + multiSampling: NO + numberOfSamples: 0]; + + // Use RootViewController manage CCEAGLView + _viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; + _viewController.wantsFullScreenLayout = YES; + _viewController.view = eaglView; + + // Set RootViewController to window + if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0) + { + // warning: addSubView doesn't work on iOS6 + [window addSubview: _viewController.view]; + } + else + { + // use this method on ios6 + [window setRootViewController:_viewController]; + } + + [window makeKeyAndVisible]; + + [[UIApplication sharedApplication] setStatusBarHidden:true]; + + // IMPORTANT: Setting the GLView should be done after creating the RootViewController + cocos2d::GLView *glview = cocos2d::GLView::createWithEAGLView(eaglView); + cocos2d::Director::getInstance()->setOpenGLView(glview); + + cocos2d::Application::getInstance()->run(); + + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + /* + Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + */ + //We don't need to call this method any more. It will interupt user defined game pause&resume logic + /* cocos2d::Director::getInstance()->pause(); */ +} + +- (void)applicationDidBecomeActive:(UIApplication *)application { + /* + Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + */ + //We don't need to call this method any more. It will interupt user defined game pause&resume logic + /* cocos2d::Director::getInstance()->resume(); */ +} + +- (void)applicationDidEnterBackground:(UIApplication *)application { + /* + Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + If your application supports background execution, called instead of applicationWillTerminate: when the user quits. + */ + cocos2d::Application::getInstance()->applicationDidEnterBackground(); +} + +- (void)applicationWillEnterForeground:(UIApplication *)application { + /* + Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. + */ + cocos2d::Application::getInstance()->applicationWillEnterForeground(); +} + +- (void)applicationWillTerminate:(UIApplication *)application { + /* + Called when the application is about to terminate. + See also applicationDidEnterBackground:. + */ +} + + +#pragma mark - +#pragma mark Memory management + +- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { + /* + Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. + */ +} + + +- (void)dealloc { + [window release]; + [super dealloc]; +} + + +@end diff --git a/samples/HelloCcf/proj.ios_mac/ios/Default-568h@2x.png b/samples/HelloCcf/proj.ios_mac/ios/Default-568h@2x.png new file mode 100644 index 0000000..66c6d1c Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Default-568h@2x.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Default.png b/samples/HelloCcf/proj.ios_mac/ios/Default.png new file mode 100644 index 0000000..dcb8072 Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Default.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Default@2x.png b/samples/HelloCcf/proj.ios_mac/ios/Default@2x.png new file mode 100644 index 0000000..8468988 Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Default@2x.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Icon-100.png b/samples/HelloCcf/proj.ios_mac/ios/Icon-100.png new file mode 100644 index 0000000..ef38d45 Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Icon-100.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Icon-114.png b/samples/HelloCcf/proj.ios_mac/ios/Icon-114.png new file mode 100644 index 0000000..c380786 Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Icon-114.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Icon-120.png b/samples/HelloCcf/proj.ios_mac/ios/Icon-120.png new file mode 100644 index 0000000..a5b49cc Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Icon-120.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Icon-144.png b/samples/HelloCcf/proj.ios_mac/ios/Icon-144.png new file mode 100644 index 0000000..1526615 Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Icon-144.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Icon-152.png b/samples/HelloCcf/proj.ios_mac/ios/Icon-152.png new file mode 100644 index 0000000..8aa8250 Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Icon-152.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Icon-29.png b/samples/HelloCcf/proj.ios_mac/ios/Icon-29.png new file mode 100644 index 0000000..0500184 Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Icon-29.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Icon-40.png b/samples/HelloCcf/proj.ios_mac/ios/Icon-40.png new file mode 100644 index 0000000..775685d Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Icon-40.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Icon-50.png b/samples/HelloCcf/proj.ios_mac/ios/Icon-50.png new file mode 100644 index 0000000..ac381bc Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Icon-50.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Icon-57.png b/samples/HelloCcf/proj.ios_mac/ios/Icon-57.png new file mode 100644 index 0000000..4fcc6fd Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Icon-57.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Icon-58.png b/samples/HelloCcf/proj.ios_mac/ios/Icon-58.png new file mode 100644 index 0000000..f0f8b7f Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Icon-58.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Icon-72.png b/samples/HelloCcf/proj.ios_mac/ios/Icon-72.png new file mode 100644 index 0000000..2c573c8 Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Icon-72.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Icon-76.png b/samples/HelloCcf/proj.ios_mac/ios/Icon-76.png new file mode 100644 index 0000000..8a1fa18 Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Icon-76.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Icon-80.png b/samples/HelloCcf/proj.ios_mac/ios/Icon-80.png new file mode 100644 index 0000000..d9c7ab4 Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/ios/Icon-80.png differ diff --git a/samples/HelloCcf/proj.ios_mac/ios/Info.plist b/samples/HelloCcf/proj.ios_mac/ios/Info.plist new file mode 100644 index 0000000..aff7e3c --- /dev/null +++ b/samples/HelloCcf/proj.ios_mac/ios/Info.plist @@ -0,0 +1,70 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + Icon-57.png + CFBundleIconFiles + + Icon-29 + Icon-80 + Icon-58 + Icon-120 + Icon.png + Icon@2x.png + Icon-57.png + Icon-114.png + Icon-72.png + Icon-144.png + + CFBundleIconFiles~ipad + + Icon-29 + Icon-50 + Icon-58 + Icon-80 + Icon-40 + Icon-100 + Icon-152 + Icon-76 + Icon-120 + Icon.png + Icon@2x.png + Icon-57.png + Icon-114.png + Icon-72.png + Icon-144.png + + CFBundleIdentifier + org.cocos2d-x.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIAppFonts + + UIPrerenderedIcon + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + + diff --git a/samples/HelloCcf/proj.ios_mac/ios/Prefix.pch b/samples/HelloCcf/proj.ios_mac/ios/Prefix.pch new file mode 100644 index 0000000..5b4e2fd --- /dev/null +++ b/samples/HelloCcf/proj.ios_mac/ios/Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'iphone' target in the 'iphone' project +// + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/samples/HelloCcf/proj.ios_mac/ios/RootViewController.h b/samples/HelloCcf/proj.ios_mac/ios/RootViewController.h new file mode 100644 index 0000000..a166901 --- /dev/null +++ b/samples/HelloCcf/proj.ios_mac/ios/RootViewController.h @@ -0,0 +1,34 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#import + + +@interface RootViewController : UIViewController { + +} +- (BOOL) prefersStatusBarHidden; + +@end diff --git a/samples/HelloCcf/proj.ios_mac/ios/RootViewController.mm b/samples/HelloCcf/proj.ios_mac/ios/RootViewController.mm new file mode 100644 index 0000000..c6e2390 --- /dev/null +++ b/samples/HelloCcf/proj.ios_mac/ios/RootViewController.mm @@ -0,0 +1,114 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#import "RootViewController.h" +#import "cocos2d.h" +#import "CCEAGLView.h" + +@implementation RootViewController + +/* + // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { + // Custom initialization + } + return self; +} +*/ + +/* +// Implement loadView to create a view hierarchy programmatically, without using a nib. +- (void)loadView { +} +*/ + +/* +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad { + [super viewDidLoad]; +} + +*/ +// Override to allow orientations other than the default portrait orientation. +// This method is deprecated on ios6 +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return UIInterfaceOrientationIsLandscape( interfaceOrientation ); +} + +// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead +- (NSUInteger) supportedInterfaceOrientations{ +#ifdef __IPHONE_6_0 + return UIInterfaceOrientationMaskAllButUpsideDown; +#endif +} + +- (BOOL) shouldAutorotate { + return YES; +} + +- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { + [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; + + cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView(); + + if (glview) + { + CCEAGLView *eaglview = (CCEAGLView*) glview->getEAGLView(); + + if (eaglview) + { + CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]); + cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height); + } + } +} + +//fix not hide status on ios7 +- (BOOL)prefersStatusBarHidden +{ + return YES; +} + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +- (void)viewDidUnload { + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + + +- (void)dealloc { + [super dealloc]; +} + + +@end diff --git a/samples/HelloCcf/proj.ios_mac/ios/main.m b/samples/HelloCcf/proj.ios_mac/ios/main.m new file mode 100644 index 0000000..8daa43e --- /dev/null +++ b/samples/HelloCcf/proj.ios_mac/ios/main.m @@ -0,0 +1,9 @@ +#import + +int main(int argc, char *argv[]) { + + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, @"AppController"); + [pool release]; + return retVal; +} diff --git a/samples/HelloCcf/proj.ios_mac/mac/Icon.icns b/samples/HelloCcf/proj.ios_mac/mac/Icon.icns new file mode 100644 index 0000000..2040fc6 Binary files /dev/null and b/samples/HelloCcf/proj.ios_mac/mac/Icon.icns differ diff --git a/samples/HelloCcf/proj.ios_mac/mac/Info.plist b/samples/HelloCcf/proj.ios_mac/mac/Info.plist new file mode 100644 index 0000000..a73feb7 --- /dev/null +++ b/samples/HelloCcf/proj.ios_mac/mac/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + Icon + CFBundleIdentifier + org.cocos2d-x.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSApplicationCategoryType + public.app-category.games + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright © 2013. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/samples/HelloCcf/proj.ios_mac/mac/Prefix.pch b/samples/HelloCcf/proj.ios_mac/mac/Prefix.pch new file mode 100644 index 0000000..46c36a7 --- /dev/null +++ b/samples/HelloCcf/proj.ios_mac/mac/Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'Paralaxer' target in the 'Paralaxer' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/samples/HelloCcf/proj.ios_mac/mac/main.cpp b/samples/HelloCcf/proj.ios_mac/mac/main.cpp new file mode 100644 index 0000000..96f027e --- /dev/null +++ b/samples/HelloCcf/proj.ios_mac/mac/main.cpp @@ -0,0 +1,34 @@ +/**************************************************************************** + 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. + ****************************************************************************/ + +#include "AppDelegate.h" +#include "cocos2d.h" + +USING_NS_CC; + +int main(int argc, char *argv[]) +{ + AppDelegate app; + return Application::getInstance()->run(); +} diff --git a/samples/HelloCcf/proj.win32/.DS_Store b/samples/HelloCcf/proj.win32/.DS_Store new file mode 100644 index 0000000..663dbd0 Binary files /dev/null and b/samples/HelloCcf/proj.win32/.DS_Store differ diff --git a/samples/HelloCcf/proj.win32/HelloCcf.sln b/samples/HelloCcf/proj.win32/HelloCcf.sln new file mode 100644 index 0000000..9840b81 --- /dev/null +++ b/samples/HelloCcf/proj.win32/HelloCcf.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCcf", "HelloCcf.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}" + ProjectSection(ProjectDependencies) = postProject + {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} + {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} + {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos2d\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\cocos2d\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\cocos2d\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {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 + {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 + {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 + {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 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/samples/HelloCcf/proj.win32/HelloCcf.vcxproj b/samples/HelloCcf/proj.win32/HelloCcf.vcxproj new file mode 100644 index 0000000..e29153c --- /dev/null +++ b/samples/HelloCcf/proj.win32/HelloCcf.vcxproj @@ -0,0 +1,163 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {76A39BB2-9B84-4C65-98A5-654D86B86F2A} + test_win32 + Win32Proj + + + + Application + Unicode + true + v100 + v110 + v110_xp + + + Application + Unicode + v100 + v110 + v110_xp + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration).win32\ + $(Configuration).win32\ + true + $(SolutionDir)$(Configuration).win32\ + $(Configuration).win32\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) + + + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) + + + + Disabled + $(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;..\Classes;..;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + 4267;4251;4244;%(DisableSpecificWarnings) + true + + + %(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + $(OutDir);%(AdditionalLibraryDirectories) + true + Windows + MachineX86 + + + + + + + if not exist "$(OutDir)" mkdir "$(OutDir)" +xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)" + + + + + MaxSpeed + true + $(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;..\Classes;..;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + 4267;4251;4244;%(DisableSpecificWarnings) + true + + + libcurl_imp.lib;websockets.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + $(OutDir);%(AdditionalLibraryDirectories) + true + Windows + true + true + MachineX86 + + + + + + + if not exist "$(OutDir)" mkdir "$(OutDir)" +xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)" + + + + + + + + + + + + + + + {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e} + false + + + {f8edd7fa-9a51-4e80-baeb-860825d2eac6} + + + {207bc7a9-ccf1-4f2f-a04d-45f72242ae25} + + + + + + + + + \ No newline at end of file diff --git a/samples/HelloCcf/proj.win32/HelloCcf.vcxproj.filters b/samples/HelloCcf/proj.win32/HelloCcf.vcxproj.filters new file mode 100644 index 0000000..0afd6b6 --- /dev/null +++ b/samples/HelloCcf/proj.win32/HelloCcf.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {84a8ebd7-7cf0-47f6-b75e-d441df67da40} + + + {bb6c862e-70e9-49d9-81b7-3829a6f50471} + + + {715254bc-d70b-4ec5-bf29-467dd3ace079} + + + + + win32 + + + Classes + + + Classes + + + + + win32 + + + Classes + + + Classes + + + + + resource + + + \ No newline at end of file diff --git a/samples/HelloCcf/proj.win32/build-cfg.json b/samples/HelloCcf/proj.win32/build-cfg.json new file mode 100644 index 0000000..aae4d7a --- /dev/null +++ b/samples/HelloCcf/proj.win32/build-cfg.json @@ -0,0 +1,8 @@ +{ + "copy_resources": [ + { + "from": "../Resources", + "to": "" + } + ] +} diff --git a/samples/HelloCcf/proj.win32/game.rc b/samples/HelloCcf/proj.win32/game.rc new file mode 100644 index 0000000..1e0a2a0 --- /dev/null +++ b/samples/HelloCcf/proj.win32/game.rc @@ -0,0 +1,86 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +GLFW_ICON ICON "res\\game.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "game Module\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "game\0" + VALUE "LegalCopyright", "Copyright \0" + VALUE "OriginalFilename", "game.exe\0" + VALUE "ProductName", "game Module\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0x04B0 + END +END + +///////////////////////////////////////////////////////////////////////////// +#endif // !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) diff --git a/samples/HelloCcf/proj.win32/main.cpp b/samples/HelloCcf/proj.win32/main.cpp new file mode 100644 index 0000000..61ae71f --- /dev/null +++ b/samples/HelloCcf/proj.win32/main.cpp @@ -0,0 +1,18 @@ +#include "main.h" +#include "AppDelegate.h" +#include "cocos2d.h" + +USING_NS_CC; + +int APIENTRY _tWinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPTSTR lpCmdLine, + int nCmdShow) +{ + UNREFERENCED_PARAMETER(hPrevInstance); + UNREFERENCED_PARAMETER(lpCmdLine); + + // create the application instance + AppDelegate app; + return Application::getInstance()->run(); +} diff --git a/samples/HelloCcf/proj.win32/main.h b/samples/HelloCcf/proj.win32/main.h new file mode 100644 index 0000000..e74708b --- /dev/null +++ b/samples/HelloCcf/proj.win32/main.h @@ -0,0 +1,13 @@ +#ifndef __MAIN_H__ +#define __MAIN_H__ + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + +// Windows Header Files: +#include +#include + +// C RunTime Header Files +#include "CCStdC.h" + +#endif // __MAIN_H__ diff --git a/samples/HelloCcf/proj.win32/res/game.ico b/samples/HelloCcf/proj.win32/res/game.ico new file mode 100644 index 0000000..feaf932 Binary files /dev/null and b/samples/HelloCcf/proj.win32/res/game.ico differ diff --git a/samples/HelloCcf/proj.win32/resource.h b/samples/HelloCcf/proj.win32/resource.h new file mode 100644 index 0000000..376870b --- /dev/null +++ b/samples/HelloCcf/proj.win32/resource.h @@ -0,0 +1,20 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by game.RC +// + +#define IDS_PROJNAME 100 +#define IDR_TESTJS 100 + +#define ID_FILE_NEW_WINDOW 32771 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 201 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 32775 +#endif +#endif diff --git a/samples/HelloCcf/publish/.DS_Store b/samples/HelloCcf/publish/.DS_Store new file mode 100644 index 0000000..950b2f3 Binary files /dev/null and b/samples/HelloCcf/publish/.DS_Store differ diff --git a/samples/HelloCcf/publish/android/.DS_Store b/samples/HelloCcf/publish/android/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/samples/HelloCcf/publish/android/.DS_Store differ