mirror of https://github.com/axmolengine/axmol.git
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into develop
This commit is contained in:
commit
015e7c905f
45
CHANGELOG
45
CHANGELOG
|
@ -1,4 +1,4 @@
|
|||
cocos2d-x-3.0beta2 ?.? ?
|
||||
cocos2d-x-3.0beta2 Jan.24 2014
|
||||
[All]
|
||||
[NEW] Full screen support for desktop platforms.
|
||||
[NEW] Adds performance test for EventDispatcher.
|
||||
|
@ -10,13 +10,7 @@ cocos2d-x-3.0beta2 ?.? ?
|
|||
[NEW] Label: Integrates LabelAtlas into new Label.
|
||||
[NEW] Node: Added `setGlobalZOrder()`. Useful to change the Node's render order. Node::setZOrder() -> Node::setLocalZOrder()
|
||||
[NEW] Renderer: Added BatchCommand. This command is not "batchable" with other commands, but improves performance in about 10%
|
||||
[NEW] LuaBindings: Bindings-generator supports to bind namespace for lua.
|
||||
|
||||
[FIX] Lua: sp.SkeletonAnimation:registerScriptHandler should not override cc.Node:registerScriptHandler.
|
||||
[FIX] JSB: Pure JS class which is inherited from cc.Class will trigger an irrelevant log.
|
||||
[FIX] JSB: Mac and iOS Simulator should also use SpiderMonkey which was built in RELEASE mode.
|
||||
[FIX] JSB: Crash when running JSB projects on iOS device in DEBUG mode.
|
||||
[FIX] JSB: Crash when Firefox connects to JSB application on Mac platform.
|
||||
[FIX] Uses EventDispatcher to access event in LUA testcase.
|
||||
[FIX] Exposes SAXParser class to JS, it is used for parsing XML in JS.
|
||||
[FIX] Uses unified `desktop/CCEGLView.h/cpp` for desktop platforms (windows, mac, linux).
|
||||
|
@ -30,7 +24,9 @@ cocos2d-x-3.0beta2 ?.? ?
|
|||
[FIX] Label: Memory leak in FontFreeType::createFontAtlas().
|
||||
[FIX] Label: Crash when using unknown characters.
|
||||
[FIX] Label: Missing line breaks and wrong alignment.
|
||||
[FIX] Label: Color and opacity settings aren't applied when invoking Label::alignText.
|
||||
[FIX] Label: Corrupt looking characters and incorrect spacing between characters
|
||||
[FIX] Label: Label:color and opacity settings are invalid afeter these these properties changed: 1)text content changed 2)align style changed 3)max line width limited
|
||||
[FIX] Label: Crash when using unknown characters
|
||||
[FIX] Console: log(format, va_args) is private to prevent possible resolution errors
|
||||
[FIX] Configuration: dumpInfo() -> getInfo()
|
||||
[FIX] ControlSlider doesn't support to set selected thumb sprite.
|
||||
|
@ -42,12 +38,41 @@ cocos2d-x-3.0beta2 ?.? ?
|
|||
[FIX] Renderer Performance Fix: When note using VAO, call glBufferData() instead of glBufferSubData().
|
||||
[FIX] Renderer Performance Fix: Doesn't sort z=0 elements. It also uses sort() instead of stable_sort() for z!=0.
|
||||
[FIX] Sprite: removed _hasChildren optimization. It uses !_children.empty() now which is super fast as well
|
||||
[FIX] Tests: TestCpp works with CMake on Windows.
|
||||
[FIX] Tests: Sprites Performance Test has 4 new tests
|
||||
[FIX] TextureCache: getTextureForKey and removeTextureForKey work as expected
|
||||
[FIX] TextureCache: dumpCachedTextureInfo() -> getCachedTextureInfo()
|
||||
[FIX] Websocket doesn't support send/receive data which larger than 4096 bytes.
|
||||
[FIX] Windows: There will be some compilation errors when using x64 target on Windows.
|
||||
[FIX] Object: Remove _retainCount
|
||||
[FIX] ParallaxNode: Coordinate of Sprite may be wrong after being added into ParallaxNode
|
||||
[FIX] Crash if there is not `textureFileName`section in particle plist file
|
||||
[FIX] Websocket cannot send/receive more than 4096 bytes data
|
||||
[FIX] TextureCache::addImageAsync can't load first image
|
||||
[FIX] ControlSlider: Can not set "selected thumb sprite"
|
||||
[FIX] ControlSlider: Can not set "scale ratio"
|
||||
[FIX] Crash when loading tga format image
|
||||
[FIX] Keyboard pressed events are being repeatedly fired before keyboard is released
|
||||
[Android]
|
||||
[FIX] Background music can't be resumed when back from foreground
|
||||
[lua binding]
|
||||
[NEW] Can bind classes that have the same class names but different namesapces
|
||||
[FIX] Use EventDispatcher to update some test cases
|
||||
[FIX] sp.SkeletonAnimation:registerScriptHandler should not override cc.Node:registerScriptHandler
|
||||
[javascript binding]
|
||||
[NEW] Bind SAXParser
|
||||
[FIX] Pure JS class that wants to inherite from cc.Class will trigger an irrelevant log
|
||||
[FIX] Mac and iOS Simulator should also use SpiderMonkey which was built in RELEASE mode
|
||||
[FIX] Crash when running JSB projects on iOS device in DEBUG mode
|
||||
[FIX] Crash when Firefox connects to JSB application on Mac platform.
|
||||
[Desktop]
|
||||
[NEW] Support fullscreen
|
||||
[Linux]
|
||||
[FIX] "Testing empty labels" in LabelTest crashes.
|
||||
[Mac]
|
||||
[FIX] Removes unused files after using glfw3 to create opengl context
|
||||
[Win32]
|
||||
[FIX] Compiling error when using x64 target
|
||||
[FIX] Tests: TestCpp works with CMake
|
||||
[FIX] Bindings-generator supports Windows again and remove dependency of LLVM since it only needs binary of libclang
|
||||
|
||||
cocos2d-x-3.0beta Jan.7 2014
|
||||
[All]
|
||||
|
|
|
@ -85,6 +85,7 @@ void Font::setCurrentGlyphCollection(GlyphCollection glyphs, const char *customG
|
|||
|
||||
break;
|
||||
}
|
||||
_usedGlyphs = glyphs;
|
||||
}
|
||||
|
||||
const char * Font::getCurrentGlyphCollection() const
|
||||
|
|
|
@ -450,23 +450,21 @@ static BitmapDC& sharedBitmapDC()
|
|||
}
|
||||
|
||||
bool Image::initWithString(
|
||||
const char * pText,
|
||||
int nWidth/* = 0*/,
|
||||
int nHeight/* = 0*/,
|
||||
TextAlign eAlignMask/* = kAlignCenter*/,
|
||||
const char * pFontName/* = nil*/,
|
||||
int nSize/* = 0*/)
|
||||
const char * text,
|
||||
int width/* = 0*/,
|
||||
int height/* = 0*/,
|
||||
TextAlign alignMask/* = kAlignCenter*/,
|
||||
const char * fontName/* = nil*/,
|
||||
int size/* = 0*/)
|
||||
{
|
||||
bool bRet = false;
|
||||
bool ret = false;
|
||||
do
|
||||
{
|
||||
CC_BREAK_IF(! pText);
|
||||
CC_BREAK_IF(!text || 0 == strlen(text));
|
||||
|
||||
BitmapDC &dc = sharedBitmapDC();
|
||||
|
||||
//const char* pFullFontName = FileUtils::getInstance()->fullPathFromRelativePath(pFontName);
|
||||
|
||||
CC_BREAK_IF(! dc.getBitmap(pText, nWidth, nHeight, eAlignMask, pFontName, nSize));
|
||||
CC_BREAK_IF(! dc.getBitmap(text, width, height, alignMask, fontName, size));
|
||||
|
||||
// assign the dc._data to _data in order to save time
|
||||
_data = dc._data;
|
||||
|
@ -478,13 +476,13 @@ bool Image::initWithString(
|
|||
_preMulti = true;
|
||||
_dataLen = _width * _height * 4;
|
||||
|
||||
bRet = true;
|
||||
ret = true;
|
||||
|
||||
dc.reset();
|
||||
}while (0);
|
||||
|
||||
//do nothing
|
||||
return bRet;
|
||||
return ret;
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 68e023e91b697c461fe986099189bc594ecab6c2
|
||||
Subproject commit 67ef9b611f26a3da00d907b0a36903a929730baa
|
|
@ -16,6 +16,89 @@ local function range(from, to, step)
|
|||
end, nil, from - step
|
||||
end
|
||||
|
||||
-- bit operation
|
||||
|
||||
bit = bit or {}
|
||||
bit.data32 = {}
|
||||
for i=1,32 do
|
||||
bit.data32[i]=2^(32-i)
|
||||
end
|
||||
|
||||
function bit._b2d(arg)
|
||||
local nr=0
|
||||
for i=1,32 do
|
||||
if arg[i] ==1 then
|
||||
nr=nr+bit.data32[i]
|
||||
end
|
||||
end
|
||||
return nr
|
||||
end
|
||||
|
||||
function bit._d2b(arg)
|
||||
arg = arg >= 0 and arg or (0xFFFFFFFF + arg + 1)
|
||||
local tr={}
|
||||
for i=1,32 do
|
||||
if arg >= bit.data32[i] then
|
||||
tr[i]=1
|
||||
arg=arg-bit.data32[i]
|
||||
else
|
||||
tr[i]=0
|
||||
end
|
||||
end
|
||||
return tr
|
||||
end
|
||||
|
||||
function bit._and(a,b)
|
||||
local op1=bit._d2b(a)
|
||||
local op2=bit._d2b(b)
|
||||
local r={}
|
||||
|
||||
for i=1,32 do
|
||||
if op1[i]==1 and op2[i]==1 then
|
||||
r[i]=1
|
||||
else
|
||||
r[i]=0
|
||||
end
|
||||
end
|
||||
return bit._b2d(r)
|
||||
|
||||
end
|
||||
|
||||
function bit._rshift(a,n)
|
||||
local op1=bit._d2b(a)
|
||||
n = n <= 32 and n or 32
|
||||
n = n >= 0 and n or 0
|
||||
|
||||
for i=32, n+1, -1 do
|
||||
op1[i] = op1[i-n]
|
||||
end
|
||||
for i=1, n do
|
||||
op1[i] = 0
|
||||
end
|
||||
|
||||
return bit._b2d(op1)
|
||||
end
|
||||
|
||||
function bit._not(a)
|
||||
local op1=bit._d2b(a)
|
||||
local r={}
|
||||
|
||||
for i=1,32 do
|
||||
if op1[i]==1 then
|
||||
r[i]=0
|
||||
else
|
||||
r[i]=1
|
||||
end
|
||||
end
|
||||
return bit._b2d(r)
|
||||
end
|
||||
|
||||
bit.band = bit.band or bit._and
|
||||
bit.rshift = bit.rshift or bit._rshift
|
||||
bit.bnot = bit.bnot or bit._not
|
||||
|
||||
-- bit operation end
|
||||
|
||||
local function initWithLayer(layer, callback)
|
||||
curLayer = layer
|
||||
layer.spriteTexture = cc.SpriteBatchNode:create("Images/grossini_dance_atlas.png", 100):getTexture()
|
||||
|
|
Loading…
Reference in New Issue