Commit Graph

48 Commits

Author SHA1 Message Date
James Chen 387ea1899c issue #2404: Disabling warning of invoking deprecated methods in engine. Rename CCCallFuncND to __CCCallFuncND, and add deprecated typedef CCCallFuncND.
Only disable warning for CCActionInstant.cpp and CCMenuItem.cpp
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (push)
#pragma warning (disable: 4996)
#endif

#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (pop)
#endif
2013-07-25 15:05:56 +08:00
James Chen af3b8a0390 issue #2404: Rename CallFuncND/CallFuncO to CCCallFuncND/CCCallFuncO and mark them as deprecated classes. In v3.0, we could use CallFuncN instead. 2013-07-25 13:45:02 +08:00
James Chen 44a338f63c issue #2404: Re-add CallFuncND and CallFuncO and mark them as deprecated class. 2013-07-24 16:45:11 +08:00
minggo 208c1312f4 Merge pull request #3171 from samuele3hu/ScriptHandler
issue #2377:Modify some tolua_*_open functions place and Modify Websocket,OpenGL,ScrollView handlers operation
2013-07-18 02:48:37 -07:00
James Chen f4edc7a922 closed #2413: Warning fixes for overload virtual functions. 2013-07-17 16:25:13 +08:00
samuele3hu c9f0f09dac issue #2377:Del CallFunc and CallFuncN handler operation and Modify LuaWebScoket linux config 2013-07-17 14:44:28 +08:00
Ricardo Quesada 9958e0d7f9 Adds more readability to the class internals.
Changes:
  - creator (static) methods, and singleton methods (static) are always at the top of the class
  - Constructors, destructros, and init methods comes next
  - Then the instance methods for the class
  - Then the overriden methods
  - and finally the ivars

Also, overriden methos have the "override" context keyword
2013-07-15 12:43:22 -07:00
Éloi Rivard 05ae6f8518 Fixed some warnings 2013-07-09 16:33:21 +02:00
dumganhar 8f900d02b8 issue #2300: Removing all 'copyWithZone' pattern. 2013-07-08 23:05:47 +08:00
Ricardo Quesada c65b6f1417 Adds const to more getters
adds `const` to more getters.
2013-07-06 22:01:21 -07:00
Ricardo Quesada 6c0c48a3a9 Removes CallFuncO and CallFuncND
...which can be simualted with CallFunc and CallFuncN.

Adds std::function() support to CallFuncN.
Adds more samples
2013-06-21 14:58:52 -07:00
James Chen 93b6328303 issue #2129: Removing CC prefix for cocos2dx module. 2013-06-20 14:13:12 +08:00
Ricardo Quesada d35cc3b0fa Merge branch 'develop' into clone_reverse_fixes
Conflicts:
	cocos2dx/actions/CCAction.cpp
	cocos2dx/actions/CCActionEase.cpp
	cocos2dx/actions/CCActionGrid.cpp
	cocos2dx/actions/CCActionInstant.cpp
	cocos2dx/actions/CCActionInterval.cpp
	scripting/javascript/bindings/generated
2013-06-18 09:59:34 -07:00
Ricardo Quesada e40adb7ae7 EaseActions and more
Added more reverse() const
2013-06-15 12:38:32 -07:00
James Chen c0d44cb2e4 fixed #2129: Rename m_iVar to _var, remove CC prefixes. 2013-06-15 14:03:30 +08:00
Ricardo Quesada 98190a21c0 Actions with clone() pattern 1/3
This is the 1st patch of 3.

1)
Removes the copyWithZone() patterns.
Adds the clone() pattern instead (which is more C++ friendly)
Adds also "const" to getters.
2013-06-13 17:25:14 -07:00
Lee, Jae-Hong b9f5691706 [Tizen] Add libwebsockets.h, .a and support C++11 2013-06-07 20:14:43 +09:00
flaming0 68ac1684a8 Fix windows build (nullptr instead of NULL when assigning to std::function) 2013-06-07 00:08:59 +04:00
minggo 1c700157b3 declare _functions as it is initialized 2013-06-04 11:57:32 +08:00
Ricardo Quesada 39928d6a80 Adds std::function support in CCCallFunc
And fixes some minor issues on the iOS and OS X projects
2013-06-03 12:13:24 -07:00
waiter af9e3442c6 Add CCRemoveSelf Action 2013-03-25 18:18:38 +08:00
waiter 80c9e2f714 Add RemoveSelf Action
Add RemoveSelf Action, so we can simple call CCRemoveSelf to remove the
node from parent.
2013-03-25 11:10:51 +08:00
Lu Guanqun b2c13cba9d fix the reorder warning of class CCCallFunc
../actions/CCActionInstant.h: In constructor 'cocos2d::CCCallFunc::CCCallFunc()':
../actions/CCActionInstant.h:240:25: warning: 'cocos2d::CCCallFunc::<anonymous union>::m_pCallFunc' will be initialized after [-Wreorder]
../actions/CCActionInstant.h:236:6: warning:   'int cocos2d::CCCallFunc::m_nScriptHandler' [-Wreorder]
../actions/CCActionInstant.h:188:5: warning:   when initialized here [-Wreorder]
2012-12-10 16:07:19 +08:00
minggo a75f8b7e7a fixed #1593:remove all deprecated methods expect CCBAnimationManager 2012-12-06 18:51:33 +08:00
dualface 030f5e7079 [luabinding] cleanup script handler when release CCCallFunc 2012-12-02 15:01:12 +08:00
dualface 393ce26330 rollback commit 2012-12-02 14:56:44 +08:00
dualface d929fe2893 Merge branch 'gles20' of git://github.com/cocos2d/cocos2d-x into gles20 2012-12-01 22:20:08 +08:00
dualface 058b6e9f65 fix CCCallFunc for script 2012-12-01 22:19:54 +08:00
Lu Guanqun 8270ee3e48 fix -Wreorder warning
In the class definition, the field m_nScriptHandler is declared before
m_pCallFunc, so we should follow the order in initialization as well.
2012-11-16 15:10:25 +08:00
James Chen 7d8b261ced fixed #1477: Abstracts Lua and JS binding protocol, some bugs fixes in lua-binding, adding custom menu on win32 and mac for switching resolutions. 2012-09-11 14:02:33 +08:00
James Chen 9ba5a1bfef issue #1454: Removed COCOS2D_JAVASCRIPT macro. 2012-08-31 21:23:23 +08:00
James Chen a2b5916301 Using 'getHashCodeByString(typeid(*native_obj).name())' instead of 'reinterpret_cast<long>(typeid(*native_obj).name());'.
Since on win32 platform, 'reinterpret_cast<long>(typeid(*native_obj).name());' invoking in cocos2d.dll and outside cocos2d.dll(in TestJavascript.exe) will return different address.
But the return string from typeid(*native_obj).name() is the same string, so we must convert the string to hash id to make sure we can get unique id.
2012-08-29 14:49:03 -07:00
Rohan Kuruvilla 8d7516a0ef Test project for cocos2d-x js. 2012-08-27 10:07:31 -07:00
Rolando Abarca f210b666ee removes a few warnings 2012-08-27 08:43:39 -07:00
Rolando Abarca 033ae81871 adds COCOS2D_JAVASCRIPT for some specifics parts 2012-08-27 08:43:39 -07:00
folecr cd87364277 Includes for typeinfo and spidermonkey_specifics.h 2012-08-27 08:43:39 -07:00
Rolando Abarca 2598fc97d1 adds TypeInfo to some classes 2012-08-27 08:43:38 -07:00
mustime 1ffdbc1639 issue #1425: add standard comment on CCCallFunc::create(int nHandler) and
CCCallFuncN::create(int nHandler)
2012-08-22 14:21:48 +08:00
mustime 57659d1584 issue #1425: modifing pkg files for Lua 2012-08-21 18:42:35 +08:00
Walzer 9eab0c19f8 add groups to all classes for doxygen 2012-06-20 18:09:11 +08:00
James Chen 24e3ec7499 fixed #1336: Updated comment information for deprecated apis. 2012-06-20 14:31:36 +08:00
James Chen b818c0afa6 fixed #1336: Used CC_DEPRECATED_ATTRIBUTE macro to mark deprecated interfaces. 2012-06-20 11:48:31 +08:00
minggo d0f905992a issue #1292:make some function names more readable 2012-06-15 15:10:40 +08:00
James Chen 7fe3f7357e issue #1324: Reverted old interfaces. 2012-06-14 17:18:05 +08:00
James Chen 3f7b44fc23 issue #1324: Added create() for static member functions that new an autorelease object 2012-06-14 15:13:16 +08:00
minggo cc16320445 issue #1310: syncronize actions 2012-06-08 13:55:28 +08:00
James Chen 93d1879a56 fixed #1277: CCToggleVisibility should implement copyWithZone. 2012-05-30 16:34:42 +08:00
James Chen 0f36a89c7e issue #1188: Refactor directory. Compile successfully on android and win32(vs2008 debug). 2012-04-25 16:18:04 +08:00