Commit Graph

1541 Commits

Author SHA1 Message Date
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
minggo df888eef65 fixed #2042: remove libxml2 2013-04-10 09:56:31 +08:00
minggo 5d2c67ee8a fixed #1904:strip libcurl.a on x86 architecture 2013-04-10 09:40:44 +08:00
minggo 3c8b26813e delete libxml2 2013-04-10 09:39:48 +08:00
elMiro 0f6e2daf31 Correction of passed buffer size to readlink and verification of result return by readlink. 2013-04-09 00:25:31 +02:00
James Chen 5e2f1e0bd6 Merge pull request #2272 from Weeds/saxparser-fix
fixed #2035: fixed potential crash in CCSaxParser
2013-04-08 07:49:36 -07:00
James Chen 401b3dca4d Merge pull request #2282 from DarraghCoy/ccfileutils_create_with_contents_of_file_fix
fixed #2031: Fix CCFileUtils 'createXXXXWithContentsOfFile' path lookup issue.
2013-04-08 02:33:23 -07:00
James Chen d3eed7fd1f Merge pull request #2279 from sjchao/master
fixed #2030: Fixing a display bug when a scrollView nested in another scrollView. The parent's scissor rect need to be considered, when setting the scissor rect in the subScrollView.
2013-04-07 23:55:55 -07:00
James Chen 7a45e1ddd1 Merge pull request #2322 from dumganhar/iss1592-update-uthash
fixed #1592: Updating uthash to v1.9.8.
2013-04-07 23:31:31 -07:00
James Chen 831dfb6ade Merge remote-tracking branch 'origin/iss1592-update-uthash' into iss1592-update-uthash 2013-04-08 11:56:10 +08:00
James Chen 2c3427dcee issue #1592: Fixing complication errors for windows port. 2013-04-08 11:56:04 +08:00
minggo ad68b3d5ed Merge pull request #2288 from mchinen/master
Android: fix emulator for OpenGL ES 2.0
2013-04-07 19:08:00 -07:00
yodesoft 4d5dff6172 Reduce function call in nativeInitBitmapDC to improve performance. 2013-04-07 17:17:19 +08:00
James Chen 038720a1b2 Merge pull request #2290 from Yodesoft/master
fixed #2000: Improve font rendering performance for linux platform.
2013-04-03 18:59:37 -07:00
Romain Tisserand 15d4e75cdb JNI fixes, added missing JNIEXPORT / JNICALL declarations
This is needed if compiling with custom visibility settings (example :
-fvisibility=hidden)
2013-04-02 22:15:12 +02:00
yodesoft fa9339916d Improve font rendering performance 2013-04-02 10:16:51 +08:00
Michael Chinen 6f5173f448 android:Add emulator detection and config change to allow running OpenGL ES 2.0 projects in the emulator
Code taken from forum post by Romain TISSERAND
http://www.cocos2d-x.org/boards/6/topics/12563?r=25446#message-25446
2013-04-01 20:41:33 +09:00
Michael Chinen 227d2cf60b Add emulator detection hack to allow running OpenGL ES 2.0 projects in the emulator 2013-03-31 20:47:43 +09:00
Darragh Coy d0f8aaad9e Fix CCFileUtils 'createXXXXWithContentsOfFile' path lookup issue
When calling 'CCFileUtils::createCCDictionaryWithContentsOfFile' and 'CCFileUtils::createCCArrayWithContentsOfFile' on iOS/OSX these functions call upon 'CCFileUtils::fullPathForFilename' to resolve the path given into a full path which can be used with system file IO functions. This matches the convention found throughout the cocos2dx library and is expected behaviour. However, on Android and other platforms it appears calling 'CCFileUtils::createCCDictionaryWithContentsOfFile' or 'CCFileUtils:: createCCArrayWithContentsOfFile' does not do the same resolution using 'CCFileUtils::fullPathForFilename' - resulting in file paths which are correctly specified (and which worked on iOS/OSX) to fail to load on these platforms.

Fix this issue by performing a lookup/resolve of the file path using 'CCFileUtils::fullPathForFilename' before doing the low level loading work itself. This brings the behaviour of other platforms in line with iOS and OSX.
2013-03-29 22:51:25 -07:00
sjchao cd3a2be720 change comment type 2013-03-29 17:21:29 +08:00
sjchao 4690a45f3e change a method name
change method name from isScissorEnable() to isScissorEnabled() in
class CCEGLViewProtocal
2013-03-29 17:19:47 +08:00
sjchao 18c43e29b2 change method name from getIsScissorEnable() to isScissorEnable() 2013-03-29 15:32:30 +08:00
chao 253ebe49e4 add getIsScissorEnable() and getScissorRect() for CCEGLViewProtocal 2013-03-29 01:28:26 +08:00
Andre Rudlaff 5372363365 fixed potential crash in CCSaxParser
The character array which given to CCSAXParser::parse() may not be NULL
terminated.
Therefore we must also add the size of the data array to the parameter list
of the tinyxml2::XMLDocument::parse() call
2013-03-28 01:07:54 +01:00
Andre Rudlaff 89f08bb441 [Linux] fixed font rendering crash for certain fonts
face->size->metrics->ascender seems to be unreliable for some fonts,
additionally the freetype documentation says that it may be used
differently for different fonts.
Therefore it may happen that the ascender of a font face is less then
the glyphs bounding box resulting in accessing invalid memory.

The fix is to use the bbox attribute instead of the ascender
2013-03-28 00:54:11 +01:00
billy1380 cdfe693583 - changed cocos2d mac project to support universal build and x86
- fixed issues associated with that
2013-03-23 16:04:51 +00:00
minggo 71659f4aa9 Merge pull request #2247 from hailongiPhone/master
release && set nil
2013-03-22 04:09:47 -07:00
minggo 1538c72581 Merge pull request #2197 from dumganhar/ios-default-font
[iOS] Using system font by `[UIFont systemFontOfSize]` when font name wasn't found.
2013-03-22 00:10:09 -07:00
hailong 2ea447dbfd Update CCDirectorCaller.mm
First destroy CCDirector instance with  cocos2d::CCDirector::sharedDirector()->end() 

Then create new CCDirector instance with
cocos2d::CCApplication::sharedApplication()->run();

APP will crash at 
CCApplication::setAnimationInterval

[[CCDirectorCaller sharedDirectorCaller] setAnimationInterval: interval ];
2013-03-22 15:02:46 +08:00
minggo 949700ca1a issue #1848:use CCConfiguration::supportsPVRTC() to determine if the device support powertc format 2013-03-21 15:50:41 +08:00
James Chen e2e9bc8ce0 Fixing memoryleaks. 2013-03-21 09:00:55 +08:00
minggo 9afc6729dc fix build error caused by libcurl on android x86 2013-03-20 11:53:19 +08:00
James Chen ac509f70db [iOS] Using system font by `[UIFont systemFontOfSize]` when font name wasn't found. 2013-03-19 13:11:33 +08:00
Sam Clegg 04c1a863a0 Remove tailing newlines from CCLog messaages.
Some CCLog message contained trailing newlines which
made the logs hard to read on many platforms.  The solution
here is to stip trailing newlines on those platforms, and also
to remove the newlines from the existing log messages.
2013-03-16 09:01:21 -07:00
Andre Rudlaff a1602a992b fontcache map is now static, as we do not need external linkage for it. 2013-03-15 17:54:24 +01:00
Andre Rudlaff d3ecb09c9b Merge branch 'master' into feature-linux-fontcache 2013-03-15 08:54:15 +01:00
Andre Rudlaff e8ee3a9b83 [Linux] fixed font rendering artifacts, added simple line break
This patch fixed the size calculations for true type fonts (especially for
italic fonts)
Additinally a very simple greedy line break algorithm has been added for
true type labels.
2013-03-15 00:24:25 +01:00
Andre Rudlaff 67ad11dbee [Linux] add cache for font family -> font path mapping
As FcFontMach is quite an expensive call the results of getFontFile() are
now cached in an std::map if either a ttf file is packed with the app or
if a font file has been found by using fontconfig
2013-03-13 00:11:35 +01:00
minggo 1d51f9a3d7 issue #1529:CCUserDefault work ok on Android 2013-03-11 16:45:20 +08:00
James Chen 2c7b178d7f fixed #1812: Minor fix. 2013-03-08 16:00:14 +08:00
James Chen aa53211f86 fixed #1812: A warning of getStringWithEllipsisJni function when compiling it with clang. 2013-03-08 15:56:17 +08:00
minggo dd8681b18b Merge pull request #2113 from minggo/refactor-ccuserdefault
Refactor ccuserdefault
2013-03-06 23:05:50 -08:00
minggo 648e9a7bf1 issue #1529:use NSUserDefaults on iOS and SharedPreferences on Android to implement CCUserDefault 2013-03-06 16:36:44 +08:00
minggo 7969224bf3 Merge pull request #2106 from waiter/master
Update unload effect function (android normal)
2013-03-05 22:45:10 -08:00
minggo 43dff78f4b Merge pull request #2102 from DarraghCoy/ios_custom_font_loading_fix
Fix for loading custom fonts on iOS when referenced from a CCB file
2013-03-05 22:42:13 -08:00
waiter e2119e1323 Merge pull request #1 from cocos2d/master
update cocos2d/cocos2d-x
2013-03-05 18:43:21 -08:00
waiter 7699c83bd8 update Cocos2dxSound.java for unload effect
when unload effect, sounID maybe null so the app will creash because of NPE.
2013-03-06 09:21:49 +08:00
Sam Clegg 4d0aa01c4b Fix all gcc warnings in NaCl build. 2013-03-05 17:01:40 -08:00
Sam Clegg 38878b084b Fix all compiler warnings produced by gcc.
This allows the linux and NaCl builds (and perhaps others)
to be compiles with -Wall and -Werror, and it makes the build
output much less noisy.
2013-03-05 17:01:00 -08:00
Darragh Coy f84a4e2e08 Code review changes for pull request #2102
We should only load the 'MarkerFelt-Wide' fallback font in 'CCImage.mm, _initWithString()' if the user is attempting to load a custom font, not when the user is attempting to load a system font. If the user is trying to load a system font then give back the default system font instead.
2013-03-04 22:24:28 -08:00