Commit Graph

3437 Commits

Author SHA1 Message Date
minggo 406ea3f69d Merge https://github.com/cocos2d/cocos2d-x into test-before-release 2013-03-20 15:19:19 +08:00
James Chen 9336ab710f fix a logic error and a memory leak in CCLabelBMFont. 2013-03-20 13:55:43 +08:00
minggo 9afc6729dc fix build error caused by libcurl on android x86 2013-03-20 11:53:19 +08:00
James Chen f52e56be20 Merge pull request #2184 from dumganhar/iss1837-jsb-schedule
fixed #1837: Refactoring schedule binding codes.
1) We need bind cc.Node.scheduleUpdate and cc.Scheduler.scheduleUpdate manually since schedules need to be associated with _schedFunc_target_ht and _schedObj_target_ht.
2) Bind cc.Scheduler.unscheduleCallbackForTarget.
2013-03-18 00:35:33 -07:00
James Chen f57a751a48 fixed #1837: Refactoring schedule binding codes.
* 1) We need bind cc.Node.scheduleUpdate and cc.Scheduler.scheduleUpdate manually since `schedules` need to be associated with _schedFunc_target_ht and _schedObj_target_ht
* 2) Bind cc.Scheduler.unscheduleCallbackForTarget.
2013-03-18 15:29:53 +08:00
minggo ac2a52e71b modify version 2013-03-18 11:25:27 +08: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
James Chen 9a5116e406 Merge pull request #2167 from Weeds/feature-linux-fontdimensions
fixed #1834: [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-14 19:35:20 -07:00
James Chen 7326df875e Merge pull request #2154 from jedy/fix_ccnode_doc
fix: can't generate CCNode.h's document with doxygen 1.8.3
2013-03-14 19:06:58 -07: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
minggo 3bef9cc749 Merge pull request #2159 from DarraghCoy/add_ccset_create
Add CCSet::create() function
2013-03-14 03:21:17 -07:00
James Chen a57cc21d7a Merge pull request #2156 from dumganhar/iss1830-jsb-utf8
fixed #1830: Using JS::CompileOptions::setUTF8(true) to compile script.
2013-03-13 19:59:25 -07:00
Darragh Coy 55dd6a6129 Add CCSet::create() to create, autorelease and return a new empty set. 2013-03-13 10:58:24 -07:00
James Chen 29aa62d923 fixed #1830: Using JS::CompileOptions::setUTF8(true) to compile script. 2013-03-13 18:10:54 +08:00
wu.hao 521fac290d fix: can't generate CCNode.h's document with doxygen 1.8.3 2013-03-13 14:56:17 +08:00
minggo 2bc703c3f0 Merge pull request #2069 from jxhgzs/cocos2dx_getDeltaTime
add m_fDeltaTime getter function
2013-03-12 19:38:57 -07:00
Sam Clegg 863286b0b9 Fix warning in linux build.
Also, define _DEBUG rather then DEBUG in linux and nacl makefiles
by default, and limit the command line definions that are used
when building Box2D.
2013-03-12 16:59:22 -07: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
James Chen ae1c64573e Merge pull request #2046 from rohankuruvilla/eclipse
fixed #1827: Eclipse Project import - Documentation Added and Tested.
2013-03-12 01:36:17 -07:00
minggo 1d51f9a3d7 issue #1529:CCUserDefault work ok on Android 2013-03-11 16:45:20 +08:00
minggo ac888fee01 issue #1529:CCUserDefault supports default value on iOS 2013-03-11 14:45:07 +08:00
James Chen 3f709c3edb Merge pull request #2134 from AsadR/remove-all-notifications-for-target
fixed #1822: Added CCNotificationCenter::removeAllObservers(CCObject *target).
2013-03-10 22:41:59 -07:00
James Chen 30e304961f Merge pull request #2126 from sbc100/make_run_for_linux
fixed #1820: Adding 'make run' target for linux projects.
2013-03-10 20:04:40 -07:00
Asad ur Rehman c1a8059998 Added CCNotificationCenter::removeAllObservers
This is a helper method that removes all observers with a particular
target. It can be used in destuctors to ensure no observers trigger
callbacks on objects that no longer exist.
2013-03-10 19:34:01 +05:00
James Chen a889322a47 Fixed compilation error for MAC port. 2013-03-10 16:34:41 +08:00
Sam Clegg 9eb9524659 Add 'make run' target for linux projects.
Also, a few other linux build system improvements:
- Add linux build of SimpleGame
- Update multi-platform templates to use new common
  build system.
- Remove redundant main.h files.
2013-03-08 10:01:03 -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 e8d4b17a23 issue #1529:modify CCUserDefault.cpp path in linux makefile 2013-03-08 11:18:34 +08:00
Rohan Kuruvilla 7149f0598d Adding missing eclipse project files 2013-03-07 12:13:50 -08:00
minggo dd8681b18b Merge pull request #2113 from minggo/refactor-ccuserdefault
Refactor ccuserdefault
2013-03-06 23:05:50 -08:00
minggo a691df2251 Merge pull request #2100 from fins/master
getStartLocationInView() and getStartLocation() methods in CCTouch
2013-03-06 22:40:12 -08:00
minggo 2842719e35 issue #1529:add user_default into vs2010 project 2013-03-07 10:31:01 +08:00
minggo e85989f76e issue #1529:modify marmalade and native client project configuration 2013-03-07 09:51:26 +08:00
Sam Clegg ce247a6304 [NaCl] Fix warnings in ARM build 2013-03-06 13:02:55 -08:00
Sam Clegg 7ad171d8ee Use same top level Makefile for nacl and linux builds.
Also, re-use some of the concepts from the linux build
system (such as quite by default) in the nacl build.

Fix remaining warnings in NaCl builds.
2013-03-06 13:02:55 -08:00
Sam Clegg 8677dad3c6 Improved build system from linux.
This change makes several fundamental improvements to the linux
build system:

- Remove duplication: a lot of the common make logic is now in
  a central shared makefile: cocos2dx/proj.linux/cocos2dx.mk

- Quiet by default: unless you specify V=1 on the commandline
  the output is now very clean and quiet.

- Dependencies: gcc's automatic dependancy generation is now
  used (-MMD).  This means that if you change a header file
  then all the object that depend on it now get rebuilt.

- Don't store objects in the source tree: previously object
  files were stored alongside the sources, which meant that
  debug and release object clobbered each other which leads
  to confusion and lots of unnecessary rebuilding.Q

- Library dependencies: each binary now depends on the libraries
  it links aginst.  This means that if the cocos2dx library
  changes then all examples will get re-linked.

- Top level Makefile: there is now a top level Makefile that
  can be shared/used by any platform the uses make as the
  build system (for example NaCl).  Everything can be built
  by simply running 'make' at the top level. e.g:

    make DEBUG=1
    make DEBUG=1 clean
2013-03-06 13:02:55 -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
minggo 3ce5a99c8d Merge pull request #2092 from sbc100/fix_all_warnings
Fix all compiler warnings produced by gcc.
2013-03-05 17:59:35 -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
minggo a9fa61af34 issue #1529:CCUserDefault -> user_default 2013-03-05 14:55:26 +08:00
minggo f37b1525b4 issue #1529:use NSUserDefault to implement CCUserDefault on iOS 2013-03-05 14:53:37 +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
minggo ae3c104fba issue #1686:disable depth test by default 2013-03-05 10:36:32 +08:00