diff --git a/templates/cpp-template-default/Classes/HelloWorldScene.cpp b/templates/cpp-template-default/Classes/HelloWorldScene.cpp index 89d6933161..a36d0ffc2a 100644 --- a/templates/cpp-template-default/Classes/HelloWorldScene.cpp +++ b/templates/cpp-template-default/Classes/HelloWorldScene.cpp @@ -1,4 +1,5 @@ #include "HelloWorldScene.h" +#include "SimpleAudioEngine.h" USING_NS_CC; @@ -40,7 +41,7 @@ bool HelloWorld::init() "CloseSelected.png", CC_CALLBACK_1(HelloWorld::menuCloseCallback, this)); - closeItem->setPosition(Vec2(origin.x + visibleSize.width - closeItem->getContentSize().width/2 , + closeItem->setPosition(Vec2(origin.x + visibleSize.width - closeItem->getContentSize().width/2 , origin.y + closeItem->getContentSize().height/2)); // create menu, it's an autorelease object diff --git a/templates/cpp-template-default/proj.android-studio/app/jni/Android.mk b/templates/cpp-template-default/proj.android-studio/app/jni/Android.mk index 56252fe073..2ca462fe1b 100644 --- a/templates/cpp-template-default/proj.android-studio/app/jni/Android.mk +++ b/templates/cpp-template-default/proj.android-studio/app/jni/Android.mk @@ -5,6 +5,7 @@ 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) +$(call import-add-path,$(LOCAL_PATH)/../../../cocos2d/cocos/audio/include) LOCAL_MODULE := MyGame_shared diff --git a/templates/cpp-template-default/proj.android/jni/Android.mk b/templates/cpp-template-default/proj.android/jni/Android.mk index d5c2e67348..e1e6a2aea0 100644 --- a/templates/cpp-template-default/proj.android/jni/Android.mk +++ b/templates/cpp-template-default/proj.android/jni/Android.mk @@ -5,6 +5,7 @@ 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) +$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/cocos/audio/include) LOCAL_MODULE := MyGame_shared diff --git a/templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj b/templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj index 1cabfa556c..1d1ec0875b 100644 --- a/templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj +++ b/templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj @@ -545,9 +545,7 @@ "CC_ENABLE_CHIPMUNK_INTEGRATION=1", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - ); + HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = ios/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 6.0; LIBRARY_SEARCH_PATHS = ""; @@ -577,9 +575,7 @@ "CC_ENABLE_CHIPMUNK_INTEGRATION=1", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - ); + HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = ios/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 6.0; LIBRARY_SEARCH_PATHS = ""; @@ -665,6 +661,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../cocos2d", + "$(SRCROOT)/../cocos2d/cocos/audio/include", "$(SRCROOT)/../cocos2d/cocos", "$(SRCROOT)/../cocos2d/extensions", "$(SRCROOT)/../cocos2d/external", @@ -687,6 +684,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../cocos2d", + "$(SRCROOT)/../cocos2d/cocos/audio/include", "$(SRCROOT)/../cocos2d/cocos", "$(SRCROOT)/../cocos2d/extensions", "$(SRCROOT)/../cocos2d/external", diff --git a/templates/js-template-default/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj b/templates/js-template-default/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj index a274e92ad2..3efca65d41 100644 --- a/templates/js-template-default/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj +++ b/templates/js-template-default/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj @@ -850,7 +850,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.8; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; - USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x $(SRCROOT)/../../cocos2d-x/cocos $(SRCROOT)/../../cocos2d-x/extensions $(SRCROOT)/../../cocos2d-x/external $(SRCROOT)/../../cocos2d-x/external/chipmunk/include/chipmunk $(SRCROOT)/../../cocos2d-x/cocos/editor-support"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x $(SRCROOT)/../../cocos2d-x/cocos/audio/include $(SRCROOT)/../../cocos2d-x/cocos $(SRCROOT)/../../cocos2d-x/extensions $(SRCROOT)/../../cocos2d-x/external $(SRCROOT)/../../cocos2d-x/external/chipmunk/include/chipmunk $(SRCROOT)/../../cocos2d-x/cocos/editor-support"; }; name = Debug; }; @@ -873,7 +873,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.8; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; PRODUCT_NAME = "$(TARGET_NAME)"; - USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x $(SRCROOT)/../../cocos2d-x/cocos $(SRCROOT)/../../cocos2d-x/extensions $(SRCROOT)/../../cocos2d-x/external $(SRCROOT)/../../cocos2d-x/external/chipmunk/include/chipmunk $(SRCROOT)/../../cocos2d-x/cocos/editor-support"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x $(SRCROOT)/../../cocos2d-x/cocos/audio/include $(SRCROOT)/../../cocos2d-x/cocos $(SRCROOT)/../../cocos2d-x/extensions $(SRCROOT)/../../cocos2d-x/external $(SRCROOT)/../../cocos2d-x/external/chipmunk/include/chipmunk $(SRCROOT)/../../cocos2d-x/cocos/editor-support"; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj index 4ec6b78263..45d0239315 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj @@ -842,7 +842,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 6.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; - USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x $(SRCROOT)/../../cocos2d-x/cocos $(SRCROOT)/../../cocos2d-x/extensions $(SRCROOT)/../../cocos2d-x/external $(SRCROOT)/../../cocos2d-x/external/chipmunk/include/chipmunk $(SRCROOT)/../../cocos2d-x/external/lua/luajit/include $(SRCROOT)/../../cocos2d-x/external/lua/tolua $(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib $(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib/protobuf-lite"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x $(SRCROOT)/../../cocos2d-x/cocos/audio/include $(SRCROOT)/../../cocos2d-x/cocos $(SRCROOT)/../../cocos2d-x/extensions $(SRCROOT)/../../cocos2d-x/external $(SRCROOT)/../../cocos2d-x/external/chipmunk/include/chipmunk $(SRCROOT)/../../cocos2d-x/external/lua/luajit/include $(SRCROOT)/../../cocos2d-x/external/lua/tolua $(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib $(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib/protobuf-lite"; }; name = Debug; }; @@ -864,7 +864,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 6.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; PRODUCT_NAME = "$(TARGET_NAME)"; - USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x $(SRCROOT)/../../cocos2d-x/cocos $(SRCROOT)/../../cocos2d-x/extensions $(SRCROOT)/../../cocos2d-x/external $(SRCROOT)/../../cocos2d-x/external/chipmunk/include/chipmunk $(SRCROOT)/../../cocos2d-x/external/lua/luajit/include $(SRCROOT)/../../cocos2d-x/external/lua/tolua $(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib $(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib/protobuf-lite"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x $(SRCROOT)/../../cocos2d-x/cocos/audio/include $(SRCROOT)/../../cocos2d-x/cocos $(SRCROOT)/../../cocos2d-x/extensions $(SRCROOT)/../../cocos2d-x/external $(SRCROOT)/../../cocos2d-x/external/chipmunk/include/chipmunk $(SRCROOT)/../../cocos2d-x/external/lua/luajit/include $(SRCROOT)/../../cocos2d-x/external/lua/tolua $(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib $(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib/protobuf-lite"; VALIDATE_PRODUCT = YES; }; name = Release; @@ -879,9 +879,7 @@ GCC_DYNAMIC_NO_PIC = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = ios/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - ); + GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../Classes/protobuf-lite", "$(SRCROOT)/../Classes", @@ -918,9 +916,7 @@ ENABLE_BITCODE = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = ios/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - ); + GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../Classes/protobuf-lite", "$(SRCROOT)/../Classes",