mirror of https://github.com/axmolengine/axmol.git
Merge branch 'develop' into develop_nutty_modify_framework_optimizeclipping
This commit is contained in:
commit
99d842d954
1
AUTHORS
1
AUTHORS
|
@ -702,6 +702,7 @@ Developers:
|
|||
|
||||
daltomi
|
||||
Fixed a typo in Director class.
|
||||
Removed an unnecessary boolean flag in CCFontAtlasCache.cpp.
|
||||
|
||||
Retired Core Developers:
|
||||
WenSheng Yang
|
||||
|
|
|
@ -103,20 +103,18 @@ std::string FontAtlasCache::generateFontName(const std::string& fontFileName, in
|
|||
|
||||
bool FontAtlasCache::releaseFontAtlas(FontAtlas *atlas)
|
||||
{
|
||||
if (atlas)
|
||||
if (nullptr != atlas)
|
||||
{
|
||||
for( auto &item: _atlasMap )
|
||||
{
|
||||
if ( item.second == atlas )
|
||||
{
|
||||
bool removeFromList = false;
|
||||
if(item.second->isSingleReference())
|
||||
removeFromList = true;
|
||||
if( atlas->isSingleReference() )
|
||||
{
|
||||
_atlasMap.erase(item.first);
|
||||
}
|
||||
|
||||
item.second->release();
|
||||
|
||||
if (removeFromList)
|
||||
_atlasMap.erase(item.first);
|
||||
atlas->release();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -126,4 +124,4 @@ bool FontAtlasCache::releaseFontAtlas(FontAtlas *atlas)
|
|||
return false;
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
NS_CC_END
|
||||
|
|
|
@ -319,7 +319,7 @@ bool AssetsManager::uncompress()
|
|||
return false;
|
||||
}
|
||||
|
||||
string fullPath = _storagePath + fileName;
|
||||
const string fullPath = _storagePath + fileName;
|
||||
|
||||
// Check if this entry is a directory or a file.
|
||||
const size_t filenameLength = strlen(fileName);
|
||||
|
@ -339,15 +339,15 @@ bool AssetsManager::uncompress()
|
|||
//There are not directory entry in some case.
|
||||
//So we need to test whether the file directory exists when uncompressing file entry
|
||||
//, if does not exist then create directory
|
||||
string fileNameStr(fileName);
|
||||
const string fileNameStr(fileName);
|
||||
|
||||
size_t startIndex=0;
|
||||
|
||||
size_t index=fileNameStr.find("/",startIndex);
|
||||
|
||||
while(index!=-1)
|
||||
while(index != std::string::npos)
|
||||
{
|
||||
string dir=_storagePath+fileNameStr.substr(0,index);
|
||||
const string dir=_storagePath+fileNameStr.substr(0,index);
|
||||
|
||||
FILE *out = fopen(dir.c_str(), "r");
|
||||
|
||||
|
@ -501,7 +501,7 @@ int assetsManagerProgressFunc(void *ptr, double totalToDownload, double nowDownl
|
|||
bool AssetsManager::downLoad()
|
||||
{
|
||||
// Create a file to save package.
|
||||
string outFileName = _storagePath + TEMP_PACKAGE_FILE_NAME;
|
||||
const string outFileName = _storagePath + TEMP_PACKAGE_FILE_NAME;
|
||||
FILE *fp = fopen(outFileName.c_str(), "wb");
|
||||
if (! fp)
|
||||
{
|
||||
|
|
|
@ -61,11 +61,11 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
searchPaths.insert(searchPaths.begin(), "cocosbuilderRes");
|
||||
if (screenSize.height > 320)
|
||||
{
|
||||
searchPaths.insert(searchPaths.begin(), "hd/scenetest");
|
||||
searchPaths.insert(searchPaths.begin(), "hd/scenetest/LoadSceneEdtiorFileTest");
|
||||
}
|
||||
else
|
||||
{
|
||||
searchPaths.insert(searchPaths.begin(), "scenetest");
|
||||
searchPaths.insert(searchPaths.begin(), "scenetest/LoadSceneEdtiorFileTest");
|
||||
}
|
||||
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY
|
||||
|
|
|
@ -16,7 +16,7 @@ function SceneEditorTestLayer.extend(target)
|
|||
end
|
||||
|
||||
function SceneEditorTestLayer:createGameScene()
|
||||
local node = ccs.SceneReader:getInstance():createNodeWithSceneFile("scenetest/FishJoy2.json")
|
||||
local node = ccs.SceneReader:getInstance():createNodeWithSceneFile("scenetest/LoadSceneEdtiorFileTest/FishJoy2.json")
|
||||
if nil == node then
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue