Commit Graph

4352 Commits

Author SHA1 Message Date
Ricardo Quesada 75b9913c92 LabelTTF vertical alignment fixed on OS X
vertical alignment was broken on OS X.
top and bottom were switched.
2013-06-11 14:59:40 -07:00
Ricardo Quesada af49023741 Fixes for iOS7 and Xcode5 2013-06-11 12:11:05 -07:00
Maciej Czerniak 1e71ea85f3 add Polish language support 2013-06-11 16:46:38 +02:00
Maciej Czerniak dddb487639 fix formatting 2013-06-11 16:43:35 +02:00
Maciej Czerniak c9b88e1c0c add missing Norwegian language for marmelade platform 2013-06-11 16:41:54 +02:00
Maciej Czerniak eb79c01003 add missing Norwegian language for linux platform 2013-06-11 16:39:33 +02:00
Rene Klacan 44851e36e9 removed forgotten debug printf 2013-06-11 15:37:51 +02:00
Rene Klacan f31a258c01 Merge pull request from cocos2d/develop 2013-06-11 01:06:12 +02:00
minggo 29607bd741 fixed #2259:add description of path that custom font can put in 2013-06-10 23:01:48 +08:00
James Chen 5da7a7692e Fixing a logic error in CCDirector.cpp. 2013-06-10 21:19:22 +08:00
Rene Klacan 83be06bafb check if delegate is not null when dispatching keyboard event 2013-06-10 00:54:31 +02:00
minggo c84a071ae5 issue #2271: fixed memory leak of CCTextureCache::snapshotTextures() 2013-06-09 15:08:26 +08:00
minggo ec7bf7a9d6 issue #2271: fixed memory leak of CCTextureCache::snapshotTextures() 2013-06-09 15:03:38 +08:00
James Chen 4edd35e2b1 Merge pull request #2829 from dumganhar/nacl-fix
Fixing some issues in https://github.com/cocos2d/cocos2d-x/pull/2788
2013-06-08 03:00:04 -07:00
minggo 6eaa1f97ec Merge pull request #2828 from minggo/develop
fixed #2161: fixed crash of loading ETC file
2013-06-08 02:02:52 -07:00
minggo d5bfe10379 fixed #2161: fixed crash of loading ETC file 2013-06-08 17:01:45 +08:00
minggo 2e9c4c55de Merge pull request #2827 from minggo/master
fixed crash of loading ETC file
2013-06-08 02:00:19 -07:00
minggo 2b3f3b6744 fixed #2161: fixed crash of loading ETC file 2013-06-08 16:58:18 +08:00
James Chen 93ecfbbf7e Merge branch 'master' of https://github.com/2youyouo2/cocos2d-x into nacl-fix 2013-06-08 15:42:41 +08:00
James Chen 51aa2433fc Updating makefile for native client. 2013-06-08 15:35:45 +08:00
minggo 52f55802b7 Merge pull request #2826 from minggo/develop
make CCFileUtil::getFileData() get data correctly
2013-06-07 22:44:01 -07:00
minggo f56c20657b fixed #2266:make CCFileUtil::getFileData() get data correctly 2013-06-08 13:42:52 +08:00
minggo ababa5e885 Merge pull request #2825 from minggo/master
make CCFileUtil::getFileData() get data correctly
2013-06-07 22:41:54 -07:00
minggo 6d3615157a fixed #2266:make CCFileUtil::getFileData() get data correctly 2013-06-08 13:40:03 +08:00
minggo f2be4c62ee Merge pull request #2820 from minggo/develop
fixed #2161: don't close AssetManager
2013-06-07 20:24:27 -07:00
minggo b023158c85 fixed #2161: don't close AssetManager 2013-06-08 11:23:13 +08:00
James Chen 2fae3db792 Minor fix for CCSprite::draw(), checking whether texture is valid, if it's invalid, don't set the attribute for it. 2013-06-08 11:10:39 +08:00
carlo morgantini 494ec43fe8 new CCLabelTTF (static) create with fontDefinition method, and new CPP test using it 2013-06-08 10:59:07 +08:00
minggo cdf24ceba1 Merge pull request #2815 from minggo/master
fix a bug of Cocos2dxETCLoader.java
2013-06-07 19:58:47 -07:00
minggo 206502dccb fixed #2161: don't close AssetManager 2013-06-08 10:57:19 +08:00
carlo morgantini b7ffb5b810 new CCLabelTTF (static) create with fontDefinition method, and new CPP test using it 2013-06-07 16:33:01 -07:00
Michael Chinen 9471c51201 set up keyboard handling for mac 2013-06-07 20:29:02 +09:00
Lee, Jae-Hong b9f5691706 [Tizen] Add libwebsockets.h, .a and support C++11 2013-06-07 20:14:43 +09:00
James Chen 9298492384 Updating project configuration for Blackberry port. 2013-06-07 16:52:49 +08:00
James Chen 8cfe969137 Fixing compilation errors for win32. 2013-06-07 14:31:15 +08:00
James Chen ec8ab8bd8b Updating multi-platform-xxx template for win32. 2013-06-07 12:57:28 +08:00
James Chen d72e9d10b5 Updating multi-platform-xxx template for win32. 2013-06-07 12:50:02 +08:00
yinkaile 65974f2243 standardize code 2013-06-07 10:52:32 +08:00
flaming0 68ac1684a8 Fix windows build (nullptr instead of NULL when assigning to std::function) 2013-06-07 00:08:59 +04:00
Ricardo Quesada 428711482e Adds missing config files for CCConfiguration
...and add functionality on the Director to override the default values
from the config file.

Supported values:

 - cocos2d.x.fps
 - cocos2d.x.display_fps
 - cocos2d.x.gl.projection
 - cocos2d.x.texture.pixel_format_for_png
 - cocos2d.x.texture.pvrv2_has_alpha_premultiplied

If the "config.plist" file is not present, or some keys are not present,
the default values are going to be used

IMPORTANT:
 The folder "samples/Cpp/TestCpp/Resources/configs" needs to be added
 in the Android, Linux, Win32 projects.
 Already added in OS X and iOS Xcode projects.
2013-06-06 12:23:44 -07:00
James Chen 5832934e41 Reverting target to android-8. 2013-06-06 16:20:22 +08:00
James Chen deceba3fd2 Merge branch 'menuitem_toggle_fixes' of https://github.com/ricardoquesada/cocos2d-x into ricardoquesada-menuitem_toggle_fixes 2013-06-06 15:52:33 +08:00
Rene Klacan 8b16178f9f Merge pull request from cocos2d/develop 2013-06-06 09:42:18 +02:00
James Chen 1a5e9f3717 Fixing a bug that display is wrong when setting setTexture(NULL) for CCSprite. 2013-06-06 15:02:57 +08:00
James Chen 5c592943db [Mamarlade] Fixing a compilation error in cocos2dx/platform/marmalade/CCImage.cpp. 2013-06-06 15:02:57 +08:00
James Chen cb08479b7e Log error instead of triggering an assert for shadow and stroke. 2013-06-06 15:02:57 +08:00
James Chen ab3f42bb5f Merge pull request #2784 from dumganhar/some-fixes-marmalade-master
[master] Some fixes:
Adding libwebsockets license in WebSocket.h/.cpp.
Log error instead of triggering an assert for shadow and stroke.
[Mamarlade] Fixing a compilation error in cocos2dx/platform/marmalade
Fixing a bug that display is wrong when setting setTexture(NULL) for CCSprite
[Spine] Using getContentSize to make spine-runtime supports the strategy of loading resources in cocos2d-x.
Removing unreadable print in CCBReaderLoad.lua.
Removing CODE_SIGN_IDETITY section in prom.pbxproj.
Marmalade projects fix.
2013-06-05 23:47:01 -07:00
James Chen 3b9f669b51 Minor fix for CCSprite::draw(), checking whether texture is valid, if it's invalid, don't set the attribute for it. 2013-06-06 14:41:22 +08:00
James Chen b462c9de82 Fixing a bug that display is wrong when setting setTexture(NULL) for CCSprite. 2013-06-06 14:22:09 +08:00
James Chen 0248c23b20 [Mamarlade] Fixing a compilation error in cocos2dx/platform/marmalade/CCImage.cpp. 2013-06-06 14:19:59 +08:00
James Chen 359225806b Log error instead of triggering an assert for shadow and stroke. 2013-06-06 14:19:16 +08:00
James Chen a8ed579f9e Merge pull request #2778 from ricardoquesada/dealloc_log_fixed
on dealloc, log "this" with %p, not %x.
2013-06-05 22:00:16 -07:00
minggo a8fe210c7e fixed #2260: make CCDictionary::createWithContentsOfFile() return NULL when the file is missing 2013-06-06 12:50:42 +08:00
yinkaile 3cfba7bc9a Merge branch 'master' of https://github.com/cocos2d/cocos2d-x
Conflicts:
	extensions/Android.mk
	extensions/proj.win32/libExtensions.vcxproj.filters
	samples/Cpp/TestCpp/Android.mk
	samples/Cpp/TestCpp/Classes/ExtensionsTest/ExtensionsTest.cpp
2013-06-06 12:35:18 +08:00
yinkaile 245b0395b1 1.upload CCArmature 2013-06-06 12:02:54 +08:00
James Chen 3c69a17752 [Android] Only ignore warning of 'invalid-offsetof' in the library of spidermonkey. 2013-06-06 10:12:44 +08:00
Ricardo Quesada 479062fdb7 on dealloc, log "this" with %p, not %x.
Also adds %p where it was missing.
And make a few fixes on the iOS project
2013-06-05 18:21:05 -07:00
Ricardo Quesada 3441ca5563 MenuItemToggle is fixed
Supports callbacks now.
Updated MenuTest to supports the new API.
Updated CHANGELOG and version
Updatged Xcode project for Mac
2013-06-05 17:51:40 -07:00
James Chen a5263673fb Fixing compilation errors on Android. 2013-06-05 19:56:23 +08:00
James Chen 2d81a66444 [Linux] Don't treat the warning of deprecated-declarations as error. 2013-06-05 17:48:04 +08:00
James Chen cda02af1e7 Using CC_DEPRECATED_ATTRIBUTE to mark functions as deprecated. Don't bind CCMenuItem::setCallback automatically. 2013-06-05 17:35:19 +08:00
James Chen dc8cfeb648 Merge branch 'menuitem_function_callback' of https://github.com/ricardoquesada/cocos2d-x into ricardoquesada-menuitem_function_callback 2013-06-05 16:40:25 +08:00
minggo 3713ff5b71 Merge pull request #2770 from samuele3hu/test_bind_cocosbuilder
add cocosbuilder lua test sample
2013-06-05 01:38:57 -07:00
samuele3hu 8e97c69b2f issue #2103 add cocosbuilder lua test sample 2013-06-05 16:25:23 +08:00
minggo a9788a7f9d Merge pull request #2767 from chengstory/master_Components#2
1.  change “bool isEnabled()”  to "bool isEnabled() const".
2013-06-05 00:52:32 -07:00
samuele3hu c2e2be1b1b issue #2103 add cocosbuilder lua test sample 2013-06-05 15:51:29 +08:00
samuele3hu 75b26d9cdf Merge branch 'master' of https://github.com/cocos2d/cocos2d-x into test_bind_cocosbuilder 2013-06-05 15:19:01 +08:00
samuele3hu 6dd077b8bd issue #2103 add cocosbuilder lua test sample 2013-06-05 15:17:00 +08:00
chengstory ca3dc682ea 1. change “bool isEnabled()” to "bool isEnabled() const".
2.  dolete license.
2013-06-05 15:05:49 +08:00
minggo d71e07db4e fixed conflict 2013-06-05 13:48:31 +08:00
Ricardo Quesada d27da88c06 Adds setObject to CCConfiguration
also adds the test

Conflicts:
	scripting/javascript/bindings/generated
2013-06-05 09:46:56 +08:00
James Chen 2a16a6b17f Merge branch 'configuration_set_value' of https://github.com/ricardoquesada/cocos2d-x into ricardoquesada-configuration_set_value 2013-06-05 09:36:53 +08:00
Ricardo Quesada 609801e900 compiles on linux and other machines without C99 support 2013-06-05 09:29:27 +08:00
Ricardo Quesada 4b37ec252a Adds C++11 std::function<> support to MenuItem
Updates some of the tests
2013-06-04 18:29:26 -07:00
Ricardo Quesada 9b305a60d1 cc_timeval works on 64bit machines, like OS X 2013-06-05 09:29:12 +08:00
James Chen bb635c280c Updating multi-platform-xxx template for iOS and Android after enabling c++ 11. 2013-06-04 20:52:29 +08:00
Sergey Shambir f5b9b4580c Enabled c++0x flag, use OpenAL audio backend by default. 2013-06-04 14:29:29 +04:00
chengstory cfb424a6c9 1. add Component struct. 2013-06-04 17:38:43 +08:00
René Klačan f66e12f414 Merge pull request #4 from cocos2d/develop
pull request from main repo
2013-06-04 02:05:36 -07:00
minggo c21812b270 Merge pull request #2729 from ricardoquesada/timeval_64bit_fix
cc_timeval works on 64bit machines, like OS X
2013-06-03 22:47:45 -07:00
xyhl515 69ccb9b724 A problem of CCDrawNode::drawPolygon outline 2013-06-04 13:22:06 +08:00
James Chen 932d6dfb85 Merge pull request #2726 from xyhl515/develop
fixed #2251: A logical error in CCDrawNode::drawPolygon.
2013-06-03 22:15:13 -07:00
minggo 1c700157b3 declare _functions as it is initialized 2013-06-04 11:57:32 +08:00
minggo 5f8e9afec6 change version 2013-06-04 11:52:35 +08:00
Ricardo Quesada 7e7e943699 compiles on linux and other machines without C99 support 2013-06-03 20:45:06 -07:00
Ben Ward 0f8fa2e5a4 Fixed tabbing. 2013-06-04 10:45:20 +08:00
Ben Ward 73b8050fa1 Fixed linebreaks on Mac OSX 2013-06-04 10:45:07 +08:00
minggo 74b86021e6 Merge pull request #2624 from benjamesward/master
Fixed linebreaks on Mac OSX
2013-06-03 19:40:34 -07:00
minggo f9de0d2fbe Merge pull request #2714 from samuele3hu/bind_cocosbuilder
add cocosbuilder lua_binding
2013-06-03 19:33:19 -07:00
Ricardo Quesada c6d00a3ccb cc_timeval works on 64bit machines, like OS X 2013-06-03 17:31:59 -07:00
Ricardo Quesada 69e8628626 Adds setObject to CCConfiguration
also adds the test
2013-06-03 13:49:06 -07:00
Ricardo Quesada 39928d6a80 Adds std::function support in CCCallFunc
And fixes some minor issues on the iOS and OS X projects
2013-06-03 12:13:24 -07:00
xyhl515 26e356c33c A problem of CCDrawNode::drawPolygon outline 2013-06-03 22:19:37 +08:00
Rene Klacan c4ec15752a simplified CCKeyboardDispatcher and CCLayer does not inherit from CCKeyboardDelegate 2013-06-03 16:06:33 +02:00
Rodrigo Goncalves de Oliveira 78967b7c8e Removing unused variable
These variables are just used on CCAssert comparisons, and result on a
compilation error on Linux (-Werror=unused-variable).

Signed-off-by: Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>
2013-06-03 09:17:03 -04:00
René Klačan 9e4c5bbca3 Merge pull request #3 from cocos2d/develop
pull request from main repo
2013-06-03 04:07:43 -07:00
James Chen 5386dfcbfd Enabling c++ 11 support for iOS. cocos2dx/proj.ios/cocos2dx.xcodeproj also needs to be updated. 2013-06-03 16:34:41 +08:00
minggo 5c1a408797 issue #2242:use -std=gnu++0x for linux and native client project 2013-06-03 13:50:19 +08:00
samuele3hu af0737ce87 Merge branch 'master' of https://github.com/cocos2d/cocos2d-x into bind_cocosbuilder 2013-06-03 13:48:12 +08:00
samuele3hu afa6b81ba7 issue #2103 add cocosbuilder lua bind and add a simple sample 2013-06-03 13:47:12 +08:00
minggo 0a64e7a041 enable c++11 for linux and natvie client projects 2013-06-03 11:02:54 +08:00
minggo 236286829b enable c++11 2013-06-03 11:02:35 +08:00
Rene Klacan c4d231aef4 comments fixed 2013-06-02 13:37:13 +02:00
Rene Klacan 0489ba51fd deleted defines in proj.linux's Makefile 2013-06-02 13:18:06 +02:00
James Chen cedb427a6e fixed #1647: Adding WebSocket support for Cpp and JSB.
Conflicts:
	extensions/proj.win32/libExtensions.vcxproj
	extensions/proj.win32/libExtensions.vcxproj.filters
2013-06-02 18:55:57 +08:00
Sergey Shambir 984ed75b9a Linux: added project part for QtCreator.
Allows easily setup cocos2d on Linux in QtCreator IDE.
2013-06-02 10:15:14 +04:00
Rene Klacan c8b4291731 keyboard support throught compiler directive 2013-06-02 04:11:43 +02:00
James Chen 0ff1ef6f84 Merge branch 'tizen_2.1' of https://github.com/pyrasis/cocos2d-x 2013-06-01 23:20:11 +08:00
Rene 61ec83b742 Merge pull request #1 from cocos2d/develop
Develop
2013-05-31 16:27:23 -07:00
James Chen 05a88c89dc fixed #1647: Adding WebSocket support for Cpp and JSB. 2013-05-31 23:13:03 +08:00
Rene Klacan 50ad3e1c80 KeyboardDispatcher + tests for it on linux 2013-05-31 14:29:32 +02:00
minggo 57600783c4 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into develop 2013-05-31 10:29:39 +08:00
Ricardo Quesada 3cbb6c4abb uses the cocos2d.x namespace for "cocos2d x" configuration values 2013-05-31 10:25:55 +08:00
Ricardo Quesada 3383fc5f04 CCConfiguration supports default values in the query
Adds tests for the new API as well
2013-05-31 10:25:34 +08:00
Ricardo Quesada bf08b6040a uses the cocos2d.x namespace for "cocos2d x" configuration values 2013-05-30 16:29:36 -07:00
Ricardo Quesada f6665d492b CCConfiguration supports default values in the query
Adds tests for the new API as well
2013-05-30 16:10:31 -07:00
minggo 08b80bfbc9 Merge pull request #2675 from j4m3z0r/emscriptenate
Emscripten: Fix calculation of offsets in font rendering so that we don't scribble a...
2013-05-29 23:05:05 -07:00
minggo 809b020de5 Merge pull request #2652 from liuyq/memcpy
CCTextureAtlas::updateQuad modify for the memcpy hot spot
2013-05-29 22:58:17 -07:00
James Gregory 8b4f5b5853 Fix calculation of offsets in font rendering so that we don't scribble all over memory! 2013-05-29 21:25:32 -07:00
minggo 1ff88de561 Merge pull request #2666 from jotel/ccdata-in-userdefault
Ability to save/retrieve CCData into/from CCUserDefault
2013-05-29 19:40:23 -07:00
minggo b6ddd86ecf Merge pull request #2673 from j4m3z0r/emscriptenate
Add destructor to CCGLBufferedNode
2013-05-29 19:33:44 -07:00
Ricardo Quesada d61bfda440 Adds support for "CCString" types for boolean and integers 2013-05-30 10:21:49 +08:00
Yongqin Liu 1091e71bda Revert the CCSprite.cpp and CCSprite.h to first merge other changes
Signed-off-by: Yongqin Liu  <liuyq0307@thundersoft.com>
2013-05-30 10:21:48 +08:00
Yongqin Liu d0f75ba92a Fix the bug for the bound check
Signed-off-by: Yongqin Liu  <liuyq0307@thundersoft.com>
2013-05-30 09:54:09 +08:00
James Gregory 09bc00032c Add destructor for CCGLBufferedNode class to delete GL buffers. 2013-05-29 17:46:25 -07:00
Ricardo Quesada 827fa638ca Adds support for "CCString" types for boolean and integers 2013-05-29 15:49:34 -07:00
Jaroslaw Lewandowski 7d4eea0646 Fixed compilation error for iOS project using Compiler Default C++ Language Dialect 2013-05-29 21:14:19 +01:00
Ben Ward d166de4684 Fixed tabbing. 2013-05-29 15:40:19 +01:00
James Chen 8456072aa0 Merge pull request #2671 from pyrasis/tizen_2.1
Implement setIMEKeyboardState function for Tizen
2013-05-29 07:23:47 -07:00
Lee, Jae-Hong ae78bb9b47 Modify space character check. 2013-05-29 23:14:52 +09:00
Lee, Jae-Hong ccd20af8f9 Implement setIMEKeyboardState function for Tizen. 2013-05-29 22:46:52 +09:00
James Chen 50c9515741 Merge pull request #2663 from pyrasis/tizen_2.1
Fix Tizen CCEditBox bug.
2013-05-29 06:39:01 -07:00
Yongqin Liu aea9e04fbf Add out of bound check for the index before do the update
Signed-off-by: Yongqin Liu  <liuyq0307@thundersoft.com>
2013-05-29 19:18:46 +08:00
minggo 53365b9e46 Merge pull request #2669 from frranck/master
adding norwegian language
2013-05-29 02:10:37 -07:00
Ricardo Quesada a219f9c520 CCConfiguration has format
CCconfiguration has a file format.
It has a data and metadata
2013-05-29 17:09:04 +08:00
minggo c862357b50 Merge pull request #2650 from varlucian/onentertransitionfinnished
OnEnterTransitionDidFinish was called twice when a node is added in onEnter
2013-05-29 01:53:37 -07:00
franck 3fab093f5b adding Norwegian language support 2013-05-29 10:16:22 +02:00
Jaroslaw Lewandowski 94eef4d235 Removed unused variable which caused Linux build to fail 2013-05-29 10:15:31 +02:00
Yongqin Liu f6b5208be5 CCLabelAtlas.cpp: add check for n when call setDirty
in CCLabelAtlas::updateAtlasValues, there is the case that n equal to 0,
so we need to check it before when call m_pTextureAtlas->setDirty(true) and do
other process.

Signed-off-by: Yongqin Liu <liuyq0307@thundersoft.com>
2013-05-29 10:45:47 +08:00
Lee, Jae-Hong e48553bc27 Delete ByteBuffer pointer and NULL check. 2013-05-29 10:52:45 +09:00
Ricardo Quesada ebb392ca8e CCConfiguration has format
CCconfiguration has a file format.
It has a data and metadata
2013-05-28 18:15:16 -07:00
Jaroslaw Lewandowski 3f7c506638 Ability to save/retrieve CCData into/from CCUserDefault 2013-05-29 01:06:41 +01:00
Jaroslaw Lewandowski 2999abed2b Explicitly initialising CCAcceleration structure to report zeros when run in device simulator 2013-05-29 00:02:36 +01:00
Lee, Jae-Hong c20e4f3700 Keep a previous text on Tizen CCEditBox. 2013-05-28 20:43:47 +09:00
Lee, Jae-Hong 5031aa1fd3 Encoding UTF-8 on Tizen CCEditBox and check empty string. 2013-05-28 20:04:37 +09:00
Michael Contento 026026e3af use onWindowFocusChanged(bool) instead of onResume()/onPause()
we should use onWindowFocusChanged(bool) to detect if the app is currently
visitible to the user or not. because onPause()/onResume() leads to false
positives on some android versions (e.g. Kindle Fire). if you lock those
devices, while the app running, everything is fine (onPause() is handled
properly). but as soon as you wake up the device, and the lock screen gets
visible, the app is resumed and the music is played (onResume() is
called to early).

this is a) not the best behaviour and b) such games will be rejected on the
samsung app store. onWindowFocusChanged(bool) is, like onPause()/onResume(),
available since API level 1 and it should be safe to simply switch.
2013-05-28 12:05:46 +02:00
minggo 98b1d95a74 modify ORGANIZATIONNAME 2013-05-28 18:04:42 +08:00
minggo 5f37e854c4 issue #2161: resolve conflict 2013-05-28 11:50:14 +08:00
minggo 6f624351b3 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ETC1-support 2013-05-28 11:36:05 +08:00
Yongqin Liu 56037a4939 CCTextureAtlas::updateQuad modify for the memcpy hot spot
change the place that call CCTextureAtlas::updateQuad method to
update the quads with pointer reference directly.

Signed-off-by: Yongqin Liu<liuyq0307@thundersoft.com>
2013-05-28 10:23:47 +08:00
minggo d6e547cd02 issue #2161:add CCTextureETC.cpp/.h into vs2010 project 2013-05-28 10:04:19 +08:00
Lucian Varlan a70569ff03 OnEnterTransitionDidFinish was called twice when a node is added in onEnter
Fix ported from cocos2d-iphone:
99b7bef880
2013-05-27 16:07:09 +03:00
minggo b038741d78 issue #2161: make linux,marmalade,native client,mac and emscripten project to include CCTextureETC.cpp 2013-05-27 15:06:43 +08:00
minggo beef61fc90 issue #2161: android supports ETC format now 2013-05-27 14:42:22 +08:00
James Chen 9f45c23222 Merge pull request #2641 from sergey-shambir/fix_linux_linkage
Linux port: added libX11 to linked libraries.
2013-05-26 18:41:43 -07:00
Lee, Jae-Hong 47fac0ed98 Implement CCEditBox for Tizen. (develop branch) 2013-05-26 20:40:13 +09:00
Sergey Shambir 06e6048537 Linux port: added libX11 to linked libraries.
Otherwise build fails on linux.
2013-05-24 23:36:21 +04:00
samuele3hu 0a1c12a2d3 issue #2103 add some overlapping file and delete some comment line 2013-05-24 13:45:06 +08:00
samuele3hu 338c7c8d67 issue #2103 add more test lua 2013-05-24 11:42:27 +08:00
Ben Ward dbcb4357e7 Fixed linebreaks on Mac OSX 2013-05-23 18:30:56 +01:00
James Chen 91a355cdb0 Updating cocos2dx/Android.mk. 2013-05-23 17:10:30 +08:00
James Chen 131d97a3d6 fixed #2217: Updating the comment for FPS display by using CCLabelAtlas. 2013-05-23 16:55:53 +08:00
James Chen 8448280ed3 issue 2217: Updating Make file and project configuration to add ccFPSImage.c. 2013-05-23 16:50:48 +08:00
James Chen d6a0af86eb fixed #2217: Updating logic when m_bIgnoreContentScaleFactor is enabled. 2013-05-23 16:12:04 +08:00
James Chen 42102bcf0a issue 2217: Removing unused fps_image png data. 2013-05-23 16:04:40 +08:00
James Chen 733b551bf6 issue #2217: Revert changes in CCPlatformMacro.h. 2013-05-23 15:59:45 +08:00
James Chen 22e259360e fixed #2217: Format codes in CCDirector::createStatsLabel. 2013-05-23 15:11:48 +08:00
James Chen bb11182279 fixed #2217: Using CCLabelAtlas instead of CCLabelTTF to show FPS. 2013-05-23 15:06:57 +08:00
Ricardo Quesada 8a34153a83 fixes compilation issues on Linux and Android 2013-05-22 18:11:37 -07:00
Ricardo Quesada ecf04e337c Fixes memory bug and adds support for loadConfigFile 2013-05-22 17:03:00 -07:00
Ricardo Quesada 836a61cd3e CCConfiguration extension (rewritten)
rewritten to prevent conflicts while rebasing
2013-05-22 13:00:34 -07:00
James Chen c1d85aaab2 Merge pull request #2611 from pyrasis/tizen_2.1
Update projects to Tizen 2.1 SDK.
2013-05-22 02:07:06 -07:00
Lee, Jae-Hong 220ac4982a Update projects to Tizen 2.1 SDK. 2013-05-22 16:55:18 +09:00
James Chen 5c506e2edc Merge pull request #2607 from pyrasis/background_foreground_tizen
Implementing foreground and background status for Tizen port.
2013-05-21 21:43:51 -07:00
Lee, Jae-Hong 4152850592 Remove EVENT_COME_TO_BACKGROUND notification. 2013-05-22 13:17:54 +09:00
James Chen b037a38821 Merge pull request #2610 from dumganhar/iss1644-dict2jsval-crash
fixed #1644: Passing NULL parameter to ccdictionary_to_jsval will cause crash, and improving performance for ccarray_to_jsval.
2013-05-21 20:59:14 -07:00
James Chen e21926edb8 fixed #1644: Passing NULL parameter to ccdictionary_to_jsval will cause crash. 2013-05-22 11:56:47 +08:00
minggo e07761688e Merge pull request #2591 from nicolasgramlich/patch-1
Updated .classpath of Android project to latest ADT 22 build tool compatibility.
2013-05-21 19:43:25 -07:00
James Gregory 6b8966e575 Disable debugging symbols for all Emscripten builds. -g is simply too slow to be a useful debugging tool. If someone needs it they should add it back in, but it is not sensible default behavior at this point. 2013-05-21 19:05:50 -07:00
minggo 2ac874dca1 Merge pull request #2608 from FlowerpotGames/CCLabelTTF-Const-Update
CCLabelTTF::enableShadow(…) const update
2013-05-21 18:39:32 -07:00
minggo d1a8f54113 Merge pull request #2609 from j4m3z0r/emscriptenate
Add Audio Support for Emscripten
2013-05-21 18:32:12 -07:00
Ed Bartley 719eb15326 Make shadowOffset parameter of CCLabelTTF::enableShadow(…) a const reference. 2013-05-21 15:42:26 -04:00
Lee, Jae-Hong d83ed86739 Implementing foreground and background status and modify CocosDenshion comment. 2013-05-21 22:48:51 +09:00
Lee, Jae-Hong 4b248d5f8c Delete Tizen 2.0 headers and libraries. 2013-05-21 21:52:10 +09:00
Lee, Jae-Hong 6f34c7cb46 Support Tizen 2.1 SDK. 2013-05-21 21:22:31 +09:00
minggo 0857fdd599 issue #2188:fix compiling error of iOS 2013-05-21 18:18:44 +08:00
minggo cc2b00e9fe Merge pull request #2573 from j4m3z0r/emscriptenate
Use browser font rendering instead of FreeType
2013-05-20 22:50:28 -07:00
James Gregory da7113a04f Implement audio for Emscripten using SDL. Still needs methods to release samples when we're done with them. 2013-05-20 20:09:56 -07:00
James Chen acef98a350 Merge pull request #2572 from pyrasis/tizen
fixed #2185: Cocos2d-x Tizen support.
2013-05-20 20:08:28 -07:00
minggo e7d9e09a44 Merge pull request #2586 from silverscania/master
Bug in previous modifications made to GL_UNPACK_ALIGNMENT
2013-05-20 18:59:03 -07:00
Lee, Jae-Hong 5faa5e92af Modify getWritablePath function. 2013-05-21 10:56:18 +09:00
Lee, Jae-Hong 6bb8d58d3a Update cocos2d project and use float.h 2013-05-21 10:32:34 +09:00
Lee, Jae-Hong 73590e57f6 Set relative include path. 2013-05-21 09:55:33 +09:00
Nicolas Gramlich cef2575180 Updated .classpath of Android project to latest ADT 22 build tool compatibility.
Changes correspond to: https://groups.google.com/forum/?fromgroups#!msg/adt-dev/epOfZbKPFdk/RbR2VYNQ5_8J
2013-05-20 14:39:25 -06:00
silverscania 1d23f1a2b4 The real cause of the problem for the texture corruption was when using textures with no alpha.
The function bitsPerPixelForFormat returns the wrong number for RGB_888.
2013-05-19 18:53:59 +03:00
silverscania 5adb4bc895 For some non power of two textures, even if the row alignment was 8, 4 or 2, setting this resulted in corruption.
See ddafa42850 (commitcomment-3243089) for texture example.
Fix by setting alignment to 1 for ALL non-PO2 textures.
2013-05-19 15:17:48 +03:00
silverscania 1973a52fbe Revert "Try to fix bugs that came up but just keeping the old parameters for row alignment: 4 or 1"
This was not the correct fix.
This reverts commit 110ea5a501.
2013-05-19 15:12:39 +03:00
silverscania 110ea5a501 Try to fix bugs that came up but just keeping the old parameters for row alignment: 4 or 1 2013-05-19 13:55:20 +03:00
James Gregory 391fb636fa Add a flag to indicate whether raw image data is pre-multiplied or not, and switch to using Emscripten's SDL implementation when loading images from file (much faster) 2013-05-17 17:11:52 -07:00
James Gregory 7cca63130c Pre-multiply text when rendered by Emscripten's SDL implementation (since HTML5 canvas is non-pre-multiplied). 2013-05-17 17:10:51 -07:00
James Gregory ae5454cffc Remove SDL code from texture cache, and move all image loading code to CCImage. 2013-05-17 17:09:28 -07:00
James Gregory 2bcbf5c2b8 Coordinates are already in terms of pixels -- no need to do content scaling 2013-05-17 17:08:46 -07:00
Ricardo Quesada ba12022134 Grid setProjection2D fix
It doesn't multiply it by the CC_CONTENT_SCALE_FACTOR().
Not needed since it is CCDirector::getWinSizeInPixels() already has it
calculated
2013-05-17 15:30:19 -07:00
James Gregory a1ff189854 Query the GL canvas for its width and height and use that rather than hardcoding it. Default the frame size to the whole canvas, and update the samples to use iPad resolution (1024x768). 2013-05-17 12:39:18 -07:00
Lee, Jae-Hong 900190e468 Replace tab to spaces. 2013-05-17 22:04:39 +09:00
James Gregory 95b5ce2e56 Remove freetype since it now works using Emscripten's SDL. 2013-05-16 17:34:33 -07:00
Lee, Jae-Hong 0ae6da81bd Include CCGL.h 2013-05-16 20:40:49 +09:00
Lee, Jae-Hong 43b11a73d6 Remove unused headers and defines. 2013-05-16 20:24:00 +09:00
Lee, Jae-Hong fb00de3e97 Implementing screen orientation function. 2013-05-16 20:17:11 +09:00
Lee, Jae-Hong e1cf030372 Change the default font path. 2013-05-16 20:16:57 +09:00
Lee, Jae-Hong 6072c9291f Adding libcocos2d.a project for Tizen. 2013-05-16 20:11:48 +09:00
Lee, Jae-Hong f47958356c Adding dependencies for libcurl.so 2013-05-16 20:09:23 +09:00
Lee, Jae-Hong 659e884009 Use CCImage.cpp from Linux implementation. 2013-05-16 20:07:31 +09:00
Lee, Jae-Hong e459129fac Move to rootstraps directory. 2013-05-16 20:06:25 +09:00
Lee, Jae-Hong 8915e90a36 Adding CCDevice.cpp for Tizen. 2013-05-16 20:05:04 +09:00
Lee, Jae-Hong 0ba2a82d35 Set return value. 2013-05-16 20:04:51 +09:00
Lee, Jae-Hong 434878c736 Delete libcurl.a because link error. Adding libcurl.so. 2013-05-16 20:04:06 +09:00
Lee, Jae-Hong 109e2feec8 Adding libcurl headers and x86 libraries for tizen. 2013-05-16 20:03:11 +09:00
Lee, Jae-Hong ce4663f851 Implementing file utils use with Osp. 2013-05-16 20:01:36 +09:00
Lee, Jae-Hong 704b8013fc Fix Assert bug. 2013-05-16 20:01:01 +09:00
Lee, Jae-Hong e51fe4f75e Define CC_ASSERT. 2013-05-16 19:59:38 +09:00
Lee, Jae-Hong d887b3cd84 Implementing getCurrentLanguage function. 2013-05-16 19:59:16 +09:00
Lee, Jae-Hong 0bd49de547 Implementing Animation Interval setting. 2013-05-16 19:58:46 +09:00
Lee, Jae-Hong b011bd2904 Implementing touch. 2013-05-16 19:58:14 +09:00
Lee, Jae-Hong d66abaa12c Implementing Termination. 2013-05-16 19:57:47 +09:00
Lee, Jae-Hong 3856c94416 Modify header define. 2013-05-16 19:57:17 +09:00
Lee, Jae-Hong ab8ede5ff8 Adding Osp Application, Osp Form Layer and implementing CCEGLView. 2013-05-16 19:55:26 +09:00
Lee, Jae-Hong 86bf779812 Adding third party headers and x86 libraries for Tizen. 2013-05-16 19:54:01 +09:00
Lee, Jae-Hong 58b181736d Adding platform code for Tizen. 2013-05-16 19:53:37 +09:00
Lee, Jae-Hong 27428dc5f4 Adding defines and enums for Tizen. 2013-05-16 19:49:16 +09:00
flamingo 3686107313 Update CCTexture2D.cpp
Fixed compilation error on MSVC compiler
2013-05-16 12:58:35 +04:00
minggo 1412eeefd1 Merge pull request #1893 from martell/mingw
Added Mingw-crt Support without breaking VS SDK
2013-05-15 23:30:43 -07:00
James Gregory d1922b6086 Add experimental (and currently disabled) code for using SDL to load texture data. If I can iron out the kinks, it should be a lot faster. 2013-05-15 20:22:43 -07:00
James Gregory bdbab7f5cf TTF rendering via SDL now seems to basically work. Not perfect yet, but seems to be about 3X faster on Chrome. 2013-05-15 20:21:30 -07:00
James Gregory 82f1a8e8ff Re-enable mouse-handling. 2013-05-15 20:21:02 -07:00
carlo morgantini a3f5238407 fix a warning caused by member variables initialization order in constructor 2013-05-15 16:37:08 -07:00
carlo morgantini fb2a73048d it now shares code between createTextBitmap and createTextBitmapShadowStroke (no more duplication) 2013-05-15 16:37:08 -07:00
carlo morgantini 4d3ed48905 initWithStringShadowStroke() renamed to initWithString() 2013-05-15 16:37:08 -07:00
carlo morgantini c9e875869e comment fixed 2013-05-15 16:37:08 -07:00
carlo morgantini 3c28048c14 fix alignent problem when rendering text with shadow 2013-05-15 16:37:08 -07:00
carlo morgantini 0ff33fd4f5 fix a problem with float stroke size 2013-05-15 16:37:08 -07:00
carlo morgantini 3b50ffe5ba Fix problem with CCLabelTTF + shadow and text alignment; also fontDefinition property names now are lowercase 2013-05-15 16:37:08 -07:00
carlo morgantini d77604b958 initWithStringAndTextDefinition() changed method's signature 2013-05-15 16:37:08 -07:00
carlo morgantini 04c890522d class renamed and moved to ccTypes.h 2013-05-15 16:35:25 -07:00
carlo morgantini ed981aee7e ccTextDefinition becomes CCTextDefinition 2013-05-15 16:29:33 -07:00
carlo morgantini bc9a74218c added a new utility for comparing 2 ccColor3b 2013-05-15 16:29:33 -07:00
carlo morgantini d9a53b3eb1 CCLabelTTF new interface for ccBuilder 2013-05-15 16:29:33 -07:00
carlo morgantini 9ba489bba4 new assert() added on unsupported platforms for CCLabelTTF and CCTexture2D 2013-05-15 16:29:33 -07:00
carlo morgantini 74441203cb stroke and shadow are implemented and supported only on iOS and Android for now 2013-05-15 16:29:33 -07:00
carlo morgantini fcea506fef fixed some text formatting issues 2013-05-15 16:29:33 -07:00
carlo morgantini 54347bf767 setFontTintColor renamed to setFontFillColor 2013-05-15 16:29:33 -07:00
carlo morgantini 7bc3ceb8c8 uses const ccColor & in the interface instead of ccColor& 2013-05-15 16:29:33 -07:00
carlo morgantini c727fa33c0 CCLabelTTF have now a tint, plus bug fixing and code clean up 2013-05-15 16:29:33 -07:00
carlo morgantini 221884f6d4 better CCTexture2D API for init texture with shadow and stroke 2013-05-15 16:29:32 -07:00
carlo morgantini fc846bb9ac label TTF stroke and shadow for Android 2013-05-15 16:29:32 -07:00
carlo morgantini 690d5968ca New stroke and shadows for Android 2013-05-15 16:12:43 -07:00
carlo morgantini dd9b4a8932 new shadow and stroke for CCLabelTTF 2013-05-15 16:12:43 -07:00
James Gregory ab2d94c040 First pass at using SDL to render fonts instead of FreeType. 2013-05-14 21:38:56 -07:00
James Gregory 0daa3adfd6 Emscripten changed ABI for .a files. Rebuild all deps, updating to current version. Switch Emscripten to incoming branch as it's not working on master right now. Added simple script for rebuilding deps in case it becomes necessary again. Switch builds to always use -g flag, per Emscripten's warnings. Undefine native client defines so that it builds (Emscripten switched to NaCl alignment, macro got defined as a side-effect). 2013-05-14 15:26:48 -07:00
James Gregory de1a6340da Add my hacky script to rebuild dependencies, in case this is needed again in the future. 2013-05-14 15:14:54 -07:00
James Chen 99664b5998 Merge pull request #2391 from sbc100/log_asserts
fixed #2152: Logging assert messages to the console and renaming CCScriptSupport::executeAssert to CCScriptSupport::handleAssert.
2013-05-13 19:56:28 -07:00
James Chen cdb3985f0d fixed #2151: Commenting a log in CCFileUtils::fullPathForFilename. 2013-05-13 21:48:25 +08:00
James Chen 8fa593a8fe fixed #2151: Custom font can't be loaded correctly if using full path of filename. 2013-05-13 19:12:37 +08:00
James Chen 4e3ff65707 Merge branch 'android_custom_font_fix' of git://github.com/DarraghCoy/cocos2d-x into iss2151-customttf 2013-05-13 18:40:14 +08:00
James Chen fa8daa2ebb Merge branch 'master' of https://github.com/metalgit92/cocos2d-x into metalgit92-master 2013-05-13 14:03:29 +08:00
minggo aa5e5661ce Merge pull request #2551 from silverscania/master
Fix for corrupted texture issue: https://github.com/cocos2d/cocos2d-x/issues/2550
2013-05-12 20:36:41 -07:00
minggo 3ebb61a09c Merge pull request #2543 from FlagellumDei/patch-1
centerWindow() fix
2013-05-12 19:44:15 -07:00
Xavier Arias 71df5706bd Added const to CCNode::getChildrenCount() 2013-05-12 20:45:41 +02:00
silverscania ddafa42850 Fix for wrong alignment using texture format sizes other than 4 bytes.
For example RGBA4444 is 2 bytes per pixel. A texture with width of 1 passes the previous power of 2 test, but the alignment value needs to be 2, not 4.
2013-05-12 18:08:33 +03:00
Xavier Arias Botargues 4d78d102dd Merge remote-tracking branch 'upstream/master' 2013-05-11 08:55:38 +02:00
James Chen e3e07b4c1e Fixing compilation errors for NaCl port. 2013-05-10 16:03:01 +08:00
James Chen 23f23be681 Bug fixes for Nacl port. 2013-05-10 16:02:12 +08:00
James Chen 8ebde4df7f Merge branch 'data-visitor' of https://github.com/dumganhar/cocos2d-x into iss2142-datavisitor 2013-05-10 15:54:47 +08:00
James Chen db464530fb fixed #2142: updating win32. 2013-05-10 15:46:24 +08:00
James Chen 42427634f2 fixed #2142: Adding datavisitor support for other platforms except win32. 2013-05-10 15:37:40 +08:00
James Chen cbafaf67a6 fixed #2142: Adding CCDataVisitor and Implementing CCPrettyPrinter, iOS port is ok. 2013-05-10 15:07:05 +08:00
Darragh Coy 032aed4499 Fix custom font loading on Android when using fonts that are in resource mapped directories/paths.
1: Use the CCFileUtils::fullPathForFilename function to lookup the resolved path for the font in the Android specific function, CCImage::getBitmapFromJava.

2: Remove a warning previously added in pull request 2422 (https://github.com/cocos2d/cocos2d-x/pull/2422) in CCFileUtils::fullPathForFilename in order to support change (1) above. If we pass just a system font name to CCFileUtils::fullPathForFilename such as 'Arial' (instead of a path) then it should just return 'Arial' and not generate a warning. We can't assume that when a path (or handle) given to CCFileUtils::fullPathForFilename isn't found within Cocos2dx that it doesn't exist or isn't valid. Depending on the platform there might be files or folders or handles that could be accessible to the app which might exist outside of the knowledge of Cocos2dx. The correct place to warn about missing resource files would be at the point where the resource loading itself fails; e.g if a texture or sound fails to load for example.
2013-05-09 14:29:42 +01:00
Attila Szilágyi 989b0a249c Fix centerWindow() when the taskbar is located along the top or left screen edge
centerWindow() will not center the window correctly when the taskbar is located along the top or left screen edge.
2013-05-09 14:13:24 +03:00
James Chen bc4bf29f51 Merge pull request #2526 from djh-/master
fixed #2140: The displayed color of CCDrawNode is incorrect when VAO is disabled.
2013-05-09 03:34:49 -07:00
minggo ee8ec25f6a Merge pull request #2541 from j4m3z0r/emscriptenate
Compile for Emscripten in asm.js mode
2013-05-08 18:53:35 -07:00
Xavier Arias 1c6c13b3e5 Added const to CCNode's getTag & getContentSize 2013-05-09 00:20:08 +02:00
James Gregory 7f03838639 Use asm.js by default. 2013-05-08 14:59:48 -07:00
Ed Bartley 8b55f1285f Fix ccCArray 2013-05-08 15:22:05 -04:00
minggo e5155eedca export ZipUtils 2013-05-08 11:45:27 +08:00
minggo 8e78f8a7eb Merge branch 'TexturePacker-SpriteSheetProtection' of https://github.com/FlowerpotGames/cocos2d-x into TexturePacker-SpriteSheetProtection 2013-05-08 10:32:26 +08:00
James Gregory 25bded7faf Now validates as asm.js: Disable HttpClient, pthread_cond_signal and eglReleaseThread in Emscripten. 2013-05-07 17:25:39 -07:00
James Gregory a33e2965af Add libwebp linkage (needed for asm.js validation) 2013-05-07 17:24:24 -07:00
Ed Bartley 3ff7e5871c Added function ccSetPvrEncryptionKey(…) to set the encryption key in a single function call.
Updated the TextureAtlasEncryptionTest to show how to use the ccSetPvrEncryptionKey(…) function.
Updated the notes and header docs for improved clarity.
2013-05-07 10:14:38 -04:00
danielhaaser 8acf2644b6 Fix incorrect colors in CCDrawNode. 2013-05-07 10:15:50 -03:00
James Chen 70472d558d Merge pull request #2430 from imbahom/master
Fix a typo in CCNode.cpp.
2013-05-07 01:48:31 -07:00
James Chen c45ebfa628 Merge pull request #2422 from brawsome/master
fixed #2127: Adding CCLOG before original path is returned in CCFileUtils::fullPathForFileName to aid in debugging.
The PR has fix two issues:
1) Added additional CCLOG to CCFileUtils::fullPathForFilename:
There's currently no way to be sure, from a calling function, that
fullPathForFilename has returned an invalid file path, which makes it
difficult to quickly track down missing, or incorrect file paths. Added
a CCLOG before the original string is returned to make debugging
missing or incorrect file paths easier.

2) Optmization to ccArrayGetIndexOfObject …
Optimized loop of ccArrayGetIndexOfObject to remove the overhead of 3
pointer dereferences per iteration, and pre-increment the int for
speed. If this function is called a lot, and with a large list, this
will result in a good performance win.
This can probably be done with just pointers, but I haven't taken the
time to validate all function calls to make sure it would be
appropriate. Though I can guarantee that if this worked fine before, it
will work fine with this change.
2013-05-07 01:40:57 -07:00
James Chen 288838ec92 Fixing compilation errors. 2013-05-07 15:51:58 +08:00
minggo 26bdc459d3 Merge pull request #2143 from CodeSnooker/master
Added Method to create a CCMenuItemToggle from a CCArray with a target selector
2013-05-07 00:26:56 -07:00
James Gregory 0630e15475 Merge remote-tracking branch 'origin/master' into emscriptenate 2013-05-06 23:56:16 -07:00
minggo d58f21dc76 Merge pull request #2521 from minggo/emscriptenate
fix conflict of #2050
2013-05-06 23:51:38 -07:00
James Chen eb936b0feb Merge pull request #2522 from dumganhar/fix-building-error
Fix compilation errors for linux port.
2013-05-06 23:39:18 -07:00
James Chen 2418e72a0e Fix compilation errors for linux port. 2013-05-07 14:36:01 +08:00
minggo 1166a02e13 resolve conflict for #2505 2013-05-07 14:31:00 +08:00
minggo 90b8dfd383 Merge pull request #2504 from wagaf-d/ccpchanges
Move ccpX functions to CCPoint methods and operators
2013-05-06 23:22:21 -07:00
minggo ea5d7bc5ad Merge pull request #2361 from tiantian20007/dictStuff
Implement CCDictionary::writeToFile();
2013-05-06 23:17:11 -07:00
James Gregory c7ac6b9d01 Add libjpeg linkage. 2013-05-06 22:28:13 -07:00
Adrien Béraud 16d2b5a957 Assert that the user does not divide by 0 in CCPoint and CCSize 2013-05-07 14:58:43 +10:00
Adrien Béraud ca4c2edc29 Clarify CCPoint::rotate & unrotate documentation 2013-05-07 14:36:17 +10:00
James Gregory ce2d97c848 Simplify Emscripten makefile a little. 2013-05-06 21:30:03 -07:00
James Gregory a285117aca Disable unsafe GL opts, enable -O2 2013-05-06 21:29:45 -07:00
James Gregory 7b04e6b0e7 Implement primitive drawing methods for Emscripten 2013-05-06 21:29:44 -07:00
James Gregory 92e4c76f20 Move GL server-side buffer code into a separate class and use multiple inheritance to deploy only to classes that need it. 2013-05-06 21:29:44 -07:00
James Gregory fa77e6ede2 Switch to using GL_DYNAMIC_DRAW. 2013-05-06 21:29:44 -07:00
James Gregory 29cfe512a3 Remove debug print statement 2013-05-06 21:29:44 -07:00
James Gregory 41b5cfebb6 Add warning messages if any of the raw primitive drawing methods are used (they seem not to be, in pratice). 2013-05-06 21:29:43 -07:00
James Gregory 36fc2ecf99 Get CCGrid to work. 2013-05-06 21:29:43 -07:00
James Gregory f386272486 Add method to CCNode class to allow uploading data to GPU. Call it from CCSprite. 2013-05-06 21:29:43 -07:00
James Gregory 9ae67ff78a Move GL server-side buffer code into a separate class and use multiple inheritance to deploy only to classes that need it. 2013-05-06 21:25:47 -07:00
James Gregory ff1e0aefa0 Switch to using GL_DYNAMIC_DRAW. 2013-05-06 21:25:47 -07:00
James Gregory 0c8f7dd608 Enable texture caching with emscripten. 2013-05-06 21:23:06 -07:00
James Gregory 235b80e7f8 Get CCGrid to work. 2013-05-06 21:22:34 -07:00
James Gregory 7a3875b99d Point Emscripten root to be the external referenced by the tree. 2013-05-06 21:17:22 -07:00
James Gregory 2b8efda0f4 Use floats instead of doubles for Chipmunk. 2013-05-06 21:17:22 -07:00
James Gregory de9df010c3 Enable texture cache on Emscripten. Not sure yet if this is the best balance, since we're both short on memory *and* compute time. 2013-05-06 21:17:22 -07:00
James Gregory 062a5eefd8 Move GL server-side buffer code into a separate class and use multiple inheritance to deploy only to classes that need it. 2013-05-06 21:13:21 -07:00
James Gregory 6c828bbe4f Switch to using GL_DYNAMIC_DRAW. 2013-05-06 21:13:21 -07:00
James Gregory 809b77d632 Get CCGrid to work. 2013-05-06 21:08:28 -07:00
James Gregory 4fb6b406ce Add libtiff to Emscripten builds, plus some build flags. 2013-05-06 21:00:39 -07:00
James Gregory 735280572a Add libtiff build -- build with straight emconfigure, emmake, with a troublesome assert removed (assert(sizeof(uint64) == 8)). 2013-05-06 21:00:39 -07:00
James Gregory 82c6f68593 Set orientation to 0 for Emscripten, thus avoiding a segfault. 2013-05-06 21:00:38 -07:00
James Gregory 4d4b638531 Switch to O1 for now. 2013-05-06 21:00:38 -07:00
James Gregory d529287cfa Remove LOG prefixes from emscripten makefiles 2013-05-06 21:00:38 -07:00
James Gregory 3829a5741b Fix the ordering of vertex attributes for CCProgressTimer. 2013-05-06 21:00:38 -07:00
James Gregory 130647d97f Implement primitive drawing methods for Emscripten 2013-05-06 21:00:38 -07:00
James Gregory 16e9598a54 Enable -O2 optimization now that Emscripten seems to succeed. 2013-05-06 20:59:50 -07:00
James Gregory 5b8494199e Rebuild libfreetype without references to my home dir in it. 2013-05-06 20:59:50 -07:00
James Gregory 3077190e29 Add note on origin of libxml binary. 2013-05-06 20:59:49 -07:00
James Gregory 81ded66016 Don't set animation interval on emscripten builds since that is driven by the request frame API. 2013-05-06 20:59:49 -07:00
James Gregory 9d775d136b Add libxml2 build for Emscripten. 2013-05-06 20:59:49 -07:00
James Gregory e3dc808a7c Remove redundant -l flags from emscripten build -- it doesn't have fontconfig, and GL stuff is linked in automatically. 2013-05-06 20:59:48 -07:00
James Gregory 5bac7b52ac Move GL server-side buffer code into a separate class and use multiple inheritance to deploy only to classes that need it. 2013-05-06 20:59:48 -07:00
James Gregory a9c8d99a4c Switch to using GL_DYNAMIC_DRAW. 2013-05-06 20:59:48 -07:00
James Gregory 872df86f84 Remove debug print statement 2013-05-06 20:59:48 -07:00
James Gregory 3546534a66 Switch makefile over to using Emscripten headers for freetype. 2013-05-06 20:59:48 -07:00
James Gregory 8a9586fd9d More client side buffer fixes. 2013-05-06 20:59:48 -07:00
James Gregory 91ea64db09 More client side buffer fixes. 2013-05-06 20:59:48 -07:00
James Gregory 9352b8b359 More client side buffer fixes. 2013-05-06 20:59:48 -07:00
James Gregory f35e32d158 Add warning messages if any of the raw primitive drawing methods are used (they seem not to be, in pratice). 2013-05-06 20:59:48 -07:00
James Gregory 5295202081 Add freetype2 headers that match the .a we're using. 2013-05-06 20:59:47 -07:00
James Gregory d52aa420e8 Switch to slot-based GL buffer loading code for CCSprite. 2013-05-06 20:59:47 -07:00
James Gregory 87daf9d3eb Add missing Makefile reference to file utils for Emscripten. 2013-05-06 20:59:47 -07:00
James Gregory 764dffc822 Increase heap size for Emscripten binaries, add in missing linkages. 2013-05-06 20:59:47 -07:00
James Gregory 5138fb66fd Add pre-build dependencies for Emscripten libpng, libz. 2013-05-06 20:59:47 -07:00
James Gregory 7d563a818a Hack: use 800x500 resolution for window for emscripten so that mouse roughly lines up. 2013-05-06 20:59:47 -07:00
James Gregory 19c6a50d50 Enable texture caching with emscripten. 2013-05-06 20:59:46 -07:00
James Gregory a1c628f80a Fix Motion streak client side buffers 2013-05-06 20:58:46 -07:00
James Gregory edcd0f12e4 Add platform files for Emscripten. 2013-05-06 20:58:46 -07:00
James Gregory 9500448f87 Get CCGrid to work. 2013-05-06 20:58:46 -07:00
James Gregory 089a47d937 Add method to CCNode class to allow uploading data to GPU. Call it from CCSprite. 2013-05-06 20:58:45 -07:00
James Gregory aa2739a109 Update build process for HelloCpp to build .js and .data files separately, pulling both in from index.html 2013-05-06 20:58:45 -07:00
James Gregory 77e9f4902e Build fixes for emscripten, add linkage to libfreetype.a 2013-05-06 20:58:45 -07:00
James Gregory 1d307d676d Remove freetype source and add libfreetype.a as built by the Emscripten test-suite.
Revert "Add freetype 2.4.11 to repo"

This reverts commit 418906d2612b59ead6826d8395b69168bdff0ca4.
2013-05-06 20:58:45 -07:00
James Gregory 955ba1bfd3 ifdef tango around some symbols that aren't defined in Emscripten (nor a bunch of other platforms, it seems). 2013-05-06 20:58:43 -07:00
James Gregory 4f56f93269 Add #defines for Emscripten platform 2013-05-06 20:58:43 -07:00
James Gregory c45e5797cf Add Makefiles for Emscripten + Emscripten external 2013-05-06 20:58:02 -07:00
minggo 80dfd4d493 Merge pull request #2407 from sergey-shambir/attribute_format
Added __attribute__(__format__()) for CCLog and CCString
2013-05-06 20:06:52 -07:00
Sam Clegg 4f6de1bcad Rename CCScriptSupport::executeAssert -> CCScriptSupport::handleAssert
Also remove the first "cond" argument, since it is always false.
2013-05-06 12:25:13 -07:00
Sam Clegg e699919bc6 Log assert messages
Now, assert messages as visible in the trace output
as well as the line number of condition that failed.
2013-05-06 12:25:13 -07:00
Adrien Béraud 6a5559da7f Check for 0 length in CCPoint::normalize() 2013-05-07 03:15:28 +10:00
Adrien Béraud f71798a35b Check for 0 length in CCPoint::normalize() 2013-05-07 02:59:38 +10:00
Adrien Béraud 49474f5194 documentation 2013-05-07 02:53:13 +10:00
Ed Bartley 040e6fc5b9 Promote global functions and variables for PVR decryption to ZipUtils class.
Rename PVR decryption functions and variables to better fit in the Cocos2DX framework.
Improve log error notes.
Update TextureAtlasEncryptionTest to match revised function call in ZipUtils.
Update ccSetPvrEncryptionKeyPart documentation to clarify that encryption is never 100% secure.
2013-05-06 10:04:45 -04:00
minggo d395d26e1d Merge pull request #2417 from sergey-shambir/disable_copy
Added CC_DISABLE_COPY macro
2013-05-06 03:02:48 -07:00
minggo bbf0f9d1bd Merge pull request #2513 from savdalion/const-methods
Added const methods for classes - purer code!
2013-05-05 23:55:37 -07:00
James Chen fead37eab3 fixed #2105: Adding Travis build support for linux and NaCl. 2013-05-06 10:55:39 +08:00
Adrien Béraud 3661e34695 Bug fix: width and height reversed in CCSize operators 2013-05-05 19:51:44 +10:00
Romain Tisserand d2690d8942 Fix iOS 4.3 JPEG loading (darken picture, alpha issue) 2013-05-04 19:14:23 +02:00
Adrien Béraud 637cc1a9ed CCPoint::getDistance() implemented, CCPoint::length() renamed to getLength(), bug fixes 2013-05-05 02:58:46 +10:00
minggo 1a0db3749e Merge pull request #2496 from mchinen/mchinensedit
Fix missing protocol method warning for iOS 6.0 addition
2013-05-04 08:55:07 -07:00
savdalion 5f549dd011 Added const modifier for classes CCArray, CCObject - fine code! 2013-05-04 15:05:06 +03:00
Adrien Béraud 6fb586028e Revert unrelated change commited by mistake 2013-05-04 17:20:59 +10:00
Adrien Béraud b9fe35901a Moved most CCPointExtension functions to CCPoint OO-equivalents 2013-05-04 17:18:22 +10:00
Ricardo Quesada ea30d21799 updates Xcode project to detect more warnings 2013-05-03 11:59:44 -07:00
Michael Chinen d47759cc32 EAGLView.mm: fix indent 2013-05-03 19:46:58 +09:00
Adrien Béraud b34dc25346 Cleaner constructors and overloads for CCSize; Cross-assignement and conversion constructors between CCPoint and CCSize. 2013-05-03 13:24:52 +10:00
Adrien Béraud b627cd4674 overloading operators +-*/ in CCPoint 2013-05-02 15:13:03 +10:00
Adrien Béraud 9fb0081add direct constructor for CCPoint 2013-05-02 14:59:50 +10:00
Darragh Coy 212feb8d8c Add CCDirector::popToSceneStackLevel(int level)
This replicates a change made to cocos2d-iphone in the following commit:
59c5272bff

The cocos2d-iphone change was originally discussed in the following pull request:
http://github.com/cocos2d/cocos2d-x/pull/2210
2013-04-30 23:33:22 +01:00
Michael Chinen be2f20e213 Fix missing protocol method warning for iOS 6.0 addition 2013-05-01 00:35:17 +09:00
minggo d1506326ba Merge pull request #2484 from sergey-shambir/bit_more_verbose
Logging: More verbose output in removeChildByTag and getActionByTag
2013-04-29 08:06:53 -07:00
minggo 1a598a8c68 update version 2013-04-28 13:48:18 +08:00
Sergey Shambir 44a6be80d2 More verbose logging in removeChildByTag and getActionByTag
Tags are often hardcoded, so tag value will be useful to detect problem.
2013-04-27 23:15:00 +04:00
tiantian 2ba5035e5a Make sure XMLDocument is deleted; Code clean up; Add test; 2013-04-28 00:36:37 +08:00
minggo cb8f069ae6 Merge pull request #2466 from Weeds/fix-loadAsyncImage
don't use named semaphore for syncing image loading thread
2013-04-27 08:47:48 -07:00
Andre Rudlaff 43615fe0a7 don't use named semaphore in HttpClient
this patch removes using named semaphores for Http requests.
This also destroys the mutexes from CCTextureCache when the thread is
destroyed
2013-04-27 17:44:33 +02:00
James Chen edc8444ca4 Updating blackberry project configurations. 2013-04-27 14:07:54 +08:00
Andre Rudlaff 5e12d9f8fe don't use named semaphore for syncing image loading thread
Named semaphores are unique across process bounds, therefore a semaphore
left in an invalid state may cause locks on other processes.
The code has been exchanged by using pthread mutex and condition variables
2013-04-26 18:55:36 +02:00
Ed Bartley f89d39953e Add PVR.CCZ encryption support to ZipUtils based upon http://www.codeandweb.com/texturepacker/contentprotection
Add sample to TestCPP.
2013-04-25 13:40:49 -04:00
James Chen d1afe6cfa6 Fixing a bug in CCFileUtilsIOS::isFileExist(). 2013-04-25 22:02:20 +08:00
James Chen 93a8b60111 If file path is an empty string, return false directly in CCFileUtils::isFileExist. 2013-04-25 21:51:13 +08:00
Ed Bartley b2b10ba5f7 CCLayerColor::_realOpacity is not set in ::initWithColor(…) causing unexpected behavior if a ::runAction(CCFadeTo::create(…)) applied to the LayerColor. 2013-04-25 10:32:03 +08:00
Andrew Goulding d2ca2a4d10 Optmization to ccArrayGetIndexOfObject
Optimized loop of ccArrayGetIndexOfObject to remove the overhead of 3
pointer dereferences per iteration, and pre-increment the int for
speed. If this function is called a lot, and with a large list, this
will result in a good performance win.

This can probably be done with just pointers, but I haven't taken the
time to validate all function calls to make sure it would be
appropriate. Though I can guarantee that if this worked fine before, it
will work fine with this change.
2013-04-25 12:18:40 +10:00
imbahom 72ad9fd701 Update CCNode.cpp
注释错误
2013-04-23 21:44:24 +08:00
Andrew Goulding 3c6bb725e7 Added additional CCLOG to CCFileUtils::fullPathForFilename
There's currently no way to be sure, from a calling function, that
fullPathForFilename has returned an invalid file path, which makes it
difficult to quickly track down missing, or incorrect file paths. Added
a CCLOG before the original string is returned to make debugging
missing or incorrect file paths easier.
2013-04-23 06:24:12 +10:00
minggo d89792fdc6 fixed #2073: fix memory leak in CCUserDefault 2013-04-22 16:43:05 +08:00
Sergey Shambir 41f5538ff4 Added CC_DISABLE_COPY macro 2013-04-20 15:13:19 +04:00
Sergey Shambir 3ae98978d4 Added CC_FORMAT_PRINTF to CCString
Added for CCString::initWithFormat() and CCString::createWithFormat().
Fixed warnings.
2013-04-19 14:00:16 +04:00
Sergey Shambir 5541816ef6 Fixed GCC warning on narrowing conversion 2013-04-19 12:09:26 +04:00
Sergey Shambir e5b2f300f9 Added CC_FORMAT_PRINTF(x,y) macro to warn on CCLog() format errors
Uses printf format. Enabled for GCC and clang.
2013-04-19 11:54:08 +04:00
James Chen d37a43e100 Merge pull request #2398 from lgb/float_comparison_issue
fixed #1935: Float comparison must not use "==" in the equal function of CCPoint and CCSize, we should compare float number by using epsilon and absolute difference.
2013-04-18 19:44:17 -07:00
James Chen ec50d34622 fixed #2068: Tab ~> 4 spaces. 2013-04-19 09:59:08 +08:00
James Chen 9ecaacf59b fixed #2068: Updating source format. 2013-04-19 09:55:29 +08:00
James Chen b91c5f099c fixed #2068: Fixing a compilation error on win32 since "•" couldn't be recognized by vs compiler. 2013-04-19 09:49:55 +08:00
James Chen 861e8e42f7 Merge branch 'master' of https://github.com/MarcelBloemendaal/cocos2d-x into MarcelBloemendaal-master 2013-04-18 16:21:17 +08:00
James Chen 612a8a309f Merge pull request #2193 from Weeds/feature-screen-dimensions
fixed #2065: Adding kResolutionFixedHeight and kResolutionFixedWidth resolution policy.
2013-04-18 00:31:13 -07:00
minggo 724402750b Merge pull request #2390 from scoyo/master
Fix for spaces at the beginning of wrapped lines
2013-04-17 19:10:19 -07:00
Jaroslaw Lewandowski 20e102bc46 Fixed setAccelerometerInterval signature in setAccelerometerIntervalJNI function. 2013-04-18 01:27:33 +01:00
Oleg Baluk 271f90e744 compare using epsilon and absolute difference 2013-04-18 02:16:49 +04:00
Kristiaan De Jongh 81e4178a42 fix for spaces when wrapping 2013-04-17 13:09:48 +02:00
James Chen 63ce8adfad fixed #2059: Fix complication errors on Android. 2013-04-17 17:05:39 +08:00
James Chen ddd6d9d155 fixed #2059: cc.FileUtils.getInstance().getStringFromFile(filename) doesn't return a whole string. 2013-04-17 16:08:48 +08:00
minggo 72f1fadca2 Merge pull request #2380 from NatWeiss/patch-2
Properly resets the tile's Y flipping
2013-04-17 00:42:08 -07:00
minggo 78d3c7f048 fixed #1613:not reload resources on Android platform after return from background 2013-04-17 15:34:57 +08:00
James Chen e07d11d1e2 Merge pull request #2381 from lgb/blackberry-compile-fix
fix compilation error in cocos2dx for BlackBerry PlayBook
2013-04-16 22:00:08 -07:00
James Chen 694c47f5d6 Merge pull request #2382 from wedteam/keypad-support
fixed #2057: [JSB] Adding response for back and menu keypad event for Android.
2013-04-16 21:56:37 -07:00
James Chen 1eb79530c6 fixed #1847: -DCC_ENABLE_BOX2D_INTEGRATION ~> -DCC_ENABLE_BOX2D_INTEGRATION=1,
-DCC_ENABLE_CHIPMUNK_INTEGRATION ~> -DCC_ENABLE_CHIPMUNK_INTEGRATION=1.
2013-04-17 12:49:25 +08:00
akira_cn e1f9e1a300 update keypad support 2013-04-17 10:40:46 +08:00
NatWeiss f875366cc6 Properly resets the tile's Y flipping
This bug caused many tiles to be Y flipped if only one tile was actually intended to be flipped.
2013-04-16 15:01:22 -07:00
Oleg Baluk af71b881df fix wrong buffer name 2013-04-17 01:59:23 +04:00
tianTian 9a04eee8d1 do it atomically; 2013-04-16 12:38:53 +08:00
tianTian 91ddfe7382 Add support for CCDictionary contains CCArray; 2013-04-16 12:34:09 +08:00
Sam Clegg ffb7360e46 Enable easy swithing between Box2D and chipmunk in linux and nacl
The ENABLE_BOX2D/ENABLE_CHIPMUNK defines were previously
hardcoded in the Makefiles.  Now you get chipmunk by default
on both platforms and can enble Box2D by setting USE_BOX2D in
your environment.

Also remove erroneous -D__CC_PLATFORM_FILEUTILS_CPP__ and
-D__CC_PLATFORM_IMAGE_CPP__ from linux Makefiles.  These should
never be defined globally like this.
2013-04-15 07:35:50 -07:00
Sam Clegg 87f57d6ca6 Fix CCPhysicsSprite getPosition variants
CCPhysicsSprite was overriding only some of the getPosition
methods on a node resulting in, for example, getPositionX
and getPositionY not working for physics nodes.

This change also makes this overloads shared between box2d
and chipmunk implementations.
2013-04-15 07:35:49 -07:00
Marcel Bloemendaal 76b222978c Changed some property names to match conventions.
Changed m_pSecureTextEntry to m_bSecureTextEntry and renamed
getSecureTextEntry to isSecureTextEntry
2013-04-15 09:11:04 +02:00
James Chen bfa766f705 Merge pull request #2356 from MarkEHenderson/master
Fix variable initialization in SpriteBatchNode and LabelBMFont to allow JS extension
2013-04-14 22:37:46 -07:00
James Chen ca2f203947 Merge pull request #2343 from Yodesoft/master
fixed #2053: [Linux] Setting writable path to "<user's home>/.config/<app name>".
2013-04-14 20:10:23 -07:00
James Chen 84b4c5ac2b fixed #2051: Comment update, int ~> intptr_t. 2013-04-14 16:05:54 +08:00
James Chen ea78ee9bb7 fixed #2051: TestCpp/ExtensionsTest/CocosbuilderTest crashes under x86_64 target. 2013-04-14 16:00:50 +08:00
James Chen 2757962748 Merge branch 'master' of https://github.com/billy1380/cocos2d-x into billy1380-master 2013-04-14 14:49:02 +08:00
tianTian b7f0b2a8e0 Use CCLOG instead of CCLog; 2013-04-13 18:20:17 +08:00
tianTian 96359950cf Implement CCDictionary::writeToFile();
Use NSDictionay to do the job for iOS and Mac, and using tinyxml2 for other platform;
2013-04-13 16:55:24 +08:00
tianTian edf1e53d2d fix syntax error; 2013-04-13 15:18:54 +08:00
Mark Henderson 9c82c39978 remove duplicate default variable definition 2013-04-12 10:11:26 -07:00
billy1380 493d1d90ed fixed a bug that was causing x86_64 tests to crash while loading
ccbuilder files
2013-04-12 14:37:28 +01:00
Mark Henderson 038a04c05b Fixing SpriteBatchNode and LabelBMFont to prevent error when release is called without calling init 2013-04-11 15:02:09 -07:00
yodesoft 5952597c1a Set writable path to XDG_CONFIG_HOME if it exists. 2013-04-11 09:20:25 +08:00
yodesoft cda864b597 Read app name from /proc/self/exe 2013-04-11 08:58:48 +08:00
yodesoft db5df829fb Restore codes of init m_strDefaultResRootPath 2013-04-10 18:39:01 +08:00
yodesoft 85c932112f Merge remote-tracking branch 'upstream/master' 2013-04-10 17:54:50 +08:00
James Chen 862d4d6316 Merge pull request #2195 from folecr/androidlinkerflags
fixed #2047: Clean up linked libraries for Android.
2013-04-10 00:53:00 -07:00
James Chen 32406efec2 Merge branch 'newlines_in_cclog' of https://github.com/sbc100/cocos2d-x into sbc100-newlines_in_cclog
Conflicts:
	cocos2dx/proj.linux/cocos2dx.mk
2013-04-10 14:17:23 +08:00
James Chen 68867b8798 Merge pull request #2212 from rogerzanoni/linux_link
fixed #2044: Fix linux build, libpthread and libGL libraries need to be linked on linux.
2013-04-09 21:50:54 -07:00
yodesoft e193dbc4cf Linux: Set writable path to "<user's home>/.config/<app name>" 2013-04-10 11:45:55 +08:00
minggo a0dc39ca38 fixed #2034:use previous path to get UserDefault.xml 2013-04-10 11:39:01 +08:00
yodesoft d03b95ca46 Merge remote-tracking branch 'upstream/master'
Conflicts:
	cocos2dx/platform/linux/CCFileUtilsLinux.cpp
2013-04-10 11:16:04 +08:00