This commit is contained in:
flamefox 2015-02-03 13:51:26 +08:00
commit cc14ee3121
9 changed files with 25 additions and 18 deletions

View File

@ -1,4 +1,4 @@
cocos2d-x-3.4 xxx cocos2d-x-3.4 Jan.30 2015
[FIX] Animate3D: `setSpeed` has not effect if `Animate3D` is used in Sequence [FIX] Animate3D: `setSpeed` has not effect if `Animate3D` is used in Sequence
[FIX] C++: will crash if built with armeabi-v7a enabled on Android devices that with armeabi-v7a architecture but doesn't support NEON instructions [FIX] C++: will crash if built with armeabi-v7a enabled on Android devices that with armeabi-v7a architecture but doesn't support NEON instructions
[FIX] C++: may crash if VAO is not supported [FIX] C++: may crash if VAO is not supported

View File

@ -170,6 +170,10 @@ static int processTask(HttpRequest *request, NSString* requestType, void *stream
//if request type is post or put,set header and data //if request type is post or put,set header and data
if([requestType isEqual: @"POST"] || [requestType isEqual: @"PUT"]) if([requestType isEqual: @"POST"] || [requestType isEqual: @"PUT"])
{ {
if ([requestType isEqual: @"PUT"])
{
[nsrequest setValue: @"application/x-www-form-urlencoded" forHTTPHeaderField: @"Content-Type"];
}
/* get custom header data (if set) */ /* get custom header data (if set) */
std::vector<std::string> headers=request->getHeaders(); std::vector<std::string> headers=request->getHeaders();
if(!headers.empty()) if(!headers.empty())
@ -190,8 +194,7 @@ static int processTask(HttpRequest *request, NSString* requestType, void *stream
char* requestDataBuffer = request->getRequestData(); char* requestDataBuffer = request->getRequestData();
if (nullptr != requestDataBuffer && 0 != strlen(requestDataBuffer)) if (nullptr != requestDataBuffer && 0 != strlen(requestDataBuffer))
{ {
NSString* requestData = [NSString stringWithUTF8String:requestDataBuffer]; NSData *postData = [NSData dataWithBytes:requestDataBuffer length:request->getRequestDataSize()];
NSData *postData = [requestData dataUsingEncoding:NSUTF8StringEncoding];
[nsrequest setHTTPBody:postData]; [nsrequest setHTTPBody:postData];
} }
} }

View File

@ -49,13 +49,12 @@ bool GroupCommandManager::init()
int GroupCommandManager::getGroupID() int GroupCommandManager::getGroupID()
{ {
//Reuse old id //Reuse old id
for(auto it = _groupMapping.begin(); it != _groupMapping.end(); ++it) if (!_unusedIDs.empty())
{ {
if(!it->second) int groupID = *_unusedIDs.rbegin();
{ _unusedIDs.pop_back();
_groupMapping[it->first] = true; _groupMapping[groupID] = true;
return it->first; return groupID;
}
} }
//Create new ID //Create new ID
@ -69,6 +68,7 @@ int GroupCommandManager::getGroupID()
void GroupCommandManager::releaseGroupID(int groupID) void GroupCommandManager::releaseGroupID(int groupID)
{ {
_groupMapping[groupID] = false; _groupMapping[groupID] = false;
_unusedIDs.push_back(groupID);
} }
GroupCommand::GroupCommand() GroupCommand::GroupCommand()

View File

@ -26,6 +26,7 @@
#ifndef _CC_GROUPCOMMAND_H_ #ifndef _CC_GROUPCOMMAND_H_
#define _CC_GROUPCOMMAND_H_ #define _CC_GROUPCOMMAND_H_
#include <vector>
#include <unordered_map> #include <unordered_map>
#include "base/CCRef.h" #include "base/CCRef.h"
@ -45,6 +46,7 @@ protected:
~GroupCommandManager(); ~GroupCommandManager();
bool init(); bool init();
std::unordered_map<int, bool> _groupMapping; std::unordered_map<int, bool> _groupMapping;
std::vector<int> _unusedIDs;
}; };
class CC_DLL GroupCommand : public RenderCommand class CC_DLL GroupCommand : public RenderCommand

View File

@ -13,6 +13,8 @@
- [Windows](#windows) - [Windows](#windows)
- [Linux](#linux) - [Linux](#linux)
- [How to start a new game](#how-to-start-a-new-game) - [How to start a new game](#how-to-start-a-new-game)
- [v3.4](#v34)
- [Bugs fixed in v3.4](#bugs-fixed-in-v34)
- [v3.4rc1](#v34rc1) - [v3.4rc1](#v34rc1)
- [Highlights of v3.4rc1](#highlights-of-v34rc1) - [Highlights of v3.4rc1](#highlights-of-v34rc1)
- [Features in detail](#features-in-detail) - [Features in detail](#features-in-detail)
@ -39,7 +41,7 @@
# Misc Information # Misc Information
* Full Changelog: https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.4rc0/CHANGELOG * [Full Changelog](https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.4/CHANGELOG)
* v3.0 Release Notes can be found here: [v3.0 Release Notes](https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.0/docs/RELEASE_NOTES.md) * v3.0 Release Notes can be found here: [v3.0 Release Notes](https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.0/docs/RELEASE_NOTES.md)
# Requirements # Requirements
@ -124,6 +126,13 @@ Run
## How to start a new game ## How to start a new game
Please refer to this document: [ReadMe](../README.md) Please refer to this document: [ReadMe](../README.md)
# v3.4
##Bugs fixed in v3.4
* C++: crash on armeabi-v7a arch device which do not support NEON instructions
* GLProgram: crash on low end device with no more than 8 attributes support
* New audio: game freeze if audio played two many times on android
* Node: anchor point has no effects on rotation
* More bugs fixed
# v3.4rc1 # v3.4rc1

View File

@ -264,9 +264,6 @@ const std::string& AssetsManagerEx::getStoragePath() const
void AssetsManagerEx::setStoragePath(const std::string& storagePath) void AssetsManagerEx::setStoragePath(const std::string& storagePath)
{ {
if (_storagePath.size() > 0)
_fileUtils->removeDirectory(_storagePath);
_storagePath = storagePath; _storagePath = storagePath;
adjustPath(_storagePath); adjustPath(_storagePath);
_fileUtils->createDirectory(_storagePath); _fileUtils->createDirectory(_storagePath);

View File

@ -357,8 +357,6 @@ end
local function BugTest1159() local function BugTest1159()
local pLayer = cc.Layer:create() local pLayer = cc.Layer:create()
cc.Director:getInstance():setDepthTest(true)
local background = cc.LayerColor:create(cc.c4b(255, 0, 255, 255)) local background = cc.LayerColor:create(cc.c4b(255, 0, 255, 255))
pLayer:addChild(background) pLayer:addChild(background)
@ -398,7 +396,6 @@ local function BugTest1159()
scheduler:unscheduleScriptEntry(schedulerEntry) scheduler:unscheduleScriptEntry(schedulerEntry)
end end
]]-- ]]--
cc.Director:getInstance():setDepthTest(false)
end end
end end

View File

@ -145,7 +145,6 @@ end
function ParallaxTestMain() function ParallaxTestMain()
cclog("ParallaxMain") cclog("ParallaxMain")
Helper.index = 1 Helper.index = 1
cc.Director:getInstance():setDepthTest(true)
local scene = cc.Scene:create() local scene = cc.Scene:create()
Helper.createFunctionTable = { Helper.createFunctionTable = {

@ -1 +1 @@
Subproject commit 53130d33970b5d9b15a8f0e4c2632e352a6ade9f Subproject commit cd05722966edde6116a6096b810a7a5598fe7c0a