Ricardo Quesada
487f65af2e
Replaces `Dictionary` with `std::unordered_map`
...
I did some performance tests, and `std::unordered_map` is more performant than `Dictionary`.
I need to do more tests, but so far, the results are good.
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-09-06 22:55:11 -07:00
Ricardo Quesada
3a0e957e9e
compatible with cocos2d c++ guidelines
2013-09-06 19:02:24 -07:00
Ricardo Quesada
bf6750067f
little optimization.
...
string is created when needed
2013-09-06 19:00:12 -07:00
Ricardo Quesada
b78382d5e5
Performance improvements in FileUtils / TextureCache
...
Added common "apple" platform to avoid duplicate files in FileUtils and other common files
Improves performance in fetching files.
2013-09-06 15:33:28 -07:00
Ricardo Quesada
2e221ee6cc
Array & Dictionary fixes
...
In many places `Dictionary` and `Array` are not being initialized. In fact `Dictionary` doesn't have the `init()` method creating potential leaks.
Also in objects like `Armature` and the new `LabelTTF`, the `Array` object is not being used a pointer. So it doesn't use the 2 phase initialization, creating potential leaks.
This patch fixes all those issues.
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-21 20:12:09 -07:00
Ricardo Quesada
4104cdc20e
Better destructors logs
...
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-21 20:08:51 -07:00
godyZ
8c0f2dfed1
issue #2533 : resolve some conflicts
2013-08-16 14:27:13 +08:00
minggo
77f89956a3
Merge pull request #3414 from boyu0/iss2522_unpackccz
...
closed #2522 : Let Image::initWithImageData() support the packed data.
2013-08-15 21:44:43 -07:00
godyZ
424b4140a2
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into Atitc_decode
2013-08-16 11:14:47 +08:00
godyZ
e8809b2b15
issue #2533:add ATITC compressed texture support
...
soft decode test in Win32, ios, Mac. device decode test in HTC G14
Adreno 220 GPU.
2013-08-16 11:02:44 +08:00
carlo morgantini
47be4ff58a
Merge remote-tracking branch 'originGithub/develop' into new_develop_merge_clean
...
Conflicts:
cocos2dx/label_nodes/CCFontAtlas.cpp
cocos2dx/label_nodes/CCFontAtlas.h
cocos2dx/label_nodes/CCFontAtlasCache.cpp
cocos2dx/label_nodes/CCFontAtlasFactory.cpp
cocos2dx/label_nodes/CCFontAtlasFactory.h
cocos2dx/label_nodes/CCFontDefinition.cpp
cocos2dx/label_nodes/CCFontFreeType.cpp
cocos2dx/label_nodes/CCLabel.cpp
cocos2dx/label_nodes/CCLabel.h
cocos2dx/label_nodes/CCStringBMFont.h
cocos2dx/label_nodes/CCStringTTF.cpp
samples/Cpp/TestCpp/Classes/LabelTest/LabelTest.cpp
2013-08-13 11:28:54 -07:00
carlo morgantini
d15d84c05f
samples cleaned up
2013-08-12 15:09:28 -07:00
boyu0
fc923aac93
closed #2522 : Fix compile error.
2013-08-12 18:18:09 +08:00
godyZ
fa7b486880
update s3tc #5 , code standardization
2013-08-09 12:54:05 +08:00
godyZ
46e9eed028
nothing with s3tc
2013-08-08 14:11:22 +08:00
godyZ
cd8430f81a
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into develop
...
Conflicts:
cocos2dx/Android.mk
cocos2dx/platform/CCImage.h
cocos2dx/platform/CCImageCommon_cpp.h
cocos2dx/textures/CCTexture2D.h
scripting/javascript/bindings/generated
2013-08-08 10:19:09 +08:00
boyu0
a9d26d3fdc
issue #2345 : edit getPixelFormatInfoMap method to return reference.
2013-08-07 11:20:41 +08:00
godyZ
02419ccb00
update s3tc #3 ,android test
2013-08-06 15:33:38 +08:00
boyu0
dc6503f7d4
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2345_refactor_ccimage
2013-08-06 13:37:38 +08:00
godyZ
195536097f
update s3tc #2
2013-08-06 11:52:48 +08:00
boyu0
94f9921d5e
issue #2345 : edit linux command to link the libpng12-dev.lib instead of use ourselves. Move ccTexParams into CCTexture2D
2013-08-06 11:34:48 +08:00
godyZ
fd7b00681f
update s3tc#1
2013-08-06 11:19:45 +08:00
James Chen
5ee6e7d79a
Merge branch 'develop' into carlomorgantinizynga-new_develop_merge
...
Conflicts:
cocos2dx/Android.mk
2013-08-05 10:09:15 +08:00
minggo
9cba2c42c1
closed #2434 : simply Android.mk
2013-08-02 17:33:27 +08:00
boyu0
89dd5a19ad
issue #2345 : move g_texturePixelFormatInfoTables into Texture2D
2013-08-02 14:10:23 +08:00
Timothy Qiu
978fc634be
Use C++ code in C++ comments.
...
Removed Hungarian notation from parts of the code.
2013-08-01 16:40:56 +08:00
boyu0
93aa3c7ada
issue #2345 : refract CCImage and CCTexture2D.
2013-08-01 15:53:52 +08:00
carlo morgantini
b2579987e5
Merge remote-tracking branch 'cocos2d/develop' into new_develop_merge
...
Conflicts:
cocos2d_libs.xcodeproj/project.pbxproj
cocos2dx/include/ccTypes.h
samples/samples.xcodeproj/project.pbxproj
2013-07-31 13:58:25 -07:00
carlo morgantini
ff56ad5435
fix bugs with new Label stuff and add new sample for unicode
2013-07-30 16:41:26 -07:00
boyu0
31da5ebeb7
fix some compile error and pass the linux compile
2013-07-30 13:45:50 +08:00
boyu0
afde1e57b2
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into 2345 and fix the per premultipied tag
2013-07-30 11:10:05 +08:00
boyu0
894584e5a0
Add texture2D convert test and fix the convert bugs
2013-07-29 17:34:33 +08:00
James Chen
343c98af13
Fixing warnings of the order of member variables and fixing errors for tizen projects.
2013-07-29 14:07:57 +08:00
boyu0
304d636deb
Closed #2345 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into 2345
2013-07-29 11:40:18 +08:00
minggo
b8f8ae7437
set _hasPremultipliedAlpha property correctly when it is a pvr texture
2013-07-28 23:38:22 +08:00
boyu0
cecfc13bc4
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into 2345
2013-07-27 22:06:30 +08:00
carlo morgantini
23575f0a68
New Label stuff merged and Label::Alignment replaced with TextVAlignment and TextHAlignment
2013-07-26 16:04:21 -07:00
minggo
3cb40b36e4
issue #2430:fix some errors
2013-07-26 18:07:40 +08:00
boyu0
02bdfbf169
Combine CCTextureETC to CCImage and CCTexture2D.
2013-07-26 17:34:44 +08:00
minggo
0870581623
fix warnings
2013-07-26 15:22:45 +08:00
James Chen
4f9d0672aa
Fixing errors when disabling VAO.
2013-07-26 13:49:24 +08:00
Ricardo Quesada
8bf24f0475
ccGLXXX -> GL::xxx
...
Adds GL namespace. Deprecates the `ccGLFunctionName` functions. New functions are `GL::functionName`
Also, converts the class `DrawPrimitives` into a namespace
2013-07-25 18:42:53 -07:00
Ricardo Quesada
058935aa8d
Removes Hungarian notation
...
Removes Hungarian notation from the code.
2013-07-25 15:53:24 -07:00
Ricardo Quesada
d683e10808
More constant fixes
...
Transition::ORIENTATION_XXX -> Transition::Orientation::XXX
Image::FORMAT_XXX -> Image::Format::XXX
Image::_function() -> Image::function() // private methods should not start with '_'
DrawPrimitives::drawColor() -> DrawPrimitives::setDrawColor()
And fixes Premultiplied Alpha in PVR v3 images
And tests are updated with the new functions
2013-07-25 14:49:43 -07:00
Ricardo Quesada
16d0b43181
Constant fixes
...
Director::PROJECTION_2D, 3D,... -> Director::Projection::_2D, _3D, ...
Label::TEXT_ALIGNMENT_... -> Label::HAlignment::...
Label::TEXT_VERTICAL_ALIGNMENT_... -> Label::VAlignment::...
Texture2D::PIXEL_FORMAT_... -> Texture2D::PixelFormat::...
BlendFunc::BLEND_FUNC_DISABLE -> BlendFunc::DISABLE
Also adds more constant for BlendFunc
2013-07-25 13:36:19 -07:00
minggo
b36a4f1df0
issue #2430:use upper letters for enum item in Image
2013-07-25 23:09:18 +08:00
minggo
17946c084a
issue #2430:fix android compiling error
2013-07-25 21:59:37 +08:00
minggo
4d7ac6c800
issue #2430:fix conflict
2013-07-25 21:37:12 +08:00
boyu0
a2b611d8c3
Refactor Image and Texture2D, combine TexturePVR to Image and Texture2D, and delete TexturePVR
2013-07-25 21:35:00 +08:00
minggo
2bb577be8b
issue #2430:change Image enum item to upper letter
2013-07-25 20:29:53 +08:00