Skip to content

Commit

Permalink
Merge pull request cocos2d#2903 from dumganhar/master
Browse files Browse the repository at this point in the history
Template fixes for iOS and Windows
  • Loading branch information
minggo committed Jun 17, 2013
2 parents bb9dc62 + 7b0fb96 commit 9b99bec
Show file tree
Hide file tree
Showing 11 changed files with 325 additions and 35 deletions.
7 changes: 5 additions & 2 deletions CocosDenshion/android/opensl/SimpleAudioEngineOpenSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,18 @@ unsigned int SimpleAudioEngineOpenSL::playEffect(const char* pszFilePath, bool b
if (s_pOpenSL->getEffectState(soundID) == PLAYSTATE_PLAYING)
{
// recreate an effect player
s_pOpenSL->recreatePlayer(pszFilePath);
if (s_pOpenSL->recreatePlayer(pszFilePath))
{
s_pOpenSL->setEffectLooping(soundID, bLoop);
}
}
else
{
s_pOpenSL->setEffectState(soundID, PLAYSTATE_STOPPED);
s_pOpenSL->setEffectState(soundID, PLAYSTATE_PLAYING);
s_pOpenSL->setEffectLooping(soundID, bLoop);
}

s_pOpenSL->setEffectLooping(soundID, bLoop);
}

return soundID;
Expand Down
2 changes: 1 addition & 1 deletion cocos2dx/platform/android/java/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

android.library=true
# Project target.
target=android-17
target=android-8
16 changes: 0 additions & 16 deletions extensions/cocos-ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,6 @@
#include "network/HttpResponse.h"
#include "network/HttpClient.h"

#include "CCArmature/CCArmature.h"
#include "CCArmature/CCBone.h"
#include "CCArmature/animation/CCArmatureAnimation.h"
#include "CCArmature/datas/CCDatas.h"
#include "CCArmature/display/CCBatchNode.h"
#include "CCArmature/display/CCDecorativeDisplay.h"
#include "CCArmature/display/CCDisplayManager.h"
#include "CCArmature/display/CCSkin.h"
#include "CCArmature/physics/CCColliderDetector.h"
#include "CCArmature/physics/CCPhysicsWorld.h"
#include "CCArmature/utils/CCArmatureDataManager.h"
#include "CCArmature/utils/CCConstValue.h"
#include "CCArmature/utils/CCDataReaderHelper.h"
#include "CCArmature/utils/CCTweenFunction.h"
#include "CCArmature/external_tool/sigslot.h"

// Physics integration
#if CC_ENABLE_CHIPMUNK_INTEGRATION || CC_ENABLE_BOX2D_INTEGRATION
#include "physics_nodes/CCPhysicsDebugNode.h"
Expand Down
1 change: 1 addition & 0 deletions samples/Cpp/TestCpp/Classes/AppDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "controller.h"
#include "SimpleAudioEngine.h"
#include "cocos-ext.h"
#include "CCArmature/utils/CCArmatureDataManager.h"

USING_NS_CC;
using namespace CocosDenshion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@
#include "../../VisibleRect.h"
#include "../../testBasic.h"

#include "CCArmature/CCArmature.h"
#include "CCArmature/CCBone.h"
#include "CCArmature/animation/CCArmatureAnimation.h"
#include "CCArmature/datas/CCDatas.h"
#include "CCArmature/display/CCBatchNode.h"
#include "CCArmature/display/CCDecorativeDisplay.h"
#include "CCArmature/display/CCDisplayManager.h"
#include "CCArmature/display/CCSkin.h"
#include "CCArmature/physics/CCColliderDetector.h"
#include "CCArmature/physics/CCPhysicsWorld.h"
#include "CCArmature/utils/CCArmatureDataManager.h"
#include "CCArmature/utils/CCConstValue.h"
#include "CCArmature/utils/CCDataReaderHelper.h"
#include "CCArmature/utils/CCTweenFunction.h"
#include "CCArmature/external_tool/sigslot.h"


class ArmatureTestScene : public TestScene
{
public:
Expand Down
4 changes: 2 additions & 2 deletions template/multi-platform-lua/proj.win32/HelloLua.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libcocos2d.lib;libExtensions.lib;opengl32.lib;glew32.lib;libBox2d.lib;libchipmunk.lib;libCocosDenshion.lib;liblua.lib;lua51.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libcocos2d.lib;libExtensions.lib;opengl32.lib;glew32.lib;libBox2d.lib;libchipmunk.lib;libCocosDenshion.lib;liblua.lib;lua51.lib;websockets.lib;pthreadVCE2.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<ResourceCompile>
<Culture>0x0409</Culture>
Expand Down Expand Up @@ -126,7 +126,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\external\libwebsockets\win32\lib\*.*" "$(OutD
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libcocos2d.lib;libExtensions.lib;opengl32.lib;glew32.lib;libBox2d.lib;libchipmunk.lib;libCocosDenshion.lib;liblua.lib;lua51.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libcocos2d.lib;libExtensions.lib;opengl32.lib;glew32.lib;libBox2d.lib;libchipmunk.lib;libCocosDenshion.lib;liblua.lib;lua51.lib;websockets.lib;pthreadVCE2.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<ResourceCompile>
<Culture>0x0409</Culture>
Expand Down
69 changes: 56 additions & 13 deletions template/xcode4/lib_cocos2dx.xctemplate/TemplateInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3335,6 +3335,58 @@
<key>TargetIndices</key>
<array/>
</dict>
<key>libs/cocos2dx/support/component/CCComponent.cpp</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>cocos2dx</string>
<string>support</string>
<string>component</string>
</array>
<key>Path</key>
<string>libs/cocos2dx/support/component/CCComponent.cpp</string>
</dict>
<key>libs/cocos2dx/support/component/CCComponent.h</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>cocos2dx</string>
<string>support</string>
<string>component</string>
</array>
<key>Path</key>
<string>libs/cocos2dx/support/component/CCComponent.h</string>
<key>TargetIndices</key>
<array/>
</dict>
<key>libs/cocos2dx/support/component/CCComponentContainer.cpp</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>cocos2dx</string>
<string>support</string>
<string>component</string>
</array>
<key>Path</key>
<string>libs/cocos2dx/support/component/CCComponentContainer.cpp</string>
</dict>
<key>libs/cocos2dx/support/component/CCComponentContainer.h</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>cocos2dx</string>
<string>support</string>
<string>component</string>
</array>
<key>Path</key>
<string>libs/cocos2dx/support/component/CCComponentContainer.h</string>
<key>TargetIndices</key>
<array/>
</dict>
<key>libs/cocos2dx/support/data_support/ccCArray.cpp</key>
<dict>
<key>Group</key>
Expand Down Expand Up @@ -3465,18 +3517,6 @@
<key>TargetIndices</key>
<array/>
</dict>
<key>libs/cocos2dx/support/user_default/Archive.zip</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>cocos2dx</string>
<string>support</string>
<string>user_default</string>
</array>
<key>Path</key>
<string>libs/cocos2dx/support/user_default/Archive.zip</string>
</dict>
<key>libs/cocos2dx/support/user_default/CCUserDefault.h</key>
<dict>
<key>Group</key>
Expand Down Expand Up @@ -4258,6 +4298,10 @@
<string>libs/cocos2dx/support/ccUtils.h</string>
<string>libs/cocos2dx/support/CCVertex.cpp</string>
<string>libs/cocos2dx/support/CCVertex.h</string>
<string>libs/cocos2dx/support/component/CCComponent.cpp</string>
<string>libs/cocos2dx/support/component/CCComponent.h</string>
<string>libs/cocos2dx/support/component/CCComponentContainer.cpp</string>
<string>libs/cocos2dx/support/component/CCComponentContainer.h</string>
<string>libs/cocos2dx/support/data_support/ccCArray.cpp</string>
<string>libs/cocos2dx/support/data_support/ccCArray.h</string>
<string>libs/cocos2dx/support/data_support/uthash.h</string>
Expand All @@ -4268,7 +4312,6 @@
<string>libs/cocos2dx/support/tinyxml2/tinyxml2.h</string>
<string>libs/cocos2dx/support/TransformUtils.cpp</string>
<string>libs/cocos2dx/support/TransformUtils.h</string>
<string>libs/cocos2dx/support/user_default/Archive.zip</string>
<string>libs/cocos2dx/support/user_default/CCUserDefault.h</string>
<string>libs/cocos2dx/support/user_default/CCUserDefault.mm</string>
<string>libs/cocos2dx/support/zip_support/ioapi.cpp</string>
Expand Down
156 changes: 156 additions & 0 deletions template/xcode4/lib_extensions.xctemplate/TemplateInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,102 @@
<key>TargetIndices</key>
<array/>
</dict>
<key>libs/extensions/Components/CCComAttribute.cpp</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>extensions</string>
<string>Components</string>
</array>
<key>Path</key>
<string>libs/extensions/Components/CCComAttribute.cpp</string>
</dict>
<key>libs/extensions/Components/CCComAttribute.h</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>extensions</string>
<string>Components</string>
</array>
<key>Path</key>
<string>libs/extensions/Components/CCComAttribute.h</string>
<key>TargetIndices</key>
<array/>
</dict>
<key>libs/extensions/Components/CCComAudio.cpp</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>extensions</string>
<string>Components</string>
</array>
<key>Path</key>
<string>libs/extensions/Components/CCComAudio.cpp</string>
</dict>
<key>libs/extensions/Components/CCComAudio.h</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>extensions</string>
<string>Components</string>
</array>
<key>Path</key>
<string>libs/extensions/Components/CCComAudio.h</string>
<key>TargetIndices</key>
<array/>
</dict>
<key>libs/extensions/Components/CCComController.cpp</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>extensions</string>
<string>Components</string>
</array>
<key>Path</key>
<string>libs/extensions/Components/CCComController.cpp</string>
</dict>
<key>libs/extensions/Components/CCComController.h</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>extensions</string>
<string>Components</string>
</array>
<key>Path</key>
<string>libs/extensions/Components/CCComController.h</string>
<key>TargetIndices</key>
<array/>
</dict>
<key>libs/extensions/Components/CCInputDelegate.cpp</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>extensions</string>
<string>Components</string>
</array>
<key>Path</key>
<string>libs/extensions/Components/CCInputDelegate.cpp</string>
</dict>
<key>libs/extensions/Components/CCInputDelegate.h</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>extensions</string>
<string>Components</string>
</array>
<key>Path</key>
<string>libs/extensions/Components/CCInputDelegate.h</string>
<key>TargetIndices</key>
<array/>
</dict>
<key>libs/extensions/ExtensionMacros.h</key>
<dict>
<key>Group</key>
Expand Down Expand Up @@ -1647,6 +1743,54 @@
<key>TargetIndices</key>
<array/>
</dict>
<key>libs/extensions/spine/CCSkeleton.cpp</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>extensions</string>
<string>spine</string>
</array>
<key>Path</key>
<string>libs/extensions/spine/CCSkeleton.cpp</string>
</dict>
<key>libs/extensions/spine/CCSkeleton.h</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>extensions</string>
<string>spine</string>
</array>
<key>Path</key>
<string>libs/extensions/spine/CCSkeleton.h</string>
<key>TargetIndices</key>
<array/>
</dict>
<key>libs/extensions/spine/CCSkeletonAnimation.cpp</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>extensions</string>
<string>spine</string>
</array>
<key>Path</key>
<string>libs/extensions/spine/CCSkeletonAnimation.cpp</string>
</dict>
<key>libs/extensions/spine/CCSkeletonAnimation.h</key>
<dict>
<key>Group</key>
<array>
<string>libs</string>
<string>extensions</string>
<string>spine</string>
</array>
<key>Path</key>
<string>libs/extensions/spine/CCSkeletonAnimation.h</string>
<key>TargetIndices</key>
<array/>
</dict>
<key>libs/extensions/spine/extension.cpp</key>
<dict>
<key>Group</key>
Expand Down Expand Up @@ -1958,6 +2102,14 @@
<string>libs/extensions/CCBReader/CCSpriteLoader.cpp</string>
<string>libs/extensions/CCBReader/CCSpriteLoader.h</string>
<string>libs/extensions/cocos-ext.h</string>
<string>libs/extensions/Components/CCComAttribute.cpp</string>
<string>libs/extensions/Components/CCComAttribute.h</string>
<string>libs/extensions/Components/CCComAudio.cpp</string>
<string>libs/extensions/Components/CCComAudio.h</string>
<string>libs/extensions/Components/CCComController.cpp</string>
<string>libs/extensions/Components/CCComController.h</string>
<string>libs/extensions/Components/CCInputDelegate.cpp</string>
<string>libs/extensions/Components/CCInputDelegate.h</string>
<string>libs/extensions/ExtensionMacros.h</string>
<string>libs/extensions/GUI/CCControlExtension/CCControl.cpp</string>
<string>libs/extensions/GUI/CCControlExtension/CCControl.h</string>
Expand Down Expand Up @@ -2035,6 +2187,10 @@
<string>libs/extensions/spine/Bone.h</string>
<string>libs/extensions/spine/BoneData.cpp</string>
<string>libs/extensions/spine/BoneData.h</string>
<string>libs/extensions/spine/CCSkeleton.cpp</string>
<string>libs/extensions/spine/CCSkeleton.h</string>
<string>libs/extensions/spine/CCSkeletonAnimation.cpp</string>
<string>libs/extensions/spine/CCSkeletonAnimation.h</string>
<string>libs/extensions/spine/extension.cpp</string>
<string>libs/extensions/spine/extension.h</string>
<string>libs/extensions/spine/Json.cpp</string>
Expand Down
Loading

0 comments on commit 9b99bec

Please sign in to comment.