James Chen
b8c82ae5a9
[develop] Warning fixes.
2013-09-08 11:26:38 +08:00
minggo
2de8963a0a
fix warnings caused by deprecating some functions of Array
2013-08-22 10:45:47 +08:00
minggo
8b748e2992
issue #2430:use const member variable instead of macro
2013-07-25 21:04:32 +08:00
James Chen
1db847ad7c
issue #2344 : ScriptEngineManager::sharedManager --> ScriptEngineManager::getInstance, ScriptEngineManager::purgeSharedManager --> ScriptEngineManager::destroyInstance
2013-07-22 17:24:54 +08:00
Ricardo Quesada
89d210bdb3
CCAssert -> CCASSERT
...
and other best pracitces like:
capacity and "index" are ints and not unsigned int (google's recomendation).
It is easier to detect underflow bugs like this
plus other minor improvements
2013-07-19 22:01:27 -07:00
Ricardo Quesada
ba6ab126c6
More best practices fixes
...
- class order fixes
- static methods (creators) at the beginning
- then constructors / destructors
- then init
- more `const` fixes
- adds some const getters
- some getters have 2 versions: `const` and no-const version
- renamed CocosDenshion::sharedEngine -> getInstance()
2013-07-18 16:30:19 -07:00
Ricardo Quesada
6e25301b43
more best practices fixes
...
- Adds more `const` in getters
- Overriden methods have the `override` keyword
- Reorganizes the structure of the class:
# creators first, then constructor, destructors, init
# then overridden methods
# variables at the end
- removes Hungarian notation from parts of the code
2013-07-17 16:56:19 -07:00
Ricardo Quesada
cf262c28e2
getInstance() / destroyInstance() are used...
...
... instead of sharedXXX / purgeXXX.
They are more C++ friendly, and also easier to remember.
common files + Mac files + iOS files + tests/samples files were updated.
The old methods are deprecated now.
2013-07-11 15:24:23 -07:00
samuele3hu
570f2663f4
issue #2244:Modify ScriptData struct and functions related with sendEvent
2013-07-04 15:44:42 +08:00
samuele3hu
5a64c9e1b3
issue #2244:Add some constructor
2013-07-03 14:19:00 +08:00
samuele3hu
9b08cee01f
issue #22434:make some execute funs into one funs in ScriptEngineProtocol
2013-07-02 15:23:51 +08:00
boyu0
9d227f6f1f
Fixed Bug#2327:CCNode::isScheduled() is not implemented
...
Add CCScheduler::isScheduledForTarget() method
2013-06-27 12:05:47 +08:00
James Chen
93b6328303
issue #2129 : Removing CC prefix for cocos2dx module.
2013-06-20 14:13:12 +08:00
James Chen
c0d44cb2e4
fixed #2129 : Rename m_iVar to _var, remove CC prefixes.
2013-06-15 14:03:30 +08:00
Andre Rudlaff
8ab1f3c6d2
fixed potential crash in CCScheduler::removeHashElement
...
If the scheduler is the last object to have retained the pElements target and
the targets desctructor calls CCScheduler::unschedule() invalid memory is
accessed as pElement->timers is already freed, but the pElement is not removed
yet.
Therefore the call to target->release() should be made after pElement has been
removed from the hash table
2013-03-26 22:55:26 +01: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
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
James Chen
760a8c1d39
fix a compilation error for android.
2013-01-03 19:56:34 +08:00
dualface
f08b9c4573
performance fix
2012-12-10 16:31:57 +08:00
dualface
268aa45d2c
rename CCNode:scheduleUpdateScriptHandlerWithPriority() to CCNode::scheduleUpdateWhitPriorityLua()
...
remove unused functions
2012-12-10 16:09:23 +08:00
dualface
c8753f72ef
[scripting] add CCNode::scheduleUpdateScriptHandlerWithPriority()
2012-12-10 13:48:27 +08:00
James Chen
51d61ba214
issue #1564 : fix the wrong order of parameters in CCScheduler::scheduleSelector.
...
Made MoonWarriors works.
2012-11-22 12:05:38 +08:00
James Chen
7601cc7e27
Merge branch 'iss1555-update' of https://github.com/minggo/cocos2d-x into iss1555-update
...
Conflicts:
cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp
2012-11-16 16:21:16 +08:00
Rohan Kuruvilla
af3bc76062
Fixing script callbacks for schedule updates with negative and positive priorities
2012-11-16 15:55:34 +08:00
minggo
a701eaecce
issue #1555:update to v2.1 beta3
2012-11-14 18:05:15 +08:00
walzer
06f639edab
update copyright to 2012, update cocos2d version to 2.0.3
...
1. update all copyright from 2010-2011 to 2010-2012 cocos2d-x.org
2. update COCOS2D_VERSION to 0x00020003
3. update const char* cocos2dVersion() to "cocos2d-2.0-x-2.0.3"
2012-09-24 21:22:20 +08:00
Donald Alan Morrison
216ebab0e1
Minor English Spelling Corrections, etc.
2012-09-15 14:19:14 -07: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
YuLei
da79992275
Merge branch 'gles20' of git://github.com/cocos2d/cocos2d-x into gles20
2012-09-02 00:38:57 +08:00
James Chen
9ba5a1bfef
issue #1454 : Removed COCOS2D_JAVASCRIPT macro.
2012-08-31 21:23:23 +08:00
minggo
860d3eff4b
issue #1454 : make js binding work together with lua binding and native codes
2012-08-31 17:55:45 +08:00
YuLei
2c518e43b2
[Lua] fix CCLayer:registerScriptTouchHandler()
...
[Lua] make CCNotificationCenter script support
2012-08-28 12:08:15 +08:00
Rolando Abarca
ce40351855
updates CCScheduler to work with the JS Bindings
2012-08-27 08:43:39 -07:00
rohankuruvilla
77f723789b
Adding support for cc.CallFunc.
2012-08-27 08:43:38 -07:00
Rohan Kuruvilla
c47d9d4e7c
Adding Touch callbacks and capability to pass this around
2012-08-27 08:43:38 -07:00
Walzer
685b70e6fb
fixed #1402 , résolve conflicting "create" functions
...
1. Following https://docs.google.com/document/d/1eqvYjVah0R9nkjzJ_ga1-_cyjHnizVQ5dyESYNpYM0s/edit?pli=1
2. use CCSequence/CCSpawn::initWithTwoActions, createWithTwoActions instead of initOneTwo, create(one, two).
3. haven't re-generate lua-binding to resolve the conflicts yet.
2012-07-23 22:49:11 +08:00
James Chen
fa1f8fe8f6
fixed #1371 : Particle crashes if setAutoRemoveOnFinish(true).
...
Scheduler: removeUpdateFromHash calls [target release] at the very end to prevent a possible crash.
2012-07-01 21:17:44 +08:00
minggo
90448ec7d0
issue #1269:fix some compiling error because of including error header files
2012-06-19 16:20:46 +08:00
James Chen
3a410c14a1
Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into iss1324_create
...
Conflicts:
cocos2dx/extensions/CCBReader/CCBReader_v2.cpp
cocos2dx/extensions/CCControlExtension/CCScale9Sprite.cpp
cocos2dx/label_nodes/CCLabelBMFont.cpp
cocos2dx/menu_nodes/CCMenuItem.cpp
cocos2dx/menu_nodes/CCMenuItem.h
cocos2dx/misc_nodes/CCRenderTexture.h
cocos2dx/tileMap_parallax_nodes/CCTileMapAtlas.cpp
tests/tests/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder.cpp
tests/tests/LabelTest/LabelTest.cpp
2012-06-14 17:36:31 +08:00
James Chen
23574172ff
issue #1324 : Added create() for static member functions that new an autorelease object, updated cocoa folder.
2012-06-14 16:05:58 +08:00
Nicolas Gramlich
5550d9f2b0
Merge with gles20.
2012-06-13 15:56:52 -07:00
Nicolas Gramlich
e2a1a246a0
Converted removed all Carriage Returns (dos line-endings, ^M.) in cocos2dx, except in the windows project/platform files.
2012-06-13 14:26:28 -07:00
James Chen
08fc714a7f
issue #1310 : Reverted floatr to CCTimer.
2012-06-12 17:07:54 +08:00
Nicolas Gramlich
4378731418
Merge with gles20.
2012-06-11 10:43:07 -07:00
James Chen
26cf81e42e
Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into gles20
...
Conflicts:
cocos2dx/CCScheduler.h
cocos2dx/include/ccTypes.h
2012-06-08 14:14:13 +08:00
James Chen
c5cf23c859
issue #1310 : First commit since sync to rc2.
2012-06-08 14:11:48 +08:00
minggo
cc16320445
issue #1310 : syncronize actions
2012-06-08 13:55:28 +08:00
Walzer
184b31efa3
fix compilation warnings on android & ios
2012-05-05 10:44:42 +08:00
James Chen
82439733c5
fixed #1204 : Made CCEGLView::Create(on win32) as a private function. Updated ExtensionsTest.
...
And updated the format of source files(changed linebreak symbol to UNIX format ('\n'),replaced 'tab' with four spaces).
2012-05-03 10:12:00 +08:00
James Chen
96a177bd37
issue #1190 : updated some pkg files for lua binding.
2012-04-26 09:34:42 +08:00