Commit Graph

12636 Commits

Author SHA1 Message Date
David DeSimone 9204c87cfc Adding performance.now() to cocos2d-js. (#16766)
* Adding performance.now() to cocos2d-js. See https://developer.mozilla.org/en-US/docs/Web/API/Performance/now

* Fixing improper logic for converting from microseconds, to milliseconds with micro-precision

* Adding performance.now tests
2016-11-04 11:58:48 +08:00
minggo fa02f24f0d add fbs files needed to update flatbuffer (#16808) 2016-11-04 10:13:06 +08:00
n2omatt 6be4ec8ee5 Add new methods to get the number of actions running in a given node with a specific tag. (#16789)
* Add new methods to get the number of actions running in a
given node with a specific tag.

This is useful for cases that we want to know how many
animations with a **specific** tag is running in our target.
For example:

auto tag1Count = this->getNumberOfRunningActionsByTag(kMyTag1);
auto tag2Count = this->getNumberOfRunningActionsByTag(kMyTag2);

While this could be achieved (more or less) with callbacks
to increment the tagCount at start of action and decrement
at the end the proposed API is much more concise and less error
prone.

* Replace the old C casts to static_casts.

As discussed in #16789 issue thread @minggo asked
to change the old style of cast to newer, more safer
static_casts.

* Add the required parenthesis and normalize the spaces.

Normalize all the static_cast<Action *> to static_cast<Action*>
some places we have spaces, other places haven't.

Fix the missing parenthesis.
2016-11-04 09:41:03 +08:00
Josh Bodily e20c1e0a9a Misc. UIEditBoxImpl-winrt fixes (#16773)
* SENSITIVE doesn't imply password, fixes crash on static cast in
* onTextChanged
* Fix type fontName instead of pFontName
* Set attributes that affect text content before setting initial text
2016-11-04 09:38:48 +08:00
James Chen 7e14812240 fixed #16492: RapidJSON Crashes in Release mode on Android. (#16792)
* fixed #16492: RapidJSON Crashes in Release mode on Android.

* Updates external/config.json

* json/filestream.h -> json/filereadstream.h
2016-11-04 09:36:59 +08:00
James Chen f32effeb96 More: Uses c++11 multi-line string literal (#16803) 2016-11-04 09:36:26 +08:00
CocosRobot 9eb177c6cc [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#16802) 2016-11-03 15:29:09 +08:00
Josh Bodily 9f31a1e43c Add reason for edit end to UIEditBoxDelegate (#16771)
* Add reason for edit end to UIEditBoxDelegate

* Adds "NEXT" action button for iOS and Android for easier form
* navigation

* Fix compile error
2016-11-03 14:02:53 +08:00
Guy 925b4fa96f Update CCObjLoader.cpp (#16790)
In the case of a simple MTL file such as 

newmtl cube
  Ns 10.0000
  Ni 1.5000
  d 1.0000
  Tr 0.0000
  Tf 1.0000 1.0000 1.0000 
  illum 2
  Ka 0.0000 0.0000 0.0000
  Kd 0.5880 0.5880 0.5880
  Ks 0.0000 0.0000 0.0000
  Ke 0.0000 0.0000 0.0000
  map_Ka cube.png
  map_Kd cube.png

The entire istringstream would be consumed by LoadMTL and result in a 'not found' error due to the null check being in the wrong place
2016-11-02 10:22:48 -07:00
ggggamer 54d6321ff3 Support float line width (#16781)
glLineWidth use float but CCDrawNode use int
2016-11-02 17:48:26 +08:00
Bin Zhang 3b87e46280 Support compile & run project on Tizen by cocos command. (#16783)
* Add config files for build engine source code on tizen.

* Add config files for cpp-empty-test on tizen.

* Add missing files.

* Add config files for cpp-tests on tizen.

* Add Tizen config files for lua-bindings.

* Add Tizen config files for lua-empty-test.

* Solve the error when build lua-empty-test for Tizen.

* Add Tizen config files for lua-tests.

* Solve the error when build lua-tests for Tizen.

* Add tizen config files for templates.

* Update submodule cocos2d-console.
2016-11-02 17:41:26 +08:00
James Chen e183160efe fixed #16787: Removes unused code of 'if (sizeof(Vec2) == sizeof(Vec2)'. (#16791) 2016-11-02 17:27:49 +08:00
Wilson E. Alvarez d5dacd4f0e Use C++11 multiline string literal instead (#16765)
* Undo pull request #16742 while keeping fixed indentation on ccShader_UI_Gray.frag

* Removed unnecessary whitespace

* Switched implementation to C++11 string literal

Thanks to stevetranby for the suggestion
2016-11-02 14:13:34 +08:00
Paul Gardiner a888f42d7f Lua: have cc.Ray:intersects additionally return the distance (#16677)
cc.Ray:intersects now returns two results, an indication of hit or
not, plus the distance along the ray. The function can still be called
expecting a single argument and hence is backward compatible.

Also correct the debug error message
2016-11-02 09:45:24 +08:00
Josh Bodily 40b5c9f4b7 Mac edit box bug fixes (#16656)
* Don't allow multiline to overflow bounds of box
* Fix bug w/ performSelector
2016-10-31 15:16:18 +08:00
子龙山人 1a258f7ed4 Merge pull request #16776 from CocosRobot/update_lua_bindings_1477789224
[ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically
2016-10-31 00:01:08 -07:00
pyrosphere 1667a5c444 Toggle between windowed/fullscreen on desktop (#16762)
* GLViewImpl methods for desktop window management - toggle between fullscreen/windowed

* Window management tests (mac)

* Added window management tests to Win32 and Linux

* Added const keyword. Removed platform macros.
2016-10-31 14:02:02 +08:00
chgowolf ef380298bb fix issue#16756 tileGid may overflow when use horizontal flip (#16758)
* tileGid may overflow when use horizontal flip

kTMXTileHorizontalFlag = 0x80000000
when use horizontal flip, gid will bigger chan 0x7FFFFFFF

* use unsigned int to convert string to gid
2016-10-31 10:42:09 +08:00
James Chen cc1b7808f0 fixed #16735: [native] The behavior of (setRotation + setSkewX) is wrong (#16736)
* fixed #16735: [native] The behavior of (setRotation + setSkewX) is wrong.
Since I removed some logic, this patch may also improve a little bit performance.

* Adds test case for issue #16735
2016-10-31 10:29:04 +08:00
CocosRobot#Set 57903077d0 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically 2016-10-30 01:00:27 +00:00
Ricardo Quesada e0809d869c Sprite::capInsets -> Sprite::centerRect (#16770)
* Sprite::capInsets -> Sprite::centerRect

as requested by @minggo

* fixes flip issues in Sprite with slice 9
2016-10-29 17:52:33 -07:00
CocosRobot 3ab1be61a7 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#16764) 2016-10-28 10:13:57 +08:00
James Chen 609750ef58 fixed #16754: [android] Background music which is playing could not be paused while game enters background. (#16755)
* fixed #16754: [android] Background music which is playing could not be paused while game enters background.

* Updates a comment of cocos/audio/android/AudioEngine-inl.h
2016-10-28 10:12:52 +08:00
SongChengJiang af8b9cc47c Support MultiView matrix array (#16723)
* Support MultiView matrix array

Support MultiView matrix array and add new interface in GLProgram to
support shader header definitions.

* support getMatrixStackSize

* optimize code

* remove indents

* rename resetMatrixStack(unsigned int stackCount)

* Add document to interfaces

* Supplement document of render interface
2016-10-28 09:33:31 +08:00
pandamicro e4170a7b02 Improve JS bindings (#16751)
* Fix tests for v3.12 web

* Improve scheduler wrapper

* Update web engine ref

* Fix leak: js_remove_object_reference can not remove non binding objects

* Fix ScriptingCore::evalString

* Add missed `__cppCreated` for JS create objects

* Fix manifest path issue
2016-10-28 09:29:56 +08:00
zloopnew ed2dac1ba4 Mesh* Sprite3D::getMesh() should return nullptr when _meshes.empty() is true (#16711) 2016-10-27 15:20:41 +08:00
Wilson E. Alvarez c0e1e91373 Performance tweak: Use range-based for-loops and allocate std::vector size() and *end() on the stack where favorable. (#16716)
* Use range-based for-loops and allocate std::vector size(), end(), cend(), rend(), crend() on the stack where favorable.

Other minor trivial changes were applied.

* Fixed Android compilation error

* Fixed windows-universal compilation error
2016-10-27 15:10:24 +08:00
CocosRobot 44f6865697 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#16750) 2016-10-27 11:15:24 +08:00
niu2x 92af2b2b6f bug fix (#16747) 2016-10-27 09:46:07 +08:00
Ricardo Quesada 323ea7c0d4 Sprite scale9 (#16702)
* Adds slice9 support for Sprite.

how to use it:

// points coords
sprite->setCenterRect(Rect(x,y,w,h));

// normalized coords
sprite->setCenterRectNormalized(Rect(x,y,w,h));
starts scale9sprite in sprite

more slice 9 changes

sprite 9 slice works?

kind of works

correct anchor point

slice 9 works, at least with non-rotated atlases

streched works ok

better Y invert code.

cleaner, compatible with the previous code

yay, scaling workings...

need a better api now

sets scale correctly

yay! works as expected!

more fixes and tests

better test for box

setContentSize() changes size in non-9-slice mode sprites as well

setCenterRect() -> setCenterRectNormalized()

yet another test

adds setPositionNormalized()

adds setCenterRect() tests

remove devel team from xcode

tests: add one more tests

fun test!

improved test

yet another test for slice 9

* fixes anchorPoint issues

* adds documentation

* fix: using top-left coordinate for setRect

* sprite: fixes related to scale9 and tiled

* Sprite: slice 9 fixes

works Ok with rotated frames
uses `setCapInsets` instead of `setCenterRect` to be more familiar
with `UIScale9Sprite`

* fixes js and lua bindings for Autopolygon
2016-10-26 18:45:40 -07:00
James Chen 58acca108b Removes unused 'return' letter in builtin shaders. (#16742)
* Removes unused 'return' letter in builtin shader.

* Updates indention of ccShader_UI_Gray.frag.
2016-10-26 16:03:08 +08:00
James Chen 0a31c7de3a fixed #16737: NodeTest (stress test #2: no leaks) is broken. (#16741)
'clone' method must invoke the inner object's clone method rather than its raw pointer.
2016-10-26 15:54:01 +08:00
mogemimi 5b8919829c Fix typos in local variables (#16712) 2016-10-20 18:17:37 +08:00
James Chen a5fdc07fca Fixes label wrong blending and improves performance while enabling outline. (#16717) 2016-10-19 10:19:14 +08:00
Ricardo Quesada 90db0eb6bf Android pixel fixes (#16694)
* android pixel fixes

- pragma pack for NavMesh! (how this was working)
- no no-const global variables in shaders

* spine: js bindings work again
2016-10-17 15:44:41 +08:00
noprops 92da63db3d update visibleTiles rect (#16331) 2016-10-17 14:27:38 +08:00
James Chen b7d6e427e0 issue #16661: Replace c style uthash with std::unordered_map<K, V> in CCFontFNT.cpp (#16662)
* issue #16661: Replace c style uthash with std::unordered_map<K, V> in CCFontFNT.cpp

* issue #16661: Removes unused include "base/uthash.h" in CCGLProgram.cpp.
2016-10-17 13:53:54 +08:00
Paul Gardiner 6b27f014fc Correct the Skybox fov (#16655)
* Remove undrawn quads from the skybox mesh

CCSkybox had been implemented using a combination of two
inconsistent techniques. The rendering was being achieved via use of
the vertex shader's inherent support for cubemaps. That technique requires
only a single screen-covering quad, but the implemtation defined a cube.
Defining a cube mesh would be appropriate if one were simply mapping the
cubemap's 6 textures to faces, but is unnecessary if using the shader's
cubemap feature.

Not only was the use of a cube mesh unnecessary, but the particular way
the cube was defined and used meant that only one face would ever
contribute to the rendering. One of the other faces would always be culled
and the other four would be viewed edge on, mapping the the infinitesimally
thin lines defining the edges of the screen.

This commit simply removes the never-rendered faces, and adds comments
explaining the technique.

* Within test code, remove setScale calls applied to skyboxes.

A Skybox is defined in such a way that it's position, rotation and
scaling has no effect on it's rendering, so setScale has no effect.
The calls are removed from test code to avoid confusing anyone using
it as a template for their own programs.

* Make the Skybox correctly account for the camera's fov

The Skybox does not use the model/view and projection matricies. Instead
a single quad that maps exactly to the screen is rendered and the camera's
world matrix is passed into a shader that renders using cubemap lookups.
The way that works hardwires the fov to 90deg in both the horizontal and
vertical. That shows up particularly badly when the camera is pointed
directly downwards and rotated: the image deforms as it rotates.

This commit corrects the problem by using scaling factors from the
camera's projection matrix to prescale the matrix passed into the shader.
2016-10-17 13:46:26 +08:00
Paul Gardiner 875cf45d1d Lua: add cc.vec3 functions - add, sub, mul and dot (#16706)
Also update the lua test to use these functions.
2016-10-17 10:39:40 +08:00
mogemimi fe52c5fa0a Fix typos in comments and strings (#16708) 2016-10-17 10:12:54 +08:00
minggo 06b4a18f6f Merge pull request #16703 from dumganhar/pr/16689-font-pos
Adds test case for PR #16689 (fix font rendering position)
2016-10-17 10:09:50 +08:00
James Chen 627eba6aac fixed #16652: FontFreeType crashes in its destructor. (#16684) 2016-10-14 17:49:36 +08:00
Dale Stammen 58414f85a1 disable /Zw on .c file (#16697) 2016-10-14 17:49:03 +08:00
mogemimi 1ed151be82 Fix indentation (#16699) 2016-10-14 17:48:23 +08:00
mogemimi dde86b404a Remove unused local variable (#16698) 2016-10-14 17:48:00 +08:00
Sergey fd902e52cf adjustForDistanceMap need to be negative to 2016-10-14 11:45:29 +03:00
Sergey f05053329b fix font rendering position 2016-10-12 16:21:09 +03:00
QingliWang 7c1f88423b Fix bug when app paused the music is still resumed to play after interruption completed. (#16679)
* Support audio interruption and resume callback when change earphone status.

* Refactor keyevent callback and add makecurrent for compatible with different binary.

* Enable Tizen indicator.

* Remove the unnecessary evasobject in the window and refactor the function for glview mode.

* Fix the compatible issue between Tizen 2.3 and 2.4.

* Fix the wrong directory of script resources for HellLua template project.

* Create performance-test project for Tizen platform.
2016-10-12 15:48:27 +08:00
CocosRobot 23ff5fc51f [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#16676) 2016-10-11 11:40:11 -07:00
Wilson E. Alvarez cdee1e11de Performance tweak: use range-based for-loops instead of iterator-based for-loops. (#16642)
* Use ++ prefix instead for non-primitive data types in CCAutoPolygon.cpp

* Use ++ prefix instead for non-primitive data types in SimpleAudioEngine.cpp

* Use ++ prefix instead for non-primitive data types in CCNodeLoaderLibrary.cpp

* Use ++ prefix instead for non-primitive data types in CCActionManagerEx.cpp

* Use ++ prefix instead for non-primitive data types in CCDataReaderHelper.cpp

* Use ++ prefix instead for non-primitive data types in HttpClient-android.cpp

* Use ++ prefix instead for non-primitive data types in CCDevice-linux.cpp

* Use ++ prefix instead for non-primitive data types in ScriptingCore.cpp

* Switched implementation to range-based for loops

* Added readability, fixed loop in CCDataReaderHelper.cpp

Thanks to Dimon4eg for the code review.
2016-10-11 10:59:44 -07:00
Ricardo Quesada e4be87a059 Adds Spine binary-file format support (#16629)
* Adds Spine binary-file format support

fixes issue #10438

* ignore SkeletonBinary.c from linter

* add another file to the exclude list

* lua manual fixes for spine

* SkeletonBinary.c and not .cpp

* missing files for win8.1

* don't compile it as crt

* new updates from spine
2016-10-11 10:56:14 -07:00
CocosRobot#Set f280ed2cdb [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically 2016-10-11 01:51:00 +00:00
mogemimi ccc141fc99 Remove unnecessary const return qualifiers (#16671) 2016-10-11 09:33:05 +08:00
9b9387 0c8376411e Update GuiConstants.lua (#16666)
- fixed PageView constant
2016-10-10 13:56:42 +08:00
子龙山人 eeab15b2c9 Merge pull request #16659 from zilongshanren/fix-mac-font-name
fix mac system font creation with NSFont
2016-10-09 19:06:55 -07:00
zilongshanren 5b109854c3 fix mac system font creation with NSFont 2016-10-08 14:34:55 +08:00
Paul Gardiner 1c0602e130 Remove unnecessary arguments from some lua cc.mat4 methods (#16658)
* Lua: remove unused 3rd argument from cc.mat4.transformVector

cc.mat4.transformVector takes a mat4 and a 4vector and returns the result
of applying the mat4 to the vector. Strangely it had been made to also
require a third argument called dst which it doesn't use but did check
was a vec4. This commit allows cc.mat4.transformVector to be called
without the unnecessary argument. We still permit calling with it for
backward compatibility.

Also changed is the wrapper in Cocos2d.lua so that a second form of
cc.mat4.transformVector can be used where the vector is supplied as
4 separate numbers.

Changed the test files to call without the unnecessary argument.

* Lua: remove unused argument from cc.mat4.createTranslation/Rotation

Both these functions have an extra unnecessary argument called dst,
although neither use it either to pass in or out a value. This
commit removes the extra argument and updates the test programs
correspondingly.

Also, within Cocos2d.lua, remove some definitions that are later
overwritten by new ones
2016-10-08 14:33:50 +08:00
mogemimi 611b6fafc8 Suppress unused function warning (#16657) 2016-10-08 10:14:58 +08:00
mogemimi 59dea5a487 Removed unnecessary comments (#16649) 2016-10-07 11:47:48 -07:00
Dmitry 771a69709f fix for #16589 (#16636) 2016-10-04 22:26:40 -07:00
mogemimi d68eacd10a Remove unused functions (#16640) 2016-10-04 22:10:52 -07:00
mogemimi 868e6f62c5 Fix typos in doc: accpetable / accepteable -> acceptable (#16641) 2016-10-04 22:08:56 -07:00
minggo 5785c3fcdd use SharedPreferences.apply() instead (#16632) 2016-09-30 14:58:30 +08:00
CocosRobot c046257efc [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#16630) 2016-09-30 09:44:34 +08:00
子龙山人 c3bbbb6cb2 Refactoring ui related code and fix label atlas and BMFont rendering issue with ETC1 texture format (#16615)
* refactoring ui related code

* fix label bmfont/charmap etc drawing

* make code more robust
2016-09-30 09:42:21 +08:00
minggo a6f3773aef Luajit (#16620)
* update console

* load lua according architecture

* install android-13 in travis
2016-09-28 16:19:20 +08:00
James Chen 189ffc4e27 Minor fix for TextureCache::addImage(image, key). (#16613)
* Removes insignificant log: `prevents overloading the autorelease pool`
* Removes unused retain -> autorelease stuff
* Checks the return value of `texture->initWithImage`, if it returns false, texture should be released and set to nullptr.
* More specifc log output in TextureCache::addImage(image, key)
* Checks arguments validation for VolatileTextureMgr::addImage
2016-09-27 15:10:16 +08:00
halx99 2ee439e3f5 Fix issue: 16603 (#16604)
see: https://github.com/cocos2d/cocos2d-x/issues/16603
2016-09-27 13:59:24 +08:00
mogemimi 8b703a8d12 Fix implicit conversion warning (#16598)
* Fix implicit conversion warning

* Change SAXParser::textHandler parameter type from int to size_t
2016-09-26 14:49:47 +08:00
pandamicro 466053b740 Fix JS AssetsManagerTest and Improve scheduler wrapper (#16605)
* Fix tests for v3.12 web

* Improve scheduler wrapper

* Update web engine ref
2016-09-26 14:44:32 +08:00
Wilson E. Alvarez 59574f95e0 Fix mismatched memory deallocators (#16596)
* Fix mismatched memory deallocator in CCFastTMXLayer.cpp

* Fix mismatched memory deallocator on SkeletonRenderer.cpp

* Fix mismatched memory deallocator in CCTMXLayer.cpp
2016-09-26 14:18:48 +08:00
Steve Tranby b22efc9115 Features: add events for window resize, focus, and unfocus (#16578)
* add events for window resize, focus, and unfocus

* fix typo
2016-09-20 20:32:33 -07:00
TankorSmash f93c6edb1f tidy up TextureAtlas::resizeCapacity (#16588)
My intent is to reduce clutter and improve readability, so that going forward it's a little easier to edit this.

No behaviour change.
2016-09-20 20:31:24 -07:00
mogemimi e8c3082229 Move skipBOM function outside to prevent shadowing warning (#16585) 2016-09-20 14:52:15 +08:00
colajam93 1d3a40f8be Fix warning (#16591) 2016-09-20 14:50:47 +08:00
colajam93 e7f739897c Fix deprecated warning (#16592) 2016-09-20 14:48:00 +08:00
mogemimi 63b3043dc0 Remove extra semicolon after member function definition (#16595) 2016-09-20 14:43:48 +08:00
halx99 a46b30f8a6 use more plain API FileUtils::getStringFromFile (#16586) 2016-09-19 11:49:35 +08:00
minggo 84a102edf8 merge v3.13.1 back to v3 2016-09-15 10:08:28 +08:00
mogemimi 91cdb3394b Suppress warning C4101 on MSVC (#16573) 2016-09-14 10:49:14 -07:00
Steve Tranby 2776d1e715 XCode sometimes gets confused with multiple 'Rect' types (#16579) 2016-09-14 10:46:17 -07:00
mogemimi 63637139dc Fix -Wpessimizing-move warning when using Xcode 8 (#16580) 2016-09-14 10:45:26 -07:00
mogemimi afe8b05da8 Remove semicolons before method bodies (#16566) 2016-09-14 10:44:00 -07:00
Jun Hyeon, Nam 4342aabe28 remove unnecessary comments (#16572) 2016-09-14 10:42:25 -07:00
Ricardo Quesada 5f4fb66f61 fix: staggered hex maps returns correct tile (#16552)
* fix: staggered hex maps returns correct tile

order was fixed in the array that contains the GIDs.

fixes Github issue #16512

* fix: add fix validation code for issue #16512
2016-09-13 21:47:36 -07:00
CocosRobot 7410bdd981 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#16563) 2016-09-12 10:03:21 +08:00
Wilson E. Alvarez 74fd5ae3ba Fix mismatched memory deallocator (#16560) 2016-09-12 10:02:48 +08:00
Steve Tranby 16781b00e8 change EaseBounce to real class instead of typedef (#16557) 2016-09-12 09:51:27 +08:00
minggo 3075108f1c get sdk version from java (#16546) 2016-09-12 09:49:39 +08:00
James Chen b8f127e601 fixed #16547: [ios, mac] Protencial memory leak in AudioPlayer.mm. (#16556)
If playing a large audio and its loop flag is set to false, after the audio is played over, there will be 4 or 8 bytes memory leak by _rotateBufferThread variable.

Resolution:

The `isDestroy` flag should not be set to true in rotate buffer thread, to exiting the thread, we need another varible for this purpose.

Thanks @nicolechen819 for the feedback.
2016-09-12 09:48:27 +08:00
CocosRobot ced81f3527 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#16554) 2016-09-12 09:46:19 +08:00
mogemimi 2b9ac2c950 Remove redundant semicolons (#16558) 2016-09-12 09:45:34 +08:00
mogemimi eca7b2392d Remove unnecessary inline keywords (#16562) 2016-09-12 09:44:21 +08:00
minggo 86de22a008 fix crash if FontAtlas pointer is the same (#16555) 2016-09-09 11:39:00 +08:00
Sachin Garg 84f6863214 getSlidBallRenderer methods to allow more customization of UISlider (#16532)
* getSlidBallRenderer methods to allow more customization of UISlider look and feel.

* Added const to declaration of getSlidBallRenderer methods for UISlider.
2016-09-09 10:01:14 +08:00
Dale Stammen 1c27c12327 updated libcocos2d dll version to 3.13.1 (#16542) 2016-09-08 10:38:16 +08:00
minggo 569681f6bd use api level 13 (#16538) 2016-09-07 14:50:03 +08:00
Ricardo Quesada 282959cc0f fix: uses correct design resolution (#16534)
fixes github issue #16485
2016-09-07 12:01:40 +08:00
Peter Siegmund 9449e687af fixed compile error for android-studio build (with-controller) (#16529) 2016-09-07 12:01:11 +08:00
Ricardo Quesada 2d1048bd00 fix: uses default designResolution if not set previosly (#16533)
fixes github issue #16485
and re fixes github issue #16003
2016-09-07 11:11:52 +08:00
minggo fa15ab8212 3.13.1 text color (#16516)
* fix: Label updateColor() and underline color work as expected (#16486)

fixes Github issue #15214 correctly. underline uses _displayColor
and not _textColorF. _textColorF is only for the text.
This also emulates the SystemFont underline behavior

fixes Github issue #16471

* fix conflict

* Issue 16471 (#16489)

* fix: Label updateColor() and underline color work as expected

fixes Github issue #15214 correctly. underline uses _displayColor
and not _textColorF. _textColorF is only for the text.
This also emulates the SystemFont underline behavior

fixes Github issue #16471

* docs: added more internal doc for issue_16471
2016-09-07 09:44:58 +08:00
minggo c233a5bdf7 [ci skip]V3.13.1 doc (#16528)
* update release note and changelog

* update engine version
2016-09-06 17:01:23 +08:00
minggo c51605971f fixed #16490: [android, audio] AudioEngine::stop() triggers 'finished' callback (#16491) (#16524) 2016-09-06 10:58:43 +08:00
Allen Lee 7c298bdcd7 misspelling check on cocos directory (#16522)
Misspelling fix on some comments,
cocos/editor-support/cocostudio/CSParseBinary_generated.h
fix misspelling postion -> position
2016-09-06 10:14:14 +08:00
James Chen 50a1e75373 fixed #16502: SPINE color bug (temporary storage of color was wrong in SkeletonRenderer) (#16503) 2016-09-06 10:11:54 +08:00
CocosRobot 8d2b645a96 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#16519)
* fixed #16473: OpenSLES error while play background music in writable path or sdcard. (#16475) (#16517)

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically
2016-09-06 10:11:11 +08:00
minggo 9dc737901b fixed #16473: OpenSLES error while play background music in writable path or sdcard. (#16475) (#16521) 2016-09-06 09:41:53 +08:00
minggo a6c398ec95 Fixes jsval_to_std_string could not convert number to string. (#16504) (#16515)
Don't use deprecated method in ActionsProgressTest.
2016-09-05 17:42:34 +08:00
CocosRobot 8947ff722e [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#16514) 2016-09-05 13:48:58 +08:00
CocosRobot 6f4551cdad [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#16513) 2016-09-05 10:19:41 +08:00
Steve Tranby b48bcc9579 Ease Actions Code De-Duplication
* ease action class macros to reduce code duplication

- update bindings for ease actions
- reorder clone method
- add back in create/etc methods to allow for EaseRateAction instances
- fix wrong clone return type

* Add note and minor cleanup

* use create in clone instead of new/init as in latest EaseBezierAction

* fix reverse for EaseIn/Out to match original code

* add assert for null

* refactor to match original code flow

* fix missing CC_DLL for windows builds

* fix win build issues due to abstract methods

* remove unused overrides
2016-09-05 10:18:30 +08:00
mogemimi 857b2143a6 Remove deprecated attribute on Node::_setLocalZOrder() function (#16470) 2016-09-05 10:06:42 +08:00
James Chen 5bfd110424 Fixes jsval_to_std_string could not convert number to string. (#16504)
Don't use deprecated method in ActionsProgressTest.
2016-09-05 10:02:05 +08:00
CocosRobot b6536e8d9f [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#16499) 2016-09-02 10:44:55 +08:00
pyrosphere 0cd365dd2e Fix MenuItemSprite::unselected() on disabled items showing _normalImage instead of _disabledImage (#16482) 2016-09-02 09:51:47 +08:00
Ricardo Quesada c32000250c Issue 16471 (#16489)
* fix: Label updateColor() and underline color work as expected

fixes Github issue #15214 correctly. underline uses _displayColor
and not _textColorF. _textColorF is only for the text.
This also emulates the SystemFont underline behavior

fixes Github issue #16471

* docs: added more internal doc for issue_16471
2016-09-01 16:59:40 +08:00
minggo db21e5f349 [ci skip]Travis enable pull request (#16494)
* refactor travis and build pull request

* delete unneeded file
2016-09-01 16:25:47 +08:00
Renato Almeida 1c40d5e16d Fix MessageBox inverted params on Android (#16484) 2016-09-01 16:10:02 +08:00
James Chen 64c62d37c2 fixed #16490: [android, audio] AudioEngine::stop() triggers 'finished' callback (#16491) 2016-09-01 16:06:29 +08:00
James Chen 6d27868918 fixed #16473: OpenSLES error while play background music in writable path or sdcard. (#16475) 2016-09-01 11:47:33 +08:00
James Chen 01e67f6203 fixed #16477: [android, audio] Deadlock if preload the same file more than 3 times in preload callback. (#16478)
And added test case.
2016-09-01 11:46:27 +08:00
James Chen 35f937cd40 AudioMixerController::initTrack should not setState for track. Otherwise, it may trigger Track state mess-up. (#16476)
* Warning fixes in AudioDecoder.cpp

* AudioPauseResumeAfterPlay test case should start in onEnter.
And add a loop to pause & resume many times.

* AudioMixerController::initTrack should not setState for track. Otherwise, it may trigger Track state mess-up.
2016-09-01 11:43:37 +08:00
Ricardo Quesada e57c30c83b fix: Label updateColor() and underline color work as expected (#16486)
fixes Github issue #15214 correctly. underline uses _displayColor
and not _textColorF. _textColorF is only for the text.
This also emulates the SystemFont underline behavior

fixes Github issue #16471
2016-08-31 20:20:13 -07:00
mogemimi 58ede40ed9 Add missing definition of PhysicsBody::getFirstShape (Revert part of #13923) (#16458) 2016-08-29 19:23:14 -07:00
Rubonnek 91efab2ba7 Fix memory leak caused by packetOut in SocketIO.cpp (#16451) 2016-08-29 19:22:38 -07:00
David DeSimone feb48aea9c Improving CCRef LEAK_DETECTION tools by making them thread safe. It is possible that ref's can be created and mutated off thread, and with leak detection on. This can cause ungaurded writes from two or more threads to a non-protected structure. Fixing a crash on iOS when using std::list instead of std::vector. (#16415) 2016-08-30 09:36:45 +08:00
Ricardo Quesada 9dea92b2e0 feat: add support for Game Controllers on Mac (#16461)
it shares 100% the same code with iOS.
it only adds a few #ifdefs.

github issue #16460
2016-08-29 16:58:44 -07:00
子龙山人 0b1f61b8ce fix possible crash of label shrinked (#16456) 2016-08-29 15:23:01 +08:00
minggo df3b33cd59 Merge pull request #16457 from minggo/merge-v3.13
Update rapid json to version 1.1.0.
2016-08-29 15:22:01 +08:00
子龙山人 7665d83db2 Merge pull request #16452 from mogemimi/add-missing-override
Add missing override keywords
2016-08-29 00:33:30 -05:00
minggo 04fd2b16b2 merge v3.13 back to v3 2016-08-29 11:57:13 +08:00
CocosRobot ee4d59cf76 [ci skip][AUTO]: updating luabinding & jsbinding automatically (#16454) 2016-08-29 11:48:21 +08:00
mogemimi 6c3f5e6d6b Fix variable shadowing warnings caused by Spine 3.4 (#16445) 2016-08-29 09:42:34 +08:00
mogemimi 86563af08a Add missing override keywords 2016-08-28 23:45:15 +09:00
Alfonso Grillo 6c9a05f831 PageView with custom 'scrollToPage' time (#16390)
* PageView with custom scrollToPage time

* fix compiler error
2016-08-25 15:48:01 +08:00
Nakhyun Choi a9898b9875 possible memory leak when font size is 0 (#16424) 2016-08-24 18:27:44 -07:00
halx99 5bc3659a33 #Improve XML parse performance with rapidxml pure SAX parser (#16419)
* Update CCSAXParser.cpp

* #Improve XML parse performance with rapidxml pure SAX parser without compatible break.

* put rapidxml to external

* Update deps
2016-08-24 16:37:03 -07:00
Aaron e62af99db7 Fixed Camera::_viewProjectionUpdated state (#16405)
Camera::_viewProjectionUpdated is not initialised in constructor. Should be initialised to false.
This can lead to redundant visibility checks if _viewProjectionUpdated happens to resolve true.

As Camera::visit() is never called, _viewProjectionUpdated is never actually updated, resulting in no visibility tests when the camera transform changes.

Fixes #16404
2016-08-24 18:15:19 +08:00
mogemimi a9a8add717 Add missing class declaration and remove duplicate declaration (#16423) 2016-08-24 18:09:29 +08:00
Michael Kösel c339266556 [UserDefault-android] Return defaultValue parameter instead of some default value (#16416)
* Return defaultValue parameter instead of some default value

* Remove unnecessary semicolon
2016-08-24 18:07:17 +08:00
minggo 20a0798007 avoid to use __system_get_property__ (#16433)
* avoid to use __system_get_property__

* add utils

* revert console
2016-08-24 17:11:41 +08:00
9b9387 e124fe4fc5 Update CCBProxy.cpp (#16421)
fixed bug
2016-08-23 14:48:06 +08:00
Adrien de Sentenac 3c60398c09 Fix size/position calculations for Linux system fonts. (#16328) 2016-08-23 12:01:43 +08:00
minggo 1b3ff00cef fix compiling error (#16420) 2016-08-23 11:05:01 +08:00
Furkan Üzümcü 5b83fa1ac0 Fix LNK4098 and LNK2001 warnings (#16372)
* Fix LNK4098 warnings

Fixes these two warnings:
```
warning: LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
warning: LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
```

* Fix LNK2001 error

The `version` library is not linked for MSVC compiler and it produces these errors when compiling with MSVC 19.
```
cocos2dInternal.lib(CCApplication-win32.cpp.obj) : error LNK2001: unresolved external symbol _GetFileVersionInfoSizeW@8
cocos2dInternal.lib(CCApplication-win32.cpp.obj) : error LNK2001: unresolved external symbol _GetFileVersionInfoW@16
cocos2dInternal.lib(CCApplication-win32.cpp.obj) : error LNK2001: unresolved external symbol _VerQueryValueW@16
```

This commit fixes that problem
2016-08-22 15:50:17 +08:00
CocosRobot 56cfd76b4c [ci skip][AUTO]: updating luabinding & jsbinding automatically (#16411) 2016-08-22 15:49:43 +08:00
pandamicro ec52cf4aa4 [ci skip] Remove LayerRGBA in scripts to avoid issues and update web ref (#16412)
* Remove LayerRGBA in scripts to avoid issues and update web ref

* Doctoc docs
2016-08-22 10:55:21 +08:00
halx99 4d801ba1d0 #Fix use const std::string& instead a temp string (#16392)
* #Fix use const std::string& instead a temp string

* #Fix use const std::string& instead a temp string
2016-08-22 09:43:41 +08:00
James Chen 727c501285 Fixes crash while invoking pause&resume right after play2d. (#16406) 2016-08-22 09:43:06 +08:00
mogemimi 7afde8c7a6 Remove unnecessary ActionInterval casts (#16402) 2016-08-22 09:39:58 +08:00
pandamicro f0be4f3069 Merge part of Cocos2d-x-lite (#16380)
* Update js auto binding settings with new ndk version

* Remove unnecessary property from Ref

* Merge part of Cocos2d-x-lite :
1. Improve network bindings
2. Use nullptr instead of NULL
3. Remove usage of some deprecated APIs
4. Add some defensive code and cleanup

* Fix spine track entry circle referencing issue

* cocos2d/cocos2d-x#16327: Fix global object leak issue in JSB

* Improve ScriptingCore::evalString, old implementation have been deprecated in Spidermonkey

* Update JS versions

* Add docs for web v3.13

* Improve ScriptingCore

* Manual merge cocos2d/cocos2d-x#16383 by DavidDeSimone

* Fix auto bindings configurations

* Update web ref
2016-08-19 16:28:47 +08:00
Ricardo Quesada 016e7b0dfc fix: release texture in RenderState (#16396)
memory leak fixed in RenderState

fixes github issue #16155
2016-08-19 00:22:57 -07:00
minggo 92ed162cbe replace replace __system_property_get() since it is deprecated in 64 bit android NDK (#16398) 2016-08-19 11:49:33 +08:00
minggo e9a5a4e2bd Revert luajit (#16397)
* revert to use lua

* comment lua bytecode test

* update release note
2016-08-19 11:49:19 +08:00
CocosRobot d09ee83c5a [ci skip][AUTO]: updating luabinding & jsbinding automatically (#16395) 2016-08-19 09:36:50 +08:00
Ricardo Quesada 3ecaa71944 fix: validates director before layout in iOS (#16394)
Adds Director::isValid()
removes DisplayLinkDirector()
removes virtual functions from Director()
Director is no longer an abstract class

github issue #14276
2016-08-18 18:13:15 -07:00
Ricardo Quesada 604312ac35 Revert "fix: uses correct constant for Eye in Director" (#16385) 2016-08-17 17:53:20 -07:00
minggo 3ce4134ab3 use java reflection to avoid API level dependent, use app-abi 10 (#16371)
* use java reflection to avoid API level dependent, use app-abi 10

* add license header
2016-08-17 13:55:26 +08:00
CocosRobot 7540a64fd8 [ci skip][AUTO]: updating luabinding & jsbinding automatically (#16370) 2016-08-16 16:56:06 +08:00
charlesstlaurent b1a64ae730 new actions ResizeBy and ResizeTo (#16275)
* new actions ResizeBy and ResizeTo

* FDP-5580-ResizeBy and ResizeTo fix and Test cpp : added a scale exemple in the test cpp to compare with our new resize + fix

* FDP-5580: actions ResizeBy and ResizeTo : changed some functions visibility
2016-08-16 16:55:31 +08:00
Ricardo Quesada dcea1b65ae fix: uses correct constant for Eye in Director (#16369)
fixes github issue #8354
2016-08-15 23:27:20 -07:00
James Chen 86b8a633f3 Android arm64-v8a also uses Luajit. (#16352)
* Android arm64-v8a also uses Luajit.

* Updates external/config.json
2016-08-15 14:57:04 +08:00
James Chen 1edaf7e122 Initializes member variable for TMXMapInfo and updates hexa-test.tmx to the latest format. (#16353) 2016-08-15 14:10:13 +08:00
Ricardo Quesada 02de525cbd deprecates CCProgressTimer::setReverseProgress() (#16341)
use CCProgressTimer::setReverseDirection() instead.

fixes github issue #14678
2016-08-15 14:08:42 +08:00
mogemimi b837dd7a20 Avoid unnecessary allocation if targetGrid is reusable (#16343) 2016-08-15 14:07:37 +08:00
James Chen 020745ee2e Disables 'permessage-deflate' extension for WebSocket temporarily. (#16366)
Currently, we couldn't find out the exact reason.
libwebsockets official said it's probably an issue of user code since 'libwebsockets' passed AutoBahn stressed Test.
2016-08-15 13:59:01 +08:00
CocosRobot 7f222c92e0 [ci skip][AUTO]: updating luabinding & jsbinding automatically (#16360) 2016-08-15 10:53:07 +08:00
Ricardo Quesada 3bc662ea7b fix: not resize textureatlas multiple times on Label::create() (#16358)
since we know the size before allocating it, just reserve
the needed capacity once.

fixes github issue #16293
2016-08-13 09:38:42 -07:00
Ricardo Quesada 3d75750728 resets bindBuffer after using it (#16342)
fixes github issue #14711
2016-08-11 08:32:09 -07:00
Ricardo Quesada 87f6dd3c97 v3.13 branch: spine updates (#16340)
related to:

* Github issue #16263
* Github issue #16294
2016-08-11 23:30:15 +08:00
Dale Stammen a124213777 disabled /ZW option for .c files for all platforms/configurations (#16338) 2016-08-11 23:03:58 +08:00
James Chen 8af275c4a6 Fixes potential crash in AudioEngine::uncache(filePath). (#16345) 2016-08-11 16:06:59 +08:00
Ricardo Quesada d41124a5b1 check for correct GL extension (#16346)
uses `GL_IMG_texture_format_BGRA8888` instead of `GL_IMG_texture_format_BGRA888`

fixes issue #16336
2016-08-10 03:24:41 -07:00
JaryGuo f9abbf02f6 fix the problem in ccUTF8.cpp and CCLuaJavaBridge.cpp (#16314)
* fix the return value when return null in java

fix the return value when return null in java

* fix getStringUTFCharsJNI

fix getStringUTFCharsJNI when srcjStr is null

* remove a word

remove a word added by mistake

* make a indention

line 233 utf8Str
2016-08-08 10:43:14 +08:00
vlad-tkachenko c3130caf27 Fix Desktop App crash upon exit when NotificationNode exists. (#11274) 2016-08-08 10:20:15 +08:00
Ricardo Quesada e5b14733c8 from spine source code (#16330)
Related to:

* Github issue #16263
* Github issue #16294
2016-08-08 09:47:05 +08:00
Ricardo Quesada f7464f8de5 fix: TriangleCommands with custom uniforms can be batched (#16329)
* fix: TriangleCommands with custom uniforms can be batched

TriangleCommands with custom uniforms can be batched together.

This improves the performance when using custom uniforms without
adding any penalties when not using them

Github issue #16224

* better tests
2016-08-07 14:51:02 -07:00
minggo 0e65025bda Revert "Match parent's camera mask when adding child." (#16324) 2016-08-05 17:28:05 +08:00
minggo abb97b1b71 don't set camera the same as its parent by default (#16325) 2016-08-05 17:26:27 +08:00
James Chen f44f253179 [Android] Notify waitup only while preloadEffect(info, cb) is invoked in play2d. (#16320)
Currently, if a audio isn't preloaded, then play2d will wait the preload operation to finish.
2016-08-05 14:07:19 +08:00
minggo 2bd325ab92 Revert "fixes issue #16263 correctly" (#16321) 2016-08-05 14:06:03 +08:00
子龙山人 0d836b2cea Fix pageview click turning event (#16318)
* fix pageView click turning event

* fix current PageIndx issue
2016-08-05 14:04:57 +08:00
mogemimi a5f36e70a5 Add explicit type casts to suppress -Wformat warnings (#16306) 2016-08-05 09:46:50 +08:00
子龙山人 08515f46e3 fix pageView click turning event (#16310) 2016-08-05 09:43:15 +08:00
James Chen b135d512d2 Update copyright to 2016. (#16311) 2016-08-05 09:42:15 +08:00
mogemimi 3175316131 Fix format string warning when compiling for iOS armv7 (#16298) 2016-08-04 09:54:27 +08:00
James Chen cc9871b71d fixed #10482: New AudioEngine class can't play large ogg file on Win32. (#16303)
* fixed #10482: New AudioEngine class can't play large ogg file on Win32.

* [win32] Small logic fix in AudioPlayer::readPcmData.
2016-08-04 09:53:30 +08:00
子龙山人 6eaf15a2c2 fix pageview turning event (#16299) 2016-08-04 09:51:54 +08:00
halx99 73f80f4c73 #Make etc1 alpha support ok for ProgressTimer (#16296)
* #Make etc1 alpha support ok for ProgressTimer

* #fix issues

* Add comment
2016-08-03 14:29:34 +08:00
minggo ba51370e43 use correct shader (#16295) 2016-08-03 10:56:12 +08:00
Ricardo Quesada 143317871d fixes issue #16263 correctly (#16294)
no stackoverflow when converting int to ssize_t
2016-08-03 09:23:06 +08:00
minggo 03723da032 implement bsd_sinal for compiling or Android 21+ (#16292) 2016-08-02 16:52:15 +08:00
Jeff Wang f8b2d8fe0f fixed base URL for webview on android doesn't work (#16279)
fixed base URL for webview on android doesn't work
2016-08-02 16:49:24 +08:00
mogemimi 808a10429b Fix some typos in comments and strings (#16290) 2016-08-02 15:29:23 +08:00
Dred95 d68f105da4 Fix openURL ubuntu error (#16283) 2016-08-01 11:51:05 +08:00
mogemimi c03dd85c3f Remove redundant includes (#16285) 2016-08-01 10:22:35 +08:00
mogemimi 269bdbed85 Fix compiler warnings caused by Spine 3.4 (#16286) 2016-08-01 09:34:20 +08:00
minggo d7b96a6498 update version 2016-07-31 22:53:33 +08:00
minggo 55d80413f2 update version 2016-07-31 22:52:59 +08:00
CocosRobot aac49e35e1 [ci skip][AUTO]: updating luabinding & jsbinding automatically (#16284) 2016-07-31 22:50:28 +08:00
Vladimir Perminov c26b755175 Android import cpufeatures in cocos. (#16233)
* Android import cpufeatures in cocos.

cpufeatures imported in 3rd party libs webp.
If not use webp, android not build.

* Issues #9968

* Issues #9968
2016-07-31 22:45:30 +08:00
halx99 a2adfaf7df #Improve node sort performance for 64-bit by std::sort + long long (_localZOrder) (#16262)
* #improve node sort performance by std::sort + unsigned long long (_localZOrder)

* Use bit field for make _localZOrder storage more clearly.

* #Comment _localZOrder members for meaningful.

* fix issues

* #use explicit bits integer of localZOrder storage

* #Fix compile error, add include <cstdint> to CCNode.h

* use the optimization for 64bit and no optimization solution for 32bit

* Use the optimization for 64bit and no optimization solution for 32bit

* #Improve node sort performance 64-bit by std::sort + long long (_localZOrder)

* fix issues

* test case

* Revert "test case"

This reverts commit 85471d07a433f2b7f0265c3b7dd483fcc28e3e2f.

* fix issues

* use lambda, and any other sort issues.

* skip sotNodes

* fix compile error

* fix  compile issue
2016-07-31 22:44:24 +08:00
QingliWang bbfd2d334c Some bug-fix and quality assurance for Tizen support. (#16281)
* Support audio interruption and resume callback when change earphone status.

* Refactor keyevent callback and add makecurrent for compatible with different binary.

* Enable Tizen indicator.

* Remove the unnecessary evasobject in the window and refactor the function for glview mode.

* Fix the compatible issue between Tizen 2.3 and 2.4.

* Fix the wrong directory of script resources for HellLua template project.

* Create performance-test project for Tizen platform.
2016-07-31 22:32:59 +08:00
halx99 9cca6eb685 #bug fix etc1 alpha builtin support Sprite (#16278)
see: https://github.com/cocos2d/cocos2d-x/pull/16118
2016-07-31 22:30:03 +08:00
Ricardo Quesada a82e52ffd6 Revert "#Use Data::takeBuffer replace deep copy data." (#16277) 2016-07-29 15:35:29 -07:00
minggo 9a8f577095 fix some typos (#16269) 2016-07-29 17:20:42 +08:00
halx99 3a3f6bd385 #Use Data::takeBuffer replace deep copy data. (#16263)
see: https://github.com/EsotericSoftware/spine-runtimes/pull/650
2016-07-29 15:27:16 +08:00
CocosRobot c5923e00ca [ci skip][AUTO]: updating luabinding & jsbinding automatically (#16261) 2016-07-29 13:40:46 +08:00
minggo 88eb533f9d Revert "#improve node sort performance by std::sort + long long (_localZOrder) for 64-bit" (#16260) 2016-07-29 10:58:31 +08:00
CocosRobot af1783364b [ci skip][AUTO]: updating luabinding & jsbinding automatically 2016-07-29 01:43:11 +00:00
Vladimir Perminov 817ab329f2 Win32 MessageBox correct show utf8 and LuaLog convert utf8 by common unicode api. (#16249)
* Win32 MessageBox correct show utf8

Support MessageBox utf8 string
based on pr #16234

* LuaLog convert utf8 by common unicode api.

* Add CCStdC.h
2016-07-29 09:36:39 +08:00
minggo a8ce513f6c Merge pull request #16228 from dumganhar/fix/iss14148-ios-no-sound
fixed #14148: Got an error while pressing home button at launch, after resuming from background, SimpileAudioEngine::playEffect will be mute.
2016-07-29 09:28:37 +08:00
Ricardo Quesada 2945968614 Upgrades to Spine v3.4 (#16242)
* Upgrades to Spine v3.4

Github issue #16115

* compiles and works on windows

tested on:

* win32
* win10
* win8.1

* include-linter: don't test spine files

we need them unmodified

* spine bindings fixes

also, doesn't use goblins-ffd. instead it uses goblins.
goblins-ffd is no longer present in spine v3.4
2016-07-28 07:25:50 -07:00
minggo 57e4963502 Merge pull request #15963 from Drakon-Cocos/PageViewIndicator
Fix PageViewIndicator opacity for 'inactive' pages
2016-07-28 14:44:35 +08:00
James Chen 66fac82f00 fixed #16169: new android project crash in android 5.0.2 device (Nexus 7) when use 3.12 (#16214)
* fixed #16169: new android project crash in android 5.0.2 device (Nexus 7) when use 3.12

* fixed #16169: Adds comments for why we should not use `assignment operator` of `std::u16string`.
2016-07-28 11:19:22 +08:00
minggo cac05fefd1 Merge pull request #16241 from mogemimi/avoid-casting-overhead
Avoid overhead of casting between float and double
2016-07-28 10:04:34 +08:00
Vladimir Perminov 09aa7d9cf4 Win32 move unicode utils global. (#16234)
* Win32 move unicode utils global.

It need for easy converting utf-8 string in all code.
And use it api in user code also WinRT version.

* Move to CCUtils-win32

Also in WinRT version.

* Copyright
2016-07-28 09:57:29 +08:00
mogemimi bf35e0f6b5 Avoid overhead of casting between float and double 2016-07-28 06:49:41 +09:00
CocosRobot 6b3454e9c6 [ci skip][AUTO]: updating luabinding & jsbinding automatically 2016-07-27 20:38:57 +00:00
Ricardo Quesada 47e6b0cf3d Merge pull request #16237 from ricardoquesada/issue_16220
Compile on macOS 10.10 and lower
2016-07-27 13:30:59 -07:00
Vladimir Perminov 5498bdb32b Add ricardoquesada info 2016-07-27 18:48:10 +03:00
Ricardo Quesada 9dcc1f8193 Compile on macOS 10.10 and lower 2016-07-27 07:44:00 -07:00
Vladimir Perminov 3734668d17 GLProgram::link always check link status
Fix issues #16231
2016-07-27 15:31:32 +03:00
halx99 3a14388087 #improve node sort performance by std::sort + long long (_localZOrder) (#16126)
* #improve node sort performance by std::sort + unsigned long long (_localZOrder)

* Use bit field for make _localZOrder storage more clearly.

* #Comment _localZOrder members for meaningful.

* fix issues

* #use explicit bits integer of localZOrder storage

* #Fix compile error, add include <cstdint> to CCNode.h

* use the optimization for 64bit and no optimization solution for 32bit
2016-07-27 16:58:51 +08:00
minggo 30118aff6b Merge pull request #16226 from dumganhar/fix/iss16192-smallaudio-crash
fixed #16192: Crash while decoding small MP3 file on Android.
2016-07-27 15:39:57 +08:00
minggo e6b42d486b Merge pull request #16218 from cezheng/fix/etc_premultiplied_alpha_value
fix CCImage premultipliedAlpha for ETC format
2016-07-27 15:38:48 +08:00
minggo 1a1241c3fc Merge pull request #16221 from Microsoft/winrt-v3.13
WinRT: update libcocos2d version to v3.13
2016-07-27 15:36:43 +08:00
James Chen 6efcf87b93 fixed #14148: Got an error while pressing home button at launch, after resuming from background, SimpileAudioEngine::playEffect will not be mute.
The error is: ERROR: [0x19e5fa000] >aurioc> 807: failed: '!pla' (enable 2, outf< 2 ch, 44100 Hz, Float32, non-inter> inf< 2 ch, 0 Hz, Float32, non-inter>)
2016-07-27 15:33:02 +08:00
Ricardo Quesada 4e278183ad Merge pull request #16122 from ricardoquesada/issue_16100
testcase: add test case for issue #16100
2016-07-26 23:21:25 -07:00
James Chen bd1d630f93 fixed #16192: Crash while decoding small MP3 file on Android. 2016-07-27 13:54:39 +08:00
Ricardo Quesada b336aa3219 testcase: add test case for issue #16100
delays camera creation

fix issue #16100
2016-07-26 19:03:54 -07:00
Dale Stammen d5809129c4 update libcocos2d version to v3.13 2016-07-26 12:34:36 -07:00
Ce Zheng 9903d31031 fix CCImage premultipliedAlpha for ETC format
translucent part of ETC format textures are rendered too bright due to
the fact that v3.12 sets PremultipliedAlpha to true by default. This
commit sets default value of _hasPremultipliedAlpha = false, deletes
unnecessary `_hasPremultipliedAlpha = false` code in multiple places,
making ETC format's _hasPremultipliedAlpha false while keeping other
formats unchanged.
2016-07-26 19:17:10 +09:00
minggo 6109ca6e4b Merge pull request #16216 from mogemimi/remove-unnecessary-extern
Remove unnecessary 'extern' to prevent compiler warnings
2016-07-26 15:19:11 +08:00
minggo 6fb4410232 Merge pull request #16213 from CocosRobot/update_lua_bindings_1469498667
[ci skip][AUTO]: updating luabinding & jsbinding automatically
2016-07-26 15:12:48 +08:00
mogemimi 0894662eff Remove unnecessary 'extern' to prevent compiler warnings 2016-07-26 12:42:43 +09:00
CocosRobot 9566a0cb24 [ci skip][AUTO]: updating luabinding & jsbinding automatically 2016-07-26 02:06:58 +00:00
minggo e1204c6138 Merge pull request #16210 from dumganhar/fix/std-bind
Remove unneeded std::bind, and use const & for input parameters.
2016-07-26 09:58:01 +08:00
mogemimi 093ef3a14f Fix typos in variable names 2016-07-26 04:06:01 +09:00
James Chen bf80f10dfd Remove unneeded std::bind, and use const & for input parameters. 2016-07-26 00:55:32 +08:00
minggo 662a1636c3 replace __system_property_get (#16205)
* replace __system_property_get

* fix comment
2016-07-25 18:30:47 +08:00
CocosRobot e0abb981d5 [ci skip][AUTO]: updating luabinding & jsbinding automatically 2016-07-25 09:39:34 +00:00
halx99 bf996c5bac Add ETC1 builtin alpha support. (#16118)
* Add ETC1 builtin alpha support.

* Rename setETC1AlphaFileEndix to setETC1AlphaFileSuffix

* Check whether etc1 alpha suffix is empty

* fix Code ident & Add etc1 alpha test case to SpriteTest.

* Remove unused ETC1AA shader programs

* Fix all review issues and endl issues

* Add a new TriangleCommand::init() with Texture2D* instead of GLuint textureID

* #fix issues
2016-07-25 17:31:54 +08:00
minggo cc14a06800 Issue 14206 (#16201)
* don't trigger applicationWillEnterForeground at first time to be the same as iOS

* rename first to firstTime
2016-07-25 14:25:48 +08:00
mogemimi 15030ad4c3 Fix typos in log messages 2016-07-25 02:53:22 +09:00
minggo 4c2234fe20 get correct control code 2016-07-22 14:30:06 +08:00
minggo a97906a280 Merge pull request #16184 from minggo/issue-16161
Issue 16161
2016-07-22 13:51:54 +08:00
minggo 391d97d1dd improve log info 2016-07-22 11:56:41 +08:00
minggo 8419cc2662 Merge pull request #16183 from SaxonDruce/android-willplaymusic
Implement willPlayBackgroundMusic() on Android
2016-07-22 10:57:26 +08:00
minggo fcd02f109e Merge pull request #16189 from mogemimi/fix-docs-typo
Fix typos in documentation and comments
2016-07-22 10:55:05 +08:00