Commit Graph

46 Commits

Author SHA1 Message Date
Ricardo Quesada 7616edd9f3 Improves SpriteTest
Improves SpriteTest.
It is easier to see if Sprite works as SpriteBatchNode (and vice-versa).

Needed for the new renderer.

Also adds `const` to title() and subtitle()
2013-12-18 13:52:10 -08:00
James Chen 7719c692b8 More warning fixes. 2013-12-18 16:03:07 +08:00
Ricardo Quesada 33c4f891a0 Adds 'CC' to renderer files 2013-12-17 18:41:09 -08:00
Ricardo Quesada d6be81b7a8 The Renderer is not a singleton
In order to access, you have to get it from the Director

`Director::getInstance()->getRenderer()`
2013-12-17 17:50:17 -08:00
James Chen d16fa07661 Removes Vector<T>::forEach, please use std::for_each instead. The same as Vector<T>::sort. 2013-12-17 17:45:29 +08:00
Ricardo Quesada 3838268fd0 Merge branch 'develop' into newRenderer 2013-12-14 19:28:01 -08:00
James Chen bb5ef615dd Merge branch 'develop' of git://github.com/cocos2d/cocos2d-x into pr4479
Conflicts:
	cocos/2d/CCSpriteBatchNode.h
2013-12-13 16:44:22 +08:00
Ricardo Quesada 61cc365d9e Merge branch 'develop' into newRenderer
Conflicts:
	cocos/2d/CCGLProgram.h
	cocos/2d/CCLabelTTF.h
2013-12-12 14:41:42 -08:00
Ricardo Quesada a8c317bd83 getDescription() works as expected
renames `description` to `getDescription`. Adds `virtual`  to it.
Adds `getDescription` to missing nodes.
2013-12-12 14:30:22 -08:00
minggo 1e9c763b40 use ssize_t for index and capacity 2013-12-12 14:48:26 +08:00
Ricardo Quesada 0222c6544e Migration to Mat4x4
Armature not migrated yet

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-12-09 17:32:51 -08:00
Ricardo Quesada 73b1e3bb9e Merge branch 'develop' into newRenderer
Conflicts:
	cocos/2d/CCLabelAtlas.cpp
	cocos/2d/CCSprite.cpp
2013-12-06 09:37:08 -08:00
Ricardo Quesada 81b06f06a9 Merge branch 'develop' into newRenderer
Conflicts:
	cocos/2d/CCAtlasNode.h
2013-12-05 22:24:41 -08:00
minggo 19c86c0e4f Merge pull request #4434 from martell/msys2
Msys2 and Mingw added fixed x64 cocos/audio on Windows for MSVC and MinGW
2013-12-05 22:23:45 -08:00
Ricardo Quesada e699a3b765 Uses MV in Quad Command 2013-12-05 19:04:01 -08:00
Ricardo Quesada f68dcd9969 Merge branch 'develop' into newRenderer
Conflicts:
	build/cocos2d_libs.xcodeproj/project.pbxproj
	samples/Cpp/TestCpp/Classes/tests.h
2013-12-05 11:47:46 -08:00
martell e5ada6f377 added support for msys2 mingwtoolchains and fix x64 cocos/audio on windows platform for MSVC and Mingw. Also fixed a few very bad type casts very important for future Arm64 bit processors 2013-12-05 03:37:27 +00:00
James Chen 499a0404d4 issue #2790: Renames some functions in Vector<T>. Makes it more like stl vector. 2013-12-05 10:35:10 +08:00
Nite Luo 792cb5a716 Merge branch 'develop' into newRenderer 2013-12-04 15:23:12 -08:00
James Chen 9928e8bef1 issue #2790: Uses Vector<T>::getObjectAtIndex instead of Vector<T>[] operator to avoid some mistakes. 2013-12-04 16:01:55 +08:00
James Chen 1d5984b29a issue #2790: Vector::makeObjectsPerformCallback —> Vector::forEach 2013-12-04 16:01:02 +08:00
James Chen 90062b656d issue #2790: Node::_children is Vector<Node*> now. 2013-12-04 16:00:17 +08:00
boyu0 fd68dc4f9f issue #2771: add condition test to updatePhysicsTransform 2013-12-03 16:28:18 +08:00
Huabing.Xu 757f1abc7f 1. protected render command construction/destruction function.
2. use renderCommandPool<T> to allocate and deallocate command
3. use releaseToCommandPool interface to push command back to pool
2013-12-03 14:08:47 +08:00
Huabing.Xu ace75eebce refactor: quad command use a non parameter constructor and a reentrant init function 2013-12-03 11:11:46 +08:00
Nite Luo 75381ebc51 Merge branch 'develop' into newRenderer 2013-11-27 10:16:17 -08:00
minggo 85002285c2 override addChild in Sprite to fix error in binding generator 2013-11-27 09:50:47 +08:00
Nite Luo 3123c70153 Sprite are now using NewRenderer 2013-11-26 17:13:04 -08:00
Nite Luo 92b57c79ba Merge branch 'develop' into newRenderer
Conflicts:
	cocos/2d/CCClippingNode.h
	cocos/2d/CCLayer.h
2013-11-26 11:56:03 -08:00
Nite Luo 61ca4f0137 Fix a bug with NewSprite Update Quad 2013-11-26 11:48:37 -08:00
minggo fcf43823b4 remove unneeded codes 2013-11-26 17:53:34 +08:00
Nite Luo f3830985bb Sprite now using New renderer 2013-11-25 16:33:05 -08:00
Ricardo Quesada b87684c022 fixes Sprite::setTexture()
Sprite::setTexture(std::string&)  works as expected.
It sets the texture rect of the sprite
2013-11-14 15:37:43 -08:00
Ricardo Quesada d590986e73 Constructors are protected 2013-11-13 15:55:36 -08:00
Nite Luo a28f3f6f03 Merge branch 'develop' into newRenderer 2013-11-11 12:04:28 -08:00
Nite Luo 5a1d92cbf2 Merge branch 'develop' into newRenderer
Conflicts:
	samples/Cpp/TestCpp/Classes/controller.cpp
2013-11-08 14:01:08 -08:00
Huabing.Xu 6f1e98df34 Merge branch 'develop' of github.com:cocos2d/cocos2d-x into iss3025_TextureCache 2013-11-08 13:50:22 +08:00
Nite Luo be71eb8626 Merge branch 'develop' into newRenderer
Conflicts:
	.gitignore
	build/cocos2d_libs.xcodeproj/project.pbxproj
	build/cocos2d_samples.xcodeproj/project.pbxproj
	cocos/2d/CCDirector.cpp
2013-11-07 17:24:57 -08:00
Huabing.Xu 99bcca0532 issue #3025: replace TextureCache::getInstance() by Director::getInstance()->getTextureCache() in cocos folder 2013-11-07 19:11:09 +08:00
Nite Luo 21cd03bc13 Remove transform from QuadCommand, NewSprite using world coordinates 2013-11-06 16:39:20 -08:00
Michael Contento b7173cd60d add Sprite::setScale(float, float) 2013-11-06 14:42:31 +01:00
Ricardo Quesada 555f3609c8 Uses `const std::string&`
... instead of const char*

* Because it is more robust
* and it is faster... yes faster.

It is faster because internally some of our classes use std::string
(like FileUtils and Dictionary) so converting back-and-forth from const
char * to std::string is very expensive.

It is faster to have everthing in std::string as soon as possible to
prevent further conversions.

There are still some parts of the code that require conversion, but
most of the code was converted.
2013-11-05 19:02:03 -08:00
Nite Luo e4ffd250cb Simple implementation of RenderCommand and RenderQueue 2013-11-04 09:14:22 -08:00
boyu0 d12ee5f120 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2771_physical 2013-10-18 15:34:13 +08:00
minggo 95acb1b9e3 issue #2905: helloworld build ok on android 2013-10-14 14:01:00 +08:00
minggo 49d7bbd600 issue #2905: remove sub folders except platform 2013-10-12 15:41:45 +08:00