Commit Graph

1448 Commits

Author SHA1 Message Date
boyu0 76e05ee802 Merge https://github.com/cocos2d/cocos2d-x into 2345 2013-07-18 17:47:43 +08:00
James Chen bf45fa86fe Merge pull request #3176 from dumganhar/iss2413-overload-virtual
closed 2413: Warning fixes for overload virtual functions.
2013-07-18 00:33:53 -07:00
James Chen 8176f2f178 issue #2404: Fixing wrong replacement of shape.m_Vertex2F. shape.m_Vertex2F --> shape.m_vertex2 2013-07-18 14:48:18 +08:00
boyu0 70140bb4cb refactor CCImage and CCTexture2D 2013-07-17 17:12:04 +08:00
James Chen d6f713a31b Merge branch 'sanityzing_code' of https://github.com/ricardoquesada/cocos2d-x into ricardoquesada-sanityzing_code
Conflicts:
	samples/Cpp/TestCpp/Classes/Box2DTest/Box2dTest.h
2013-07-17 17:06:47 +08:00
James Chen f4edc7a922 closed #2413: Warning fixes for overload virtual functions. 2013-07-17 16:25:13 +08:00
James Chen e7452bc912 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2407-class-order 2013-07-17 14:36:55 +08:00
James Chen c31e8a8afc issue #2407: Updating SpriteTest.cpp, Don't hide virtual override function. 2013-07-17 14:33:15 +08:00
James Chen b6fda7bf7c issue #2407: Removing unused codes in Box2dTest.h 2013-07-17 14:32:38 +08:00
James Chen d3bf9935cd Merge pull request #3166 from dumganhar/iss2410-blackscreen-android
Merge PR https://github.com/cocos2d/cocos2d-x/pull/3117
2013-07-16 23:25:01 -07:00
James Chen 56419b9e90 issue #2410: [Android] Adding listener for CCDrawNode when application resume from background.
Reset the order of reloading shaders and textures in main.cpp.
2013-07-17 12:53:30 +08:00
Ricardo Quesada 5d499d351d Some more changes to make the code more c++ friendly:
- nodeToParentTransform -> getNodeToParentTransform() (the same for its friends)
   - Deprecates the old methods
   - adds 'consts' to those methods
- boundingBox() -> getBoundingBox()
   - the new one is const
   - Deprecates the old method.
- Adds overrides keywords in CCNodeRGBA and CCArmature
- AffineMatrix are mutables
2013-07-16 18:16:04 -07:00
James Chen 80590dcfc1 Merge pull request #3132 from samuele3hu/ScriptHandler
issue 2377:Add scriptHandlerMgr to manager lua script handler
2013-07-16 02:40:50 -07:00
samuele3hu 596eb9df3e issue #2377:Modify tojs/cocos2dx.ini and a function name 2013-07-16 16:45:57 +08:00
James Chen 510b29a2ff Merge branch 'android-textures-fix' of https://github.com/jotel/cocos2d-x into shared-codes
Conflicts:
	cocos2dx/textures/CCTextureCache.cpp
2013-07-16 16:33:02 +08:00
James Chen b543de648c [iOS, Mac]Adding jsb_deprecated.js to resource folder for JSB projects. 2013-07-16 15:35:13 +08:00
James Chen f09cf35dba Updating JS-test to the latest version. 2013-07-16 15:31:23 +08:00
samuele3hu 241c01bec3 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ScriptHandler 2013-07-16 14:47:46 +08:00
James Chen 13e939b55e Merge pull request #3157 from ricardoquesada/override_love
closed 2407: Adds more readability to the class internals.
2013-07-15 22:05:33 -07:00
samuele3hu 1761669832 issue #2377:Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ScriptHandlerMgr 2013-07-16 12:47:40 +08:00
James Chen b11000908e Merge pull request #3155 from pktangyue/patch
issue #2406: Override updateDisplayedColor and updateDisplayedOpacity method in Scale9Sprite class.
Resolved issue: Color and Opacity of Scale9Sprite will not be changed when it's added to NodeRGBA and run with FadeIn/Out actions.
2013-07-15 19:40:29 -07:00
James Chen a36a4bf19b issue2405: Adding jsb_deprecated.js for the compatibility of deprecated variables and methods. 2013-07-16 10:02:02 +08:00
samuele3hu c955a559bf issue #2377:Del register/unregister function in .cpp and .h files 2013-07-16 09:55:06 +08:00
Ricardo Quesada 9958e0d7f9 Adds more readability to the class internals.
Changes:
  - creator (static) methods, and singleton methods (static) are always at the top of the class
  - Constructors, destructros, and init methods comes next
  - Then the instance methods for the class
  - Then the overriden methods
  - and finally the ivars

Also, overriden methos have the "override" context keyword
2013-07-15 12:43:22 -07:00
pktangyue 6bb2d64f19 add S9CascadeOpacityAndColor test 2013-07-15 20:13:30 +08:00
minggo 93e75bad9f Merge pull request #3154 from minggo/add-deprecated-header
Add deprecated header
2013-07-15 03:20:32 -07:00
James Chen 759831c1d8 issue #2397: Application::sharedApplication --> Application::getInstance. 2013-07-15 16:24:42 +08:00
minggo eada29ee40 issue #2404:created CCDprecated.h and move all global functions and variables into it 2013-07-15 16:14:26 +08:00
samuele3hu 80a6811f9f Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ScriptHandler 2013-07-15 10:39:08 +08:00
samuele3hu 51c3ced4ba issue #2377:Modify the ScripthandlerMgr struct and modify some lua test samples 2013-07-15 10:38:16 +08:00
James Chen 4b2165e648 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into socketio 2013-07-13 19:24:41 +08:00
James Chen 1bdb8f1bb2 Adding SocketIO test for iOS and Mac projects. 2013-07-13 19:24:09 +08:00
James Chen b5ca0b4ed5 Fixing warnings in SocketIOTest.cpp. 2013-07-13 19:21:31 +08:00
minggo 6abe6fce78 closed #2393: fix conflicts 2013-07-12 18:04:32 +08:00
minggo 58fe3c7563 closed #2393: fixed conflicts 2013-07-12 15:07:44 +08:00
minggo 5d9fea1416 issue #2393:mark PointZero RectZero and SizeZero as deprecated 2013-07-12 14:47:36 +08:00
James Chen 33c37f5f9d issue #2397: CCTextureCache:sharedTextureCache --> CCTextureCache:getInstance. 2013-07-12 14:44:24 +08:00
James Chen 4a7e884de8 issue #2397: UserDefault::sharedUserDefault() --> UserDefault::getInstance(), UserDefault::purgeSharedUserDefault() --> UserDefault::destroyInstance(); 2013-07-12 14:34:57 +08:00
minggo 15096b0716 issue #2393:mark CCPointMake CCSizeMake CCRectMake as deprecated 2013-07-12 14:30:26 +08:00
James Chen f8cd252c5c issue #2397: sharedNotificationCenter --> getInstance 2013-07-12 14:17:42 +08:00
James Chen 6038d69183 issue #2397: sharedSpriteFrameCache --> getInstance, purgeSharedSpriteFrameCache --> destroyInstance. 2013-07-12 14:12:58 +08:00
minggo bb758df0d0 issue #2393:mark ccp as deprecated 2013-07-12 14:11:55 +08:00
James Chen 41957f06c9 issue #2397: sharedAnimationCache --> getInstance. 2013-07-12 13:54:56 +08:00
James Chen 1f8e852020 issue #2397: Shader::sharedShaderCache() --> Shader::getInstance(). 2013-07-12 13:40:01 +08:00
James Chen 2c1b26acf8 issue #2397: EGLView::sharedOpenGLView() --> EGLView::getInstance() 2013-07-12 13:11:21 +08:00
James Chen a678d12615 issue #2397: FileUtils::sharedFileUtils --> FileUtils::getInstance() for all platforms 2013-07-12 12:03:39 +08:00
James Chen 88a28b041e issue #2397: Director::sharedDirector --> Director::getInstance() for all files. 2013-07-12 11:50:36 +08:00
Ricardo Quesada cf262c28e2 getInstance() / destroyInstance() are used...
... instead of sharedXXX / purgeXXX.
They are more C++ friendly, and also easier to remember.

common files + Mac files + iOS files + tests/samples files were updated.

The old methods are deprecated now.
2013-07-11 15:24:23 -07:00
Chris Hannon 126ebb888c Implements a socket.io client extension, adds a test case and updates the android makefiles.
Contains the following tasks:
-initial socket.io extension commit
-sioclientimpl subclasses websocket:delegate to respond to websocket events
-implement static connect methods and basic client creation
-move SocketIO class files into correct extension folder (network)
-create SocketIO test in TestCpp
-update project references
-add missing static modifier to connect method
-implement basic test methods
-update extensions tests with SocketIO test entry
-implement basic handshake and opensocket methods for SocketIO
-add Delegate class to handle callbacks, implement virtual Delegate methods in test
-implement socket and client registries for lookup when connecting to hosts and endpoints
-connect delegate onOpen method by separating impl creation from connection
-update test to demonstrate onOpen callback
-create send and emit methods, move SIOClient into header file, add send and emit methods to test
-implement basic socket.io message parsing
-improve logging for events and messages
-add logic to pull event name from payload
-schedule heartbeat to keep connection alive, scheduled for 90% of the heartbeat interval from the server for safety
-add onConnect handler to to catch socket.io onconnect vs websocket onopen
-add disconnect and disconnectFromEndpoint methods to properly disconnect and destroy objects
-modify SIOClientImpl to track _uri for easier lookup in registries
-connect handler for onMessage to message event from socket.io, modify onError handler to take a string instead of WebSocket error code
-create SIOEvent callback type, implement event registry in clients, add test for event registration and callback
-update SIOEvent to use std::function and c++11, utilize cocos2d CC_CALLBACK method to bind selectors, this ensures that the *this reference is properly passed
-check for connect before sending or emitting in the client, cleanup some codes
-change connect logic to reuse existing socket connections instead of opening a new one
-implements get and set Tag methods for clients for easy reference
-improve endpoint handling, add endpoint tests to test layer
-additional error handling within socket disconnect error and failure to open connection
-fixes extracting endpoint from socket.io messages (in cases of the connect message, where there is 1 less colon for the connect message to the default namespace). Also fixes connecting to the default namespace "/" in the connectToEndpoint method
-add disconnect and onClose handlers to client so that onClose is called in the delegate
-add disconnect test methods to test layers
-change c-style casts to static_casts when using a CCDICT_FOREACH
-remove some unneeded namespace completion
-add usage documentation
-add handling for disconnect from server, cleanup some codes
-update comments and documentation in the socketiotest
-update includes so the NDK doesn't complain when compiling with c++11
-add socketio.cpp and test.cpp to the android makefiles
-update test URL to my public server, test script can also be found in my repo at https://github.com/hannon235/socket.io-testserver.git

Signed-off-by: Chris Hannon <himynameschris@gmail.com>
2013-07-11 17:41:42 -04:00
James Chen 3c64bc8972 issue #2396: Updating Scale9SpriteTest.cpp. 2013-07-11 17:08:09 +08:00