diff --git a/extensions/CocoStudio/Reader/CCSSceneReader.cpp b/extensions/CocoStudio/Reader/CCSSceneReader.cpp index 00f6f2e932..8e4fdd26c0 100644 --- a/extensions/CocoStudio/Reader/CCSSceneReader.cpp +++ b/extensions/CocoStudio/Reader/CCSSceneReader.cpp @@ -49,12 +49,6 @@ NS_CC_EXT_BEGIN cocos2d::Node *pNode = NULL; do { CC_BREAK_IF(pszFileName == NULL); - std::string strFileName(pszFileName); - if (std::string::npos != strFileName.find_last_of('/')) - { - strFileName = strFileName.substr(0, strFileName.find_last_of('/') + 1); - cocos2d::CCFileUtils::getInstance()->addSearchPath(strFileName.c_str()); - } pData = (char*)(cocos2d::CCFileUtils::getInstance()->getFileData(pszFileName, "r", &size)); CC_BREAK_IF(pData == NULL || strcmp(pData, "") == 0); cs::JsonDictionary *jsonDict = new cs::JsonDictionary(); diff --git a/extensions/CocoStudio/Reader/CCSSceneReader.h b/extensions/CocoStudio/Reader/CCSSceneReader.h index aa41d1090e..c0c88ae660 100644 --- a/extensions/CocoStudio/Reader/CCSSceneReader.h +++ b/extensions/CocoStudio/Reader/CCSSceneReader.h @@ -49,7 +49,8 @@ public: void purgeSceneReader(); static const char* sceneReaderVersion(); cocos2d::Node* createNodeWithSceneFile(const char *pszFileName); - private: + +private: cocos2d::Node* createObject(cs::JsonDictionary * inputFiles, cocos2d::Node* parent); void setPropertyFromJsonDict(cocos2d::Node *node, cs::JsonDictionary* dict); diff --git a/samples/Cpp/TestCpp/Classes/AppDelegate.cpp b/samples/Cpp/TestCpp/Classes/AppDelegate.cpp index 5b226d028b..27e49f919d 100644 --- a/samples/Cpp/TestCpp/Classes/AppDelegate.cpp +++ b/samples/Cpp/TestCpp/Classes/AppDelegate.cpp @@ -37,15 +37,20 @@ bool AppDelegate::applicationDidFinishLaunching() auto designSize = Size(480, 320); auto pFileUtils = FileUtils::getInstance(); + std::vector searchPaths; if (screenSize.height > 320) { auto resourceSize = Size(960, 640); - std::vector searchPaths; searchPaths.push_back("hd"); - pFileUtils->setSearchPaths(searchPaths); + searchPaths.push_back("hd/scenetest"); director->setContentScaleFactor(resourceSize.height/designSize.height); } + else + { + searchPaths.push_back("scenetest"); + } + pFileUtils->setSearchPaths(searchPaths); EGLView::getInstance()->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::NO_BORDER); diff --git a/samples/Cpp/TestCpp/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp b/samples/Cpp/TestCpp/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp index 3478a4ae68..baec3b373d 100644 --- a/samples/Cpp/TestCpp/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp +++ b/samples/Cpp/TestCpp/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp @@ -63,12 +63,6 @@ cocos2d::Node* SceneEditorTestLayer::createGameScene() return NULL; } _curNode = pNode; - - //fishes - /*cocos2d::extension::armature::Armature *pBlowFish = getFish(10008, "blowFish"); - cocos2d::extension::armature::Armature *pButterFlyFish = getFish(10009, "butterFlyFish"); - pBlowFish->getAnimation()->playByIndex(0); - pButterFlyFish->getAnimation()->playByIndex(0);*/ MenuItemFont *itemBack = MenuItemFont::create("Back", CC_CALLBACK_1(SceneEditorTestLayer::toExtensionsMainLayer, this)); itemBack->setColor(Color3B(255, 255, 255)); @@ -79,9 +73,6 @@ cocos2d::Node* SceneEditorTestLayer::createGameScene() pNode->addChild(menuBack); - //ui action - //cocos2d::extension::UIActionManager::shareManager()->PlayActionByName("startMenu_1.json","Animation1"); - return pNode; } diff --git a/samples/Cpp/TestCpp/Resources/hd/scenetest/Images/startMenuBG.png.REMOVED.git-id b/samples/Cpp/TestCpp/Resources/hd/scenetest/Images/startMenuBG.png.REMOVED.git-id new file mode 100644 index 0000000000..500673bd71 --- /dev/null +++ b/samples/Cpp/TestCpp/Resources/hd/scenetest/Images/startMenuBG.png.REMOVED.git-id @@ -0,0 +1 @@ +93072f4e7b1943c7598a53f8796d2baafba4a5ca \ No newline at end of file diff --git a/samples/Cpp/TestCpp/Resources/hd/scenetest/Misc/music_logo.mp3.REMOVED.git-id b/samples/Cpp/TestCpp/Resources/hd/scenetest/Misc/music_logo.mp3.REMOVED.git-id new file mode 100644 index 0000000000..604b21ac01 --- /dev/null +++ b/samples/Cpp/TestCpp/Resources/hd/scenetest/Misc/music_logo.mp3.REMOVED.git-id @@ -0,0 +1 @@ +4b2aa3f3fbf2f96bced91d0da0e8fc2f7f863a61 \ No newline at end of file diff --git a/samples/Cpp/TestCpp/Resources/hd/scenetest/fishes/Butterflyfish/Butterflyfish0.png.REMOVED.git-id b/samples/Cpp/TestCpp/Resources/hd/scenetest/fishes/Butterflyfish/Butterflyfish0.png.REMOVED.git-id new file mode 100644 index 0000000000..13d9610346 --- /dev/null +++ b/samples/Cpp/TestCpp/Resources/hd/scenetest/fishes/Butterflyfish/Butterflyfish0.png.REMOVED.git-id @@ -0,0 +1 @@ +e22c64c159404622ff93915eb9f01be011001dac \ No newline at end of file diff --git a/samples/Cpp/TestCpp/Resources/hd/scenetest/fishes/blowFish/Blowfish0.png.REMOVED.git-id b/samples/Cpp/TestCpp/Resources/hd/scenetest/fishes/blowFish/Blowfish0.png.REMOVED.git-id new file mode 100644 index 0000000000..d35dbb70ac --- /dev/null +++ b/samples/Cpp/TestCpp/Resources/hd/scenetest/fishes/blowFish/Blowfish0.png.REMOVED.git-id @@ -0,0 +1 @@ +d7d85cd75e382c2dd04ddc34ca1d07e2ffff66d5 \ No newline at end of file diff --git a/samples/Cpp/TestCpp/Resources/hd/scenetest/startMenu/Fish_UI/starMenuButton01.png.REMOVED.git-id b/samples/Cpp/TestCpp/Resources/hd/scenetest/startMenu/Fish_UI/starMenuButton01.png.REMOVED.git-id new file mode 100644 index 0000000000..607f8adcb9 --- /dev/null +++ b/samples/Cpp/TestCpp/Resources/hd/scenetest/startMenu/Fish_UI/starMenuButton01.png.REMOVED.git-id @@ -0,0 +1 @@ +c6b8f5b59f6d563cef4a4eba19985716ff1e1f6e \ No newline at end of file diff --git a/samples/Cpp/TestCpp/Resources/hd/scenetest/startMenu/Fish_UI/starMenuButton02.png.REMOVED.git-id b/samples/Cpp/TestCpp/Resources/hd/scenetest/startMenu/Fish_UI/starMenuButton02.png.REMOVED.git-id new file mode 100644 index 0000000000..958d03a9c2 --- /dev/null +++ b/samples/Cpp/TestCpp/Resources/hd/scenetest/startMenu/Fish_UI/starMenuButton02.png.REMOVED.git-id @@ -0,0 +1 @@ +db7f2b0850ff959c24ceca59bcae78b1afcb4c80 \ No newline at end of file diff --git a/samples/Cpp/TestCpp/Resources/hd/scenetest/startMenu/Fish_UI/ui_logo_001-hd.png.REMOVED.git-id b/samples/Cpp/TestCpp/Resources/hd/scenetest/startMenu/Fish_UI/ui_logo_001-hd.png.REMOVED.git-id new file mode 100644 index 0000000000..22c8929ad6 --- /dev/null +++ b/samples/Cpp/TestCpp/Resources/hd/scenetest/startMenu/Fish_UI/ui_logo_001-hd.png.REMOVED.git-id @@ -0,0 +1 @@ +9a5e05761c2f6db85e7cd8f3dcf1932b6b6eb2d8 \ No newline at end of file diff --git a/samples/Cpp/TestCpp/Resources/scenetest/startMenu/Fish_UI/ui_logo_001-hd.png.REMOVED.git-id b/samples/Cpp/TestCpp/Resources/scenetest/startMenu/Fish_UI/ui_logo_001-hd.png.REMOVED.git-id new file mode 100644 index 0000000000..e303572866 --- /dev/null +++ b/samples/Cpp/TestCpp/Resources/scenetest/startMenu/Fish_UI/ui_logo_001-hd.png.REMOVED.git-id @@ -0,0 +1 @@ +d9c89ed8831db643cc80a0651e5398e26861bbd0 \ No newline at end of file diff --git a/samples/Cpp/TestCpp/proj.win32/main.cpp b/samples/Cpp/TestCpp/proj.win32/main.cpp index c7a804c96a..26ba4e9292 100644 --- a/samples/Cpp/TestCpp/proj.win32/main.cpp +++ b/samples/Cpp/TestCpp/proj.win32/main.cpp @@ -15,6 +15,6 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + eglView->init("TestCPP",960,640); return Application::getInstance()->run(); }