Merge pull request #6629 from dumganhar/v3

Adds missing 'fps_images.png', our test case needs them and Lua xcode project fix
This commit is contained in:
James Chen 2014-05-08 15:28:29 +08:00
commit 5c38c04b1b
4 changed files with 38 additions and 32 deletions

View File

@ -177,6 +177,8 @@
1A0EE57D18CDFBBE004CD58F /* Opengl.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1ABCA37518CD9E180087CE3A /* Opengl.lua */; };
1A0EE57E18CDFBBE004CD58F /* OpenglConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1ABCA37618CD9E180087CE3A /* OpenglConstants.lua */; };
1A0EE57F18CDFBBE004CD58F /* StudioConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1ABCA37718CD9E180087CE3A /* StudioConstants.lua */; };
1A1645A6191B6281008C7C7F /* ccs-res in Resources */ = {isa = PBXBuildFile; fileRef = 1A221C9B191771E300FD2BE4 /* ccs-res */; };
1A1645A9191B6283008C7C7F /* ccs-res in Resources */ = {isa = PBXBuildFile; fileRef = 1A221C9B191771E300FD2BE4 /* ccs-res */; };
1A221C9C191771E300FD2BE4 /* ccs-res in Resources */ = {isa = PBXBuildFile; fileRef = 1A221C9B191771E300FD2BE4 /* ccs-res */; };
1A221C9D191771E400FD2BE4 /* ccs-res in Resources */ = {isa = PBXBuildFile; fileRef = 1A221C9B191771E300FD2BE4 /* ccs-res */; };
1A9F808D177E98A600D9A1CB /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A9F808C177E98A600D9A1CB /* libcurl.dylib */; };
@ -4242,6 +4244,7 @@
1AC35DDF18CEE65900F37B72 /* music.mid in Resources */,
1AC35D7518CEE58500F37B72 /* src in Resources */,
1AC35DE018CEE65900F37B72 /* background.mp3 in Resources */,
1A1645A6191B6281008C7C7F /* ccs-res in Resources */,
C08689C218D370C90093E810 /* background.caf in Resources */,
15C90B4918E66C2A00D69802 /* tp.lua in Resources */,
1AC35DE918CEE65900F37B72 /* effect1.wav in Resources */,
@ -4327,6 +4330,7 @@
1AC35DEB18CEE65B00F37B72 /* CocosBuilderExample.ccbproj in Resources */,
1AC35DF518CEE65B00F37B72 /* commonly_used_words.txt in Resources */,
1AC35DCA18CEE65200F37B72 /* animations in Resources */,
1A1645A9191B6283008C7C7F /* ccs-res in Resources */,
1AC35DA118CEE5D100F37B72 /* Icon-72.png in Resources */,
15C90B4018E66C0D00D69802 /* ltn12.lua in Resources */,
1AC35DA218CEE5D100F37B72 /* Icon-76.png in Resources */,

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -31,13 +31,13 @@ bool AppDelegate::applicationDidFinishLaunching()
// set FPS. the default value is 1.0/60 if you don't call this
director->setAnimationInterval(1.0 / 60);
auto screenSize = glview->getFrameSize();
auto designSize = Size(480, 320);
auto pFileUtils = FileUtils::getInstance();
if (screenSize.height > 320)
{
auto resourceSize = Size(960, 640);
@ -46,24 +46,24 @@ bool AppDelegate::applicationDidFinishLaunching()
pFileUtils->setSearchPaths(searchPaths);
director->setContentScaleFactor(resourceSize.height/designSize.height);
}
glview->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::FIXED_HEIGHT);
// register lua engine
LuaEngine* pEngine = LuaEngine::getInstance();
ScriptEngineManager::getInstance()->setScriptEngine(pEngine);
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID ||CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
LuaStack* stack = pEngine->getLuaStack();
register_assetsmanager_test_sample(stack->getLuaState());
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
std::string resPrefix("");
#else
std::string resPrefix("res/");
#endif
std::vector<std::string> searchPaths = pFileUtils->getSearchPaths();
searchPaths.insert(searchPaths.begin(), resPrefix);
@ -71,38 +71,40 @@ bool AppDelegate::applicationDidFinishLaunching()
if (screenSize.height > 320)
{
searchPaths.insert(searchPaths.begin(), resPrefix + "hd");
searchPaths.insert(searchPaths.begin(), resPrefix + "hd/Images");
searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/ArmatureComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/AttributeComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/BackgroundComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/EffectComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/LoadSceneEdtiorFileTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/ParticleComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/SpriteComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/TmxMapComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/UIComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/TriggerTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/Images");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/ArmatureComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/AttributeComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/BackgroundComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/EffectComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/LoadSceneEdtiorFileTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/ParticleComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/SpriteComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/TmxMapComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/UIComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/TriggerTest");
}
else
{
searchPaths.insert(searchPaths.begin(), resPrefix + "Images");
searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/ArmatureComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/AttributeComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/BackgroundComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/EffectComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/LoadSceneEdtiorFileTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/ParticleComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/SpriteComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/TmxMapComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/UIComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/TriggerTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/Images");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/ArmatureComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/AttributeComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/BackgroundComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/EffectComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/LoadSceneEdtiorFileTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/ParticleComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/SpriteComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/TmxMapComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/UIComponentTest");
searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/TriggerTest");
}
FileUtils::getInstance()->setSearchPaths(searchPaths);
pEngine->executeScriptFile("src/controller.lua");
return true;
}