Commit Graph

109 Commits

Author SHA1 Message Date
James Chen cbcf2e2bc8 Merge pull request #6384 from dabingnn/v3_optimize
change tab to space for CCDirector.cpp
2014-04-28 09:54:43 +08:00
Huabing.Xu 64d7a6bd37 change tab to space 2014-04-28 09:51:10 +08:00
Ricardo Quesada 81c2d92355 yeah... love in includes
<3
2014-04-26 10:35:57 -07:00
Ricardo Quesada 9b118e5e96 Squashed commit of the following:
commit 519fcd7f68e3586c376fd5e8d4a0ee220a48d225
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 10:10:06 2014 -0700

    Updates templates files

commit 2b07843ebe592f56b2abc544ccf66d441bb19fc5
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 10:08:19 2014 -0700

    compiles on Windows

commit b175522ef7205eaab3bd3f26c27c5d6514cbe2a4
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 09:55:30 2014 -0700

    adds cocos2d.h

commit 4c3d14f929bac017b93ca843b4f149d352264a30
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 09:54:24 2014 -0700

    re-adds missing files

commit f729181728959260d14c4152555534f5beec8e05
Merge: 148da79 2adac67
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 09:51:12 2014 -0700

    Merge branch 'includes_fixes' of github.com:ricardoquesada/cocos2d-x into includes_fixes

commit 148da79010c5dffeab885933624cffaf3d588852
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 09:49:12 2014 -0700

    Adds SimpleAudioEngine

commit 2adac67019180ec82b7bd03f0b67c12f62e29e77
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 09:47:45 2014 -0700

    Compiles for Android

commit 4a300d1b9225fa5708f25a69a50bb531f0ac1a32
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 09:13:35 2014 -0700

    Fixes the includes
2014-04-26 10:11:22 -07:00
Ricardo Quesada b053a9145a Compiles on Windows32 2014-04-25 22:03:25 -07:00
Huabing.Xu feec24e3ef Merge branch 'v3' into develop_migrate_math_lib_merge
Conflicts:
	build/cocos2d_libs.xcodeproj/project.pbxproj
	cocos/2d/CCNode.cpp
	cocos/2d/CCRenderTexture.cpp
	cocos/2d/platform/wp8/CCGLView.h
	cocos/physics/CCPhysicsBody.cpp
	extensions/physics-nodes/CCPhysicsSprite.cpp
	extensions/physics-nodes/CCPhysicsSprite.h
	tests/cpp-tests/Classes/PhysicsTest/PhysicsTest.cpp
2014-04-25 16:20:24 +08:00
James Chen 7beb8b78fe Merge pull request #6325 from MSOpenTech/wp8-3.0-update
Wp8 3.0 update:
Background texture is now correctly oriented in Transition Effects
Accelerometer now works for WP8. Refactor of InputEvents was required to support adding Accelerometer event to rendering queue.
Console support for WP8.
Fixed cpp template for WP8. Added missing projects. Fixed property sheets.
Updates precompiled shaders
2014-04-25 10:41:58 +08:00
Huabing.Xu f65973d9f0 Merge branch 'develop' into develop_migrate_math_lib_merge
Conflicts:
	cocos/2d/CCActionInterval.cpp
	cocos/2d/CCLabelAtlas.cpp
	cocos/2d/CCLabelBMFont.cpp
	tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp
2014-04-23 14:46:14 +08:00
James Chen 99654289ed Invokes 'Node::onExit' only when the node is running. 2014-04-21 22:31:34 +08:00
James Chen 8038d3daa5 Fixed tilemaptest crashes when click 'next' button quickly 2014-04-21 22:24:44 +08:00
Dale Stammen 467ededeff enabled console for wp8 2014-04-19 10:08:01 -07:00
Huabing.Xu 3b83d52f95 Merge branch 'develop' into develop_migrate_math_lib_merge
Conflicts:
	cocos/ui/UIButton.cpp
	cocos/ui/UIButton.h
	cocos/ui/UICheckBox.cpp
	cocos/ui/UICheckBox.h
	cocos/ui/UIImageView.cpp
	cocos/ui/UIImageView.h
	cocos/ui/UILayout.cpp
	cocos/ui/UILayout.h
	cocos/ui/UILoadingBar.cpp
	cocos/ui/UIRichText.h
	cocos/ui/UISlider.cpp
	cocos/ui/UIText.cpp
	cocos/ui/UIText.h
	cocos/ui/UITextAtlas.cpp
	cocos/ui/UITextAtlas.h
	cocos/ui/UITextBMFont.cpp
	cocos/ui/UITextBMFont.h
	cocos/ui/UITextField.cpp
	cocos/ui/UITextField.h
	cocos/ui/UIWidget.cpp
	tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp
	tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp
	tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp
	tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp
2014-04-19 00:30:34 +08:00
James Chen 63f54cb5f7 closed #4568: Application crashes on closing if CC_ENABLE_CACHE_TEXTURE_DATA is enabled.
CC_SAFE_RELEASE(_eventDispatcher); should be after 'delete _renderer;'
in Director's destructor.
2014-04-17 10:15:11 +08:00
Huabing.Xu d14d3007d0 remove kazmath include file 2014-04-16 14:08:58 +08:00
Huabing.Xu 30dec564e6 remove kazmath/kazmath.h include 2014-04-15 23:50:28 +08:00
Huabing.Xu 63b52dd287 replace Point with Vector2 in cocos folder cpp file 2014-04-15 18:13:57 +08:00
Huabing.Xu 4df714b9d8 Migrate to Vector2 in class Director 2014-04-15 14:18:40 +08:00
Huabing.Xu c3bf78494a remove CCFrustum.cpp, we will use new instead 2014-04-14 14:18:32 +08:00
Huabing.Xu 80f96398b3 1. changed comment message in CCNode.cpp
2. changed Director projection to Matrix
2014-04-14 09:30:51 +08:00
Huabing.Xu 1670e07300 Merge branch 'develop' into develop_migrate_math_lib_merge
Conflicts:
	build/cocos2d_libs.xcodeproj/project.pbxproj
	build/cocos2d_tests.xcodeproj/project.pbxproj
2014-04-11 11:18:13 +08:00
Huabing.Xu 84cf5ca895 remove kmMat4 in Director.cpp 2014-04-10 17:36:47 +08:00
James Chen 890dd64d38 issue #4729: some warning fixes and compilation error fixes on win32. 2014-04-10 01:29:13 +08:00
Huabing.Xu e8596094a4 Merge branch 'develop' into develop_migrate_math_lib_merge 2014-04-08 16:58:51 +08:00
James Chen 8f451d48a1 issue #4710: Fixed wrong indention. 2014-04-08 15:11:04 +08:00
James Chen 49bba30409 closed #4710: [win32] Crash in EventDispatcher if game starts up with mouse moving frequently 2014-04-08 15:08:34 +08:00
Huabing.Xu 6b4451482f remove matrixToKmMat4 function 2014-04-04 18:13:10 +08:00
Huabing.Xu 70561088df remove kmMat4ToMatrix function 2014-04-04 18:04:29 +08:00
Huabing.Xu 184f10ae0f add conversion from kmMat4 to Matrix 2014-04-04 17:58:37 +08:00
Huabing.Xu f1b1678900 Director::getMatrix returns Matrix instead of kmMat4 2014-04-04 17:31:21 +08:00
Huabing.Xu ea6d8e4e42 replace kmMat4 in director 2014-04-04 17:16:57 +08:00
Huabing.Xu f9405e0ea9 Merge branch 'develop' into develop_migrate_math_lib_merge 2014-04-03 17:47:16 +08:00
Huabing.Xu 1b8e45fe19 remove kmGLFreeAll call 2014-04-03 17:40:14 +08:00
Huabing.Xu 14f004b12a remove reference to kmGL in director 2014-04-03 17:32:40 +08:00
Huabing.Xu 67e62ce73d readied director::getMatrix again. remove kmGLgetMatrix 2014-04-03 17:26:06 +08:00
Huabing.Xu 79f62f4351 comment out director::getMatrix temporarily 2014-04-03 10:33:59 +08:00
Huabing.Xu 4ea56522e3 call director matrix stack will also call kmGLXXX functions 2014-04-02 22:46:37 +08:00
Huabing.Xu 78eea4a735 add loadIdentityMatrix in Director 2014-04-02 16:47:23 +08:00
Huabing.Xu 106a0da87b add matrix stack in director(will replace kmGLfunctions) 2014-04-02 16:36:11 +08:00
boyu0 31be60fea7 closed #3509: Skip one frame when _deltaTime equal to zero. 2014-04-02 14:05:07 +08:00
Dale Stammen 65400bf87b added wp8 device orientation. added purge for FontAtlasCache. Disabled console for wp8/winrt until networking code is added 2014-03-22 05:55:08 -07:00
boyu0 bc13956981 closed #3509: PhysicsBody moves randomly when switch foreground/background. 2014-03-21 15:16:55 +08:00
James Chen 02572da9dc Adds EventListenerTouchOneByOne::isSwallowTouches, fixes a typo for Director::EVENT_AFTER_UPDATE. 2014-03-05 11:28:21 +08:00
Ricardo Quesada c386f88e32 Merge branch 'develop' into visit_draw_improved
Conflicts:
	CHANGELOG
	cocos/gui/UILayout.h
2014-03-03 11:27:42 -08:00
James Chen 757425c54b issue #4165: Scheduler::scheduleCallback -> Scheduler::schedule, Scheduler::scheduleSelector -> Scheduler::schedule. APIs are clear for c++ developers now. 2014-03-03 11:00:30 +08:00
James Chen e6d2c4ec73 Refactors Scheduler class.
* Timer is an abstract class now.
* Adds three new timers ( `TimerTargetSelector`, `TimerTargetCallback`, `TimerScriptHandler`) which are inherited from Timer.
* Adds new API 'scheduleCallback` / `unscheduleCallbackForKey', and callback's target could be any classes since we're using `void*` to identify target.
* `Scheduler::scheduleCallback` use `std::function`, therefore, it supports passing `lambda`, `member_function` and `global_function`.
* The old selector API is still kept since it's very useful when schedule callback is a member function, it doesn't need a `key` to identify the callback function. (+1 squashed commit)
* Adds relevant test cases.
2014-03-01 14:09:09 +08:00
Ricardo Quesada d78304599d Cache working OK.
Performance increased in 20% for static objects.
2014-02-28 16:10:48 -08:00
Ricardo Quesada eb66ddd931 visit and draw improved.
`visit()` and `draw()` are improved.
they both receive:
 - `Renderer`
 - `kmMat4` for transformation
 - `bool` whether or not the transform changed from the previous frame

Although `draw` and `visit` are not using the 3 new parameters,
they will start using it in the coming days (or weeks, or months).

Those parameters are needed for:
 - `Renderer` shouldn't be a singleton. There should be one renderer per Director. There could be more than one renderer
 - we should get rid of `kmGLXXX` functions since nodoby knows what is happening. the `kmMat4` is for that.
 - whenever possible, we should try to optimize the multiplications. the `dirty` flag is for that.

We need those changes, so, it is better to change the API now, and not right after v3.0-final is released.
2014-02-27 21:43:54 -08:00
Ricardo Quesada 04460750b8 culling working for both 2d and 3d projections 2014-02-23 01:09:52 -08:00
Ricardo Quesada fe1160cd8c changes in API to support 3D 2014-02-22 19:16:42 -08:00
Ricardo Quesada 8ca746af17 Implements AABB culling for sprites 2014-02-22 17:47:56 -08:00