Commit Graph

147 Commits

Author SHA1 Message Date
carlo morgantini 23575f0a68 New Label stuff merged and Label::Alignment replaced with TextVAlignment and TextHAlignment 2013-07-26 16:04:21 -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 4d7ac6c800 issue #2430:fix conflict 2013-07-25 21:37:12 +08:00
minggo 2293630335 issue #2430:move enum in ccTypes.h class 2013-07-25 18:46:43 +08:00
James Chen 0e1bbcfa90 closed #2431: Potential crash when loading js files. 2013-07-25 17:58:15 +08:00
Ricardo Quesada 1f37d4d00a More best practices fixes and other bug fixes
- Adds `CC_REQUIRES_NULL_TERMINATION` to methods that require a NULL at the end
- Removes more Hungarian notations in samples
- s/sprite/scene: fix from previous commit
- `CCLog` -> `log`
- `getLayerNamed` -> `getLayer`
- `getPropertyNamed` -> `getProperty`
- and other small fixes
2013-07-23 15:20:22 -07:00
James Chen 2228614748 issue #2344: JSB also uses 'ScriptEngineManager::sharedManager()->getScriptEngine()->sendEvent(XXX);' now. 2013-07-22 17:12:53 +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
Sam Gross 903b63abaf Ignore formatting specifiers in JavaScript log messages. 2013-07-15 15:10:02 -04: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
minggo 87125e4b2a issue #2129:use capital words for static const member variables 2013-07-08 18:11:32 +08:00
James Chen 17e1b65646 issue #2129: Adding 'FontDefinition_to_jsval' and reverting some changes. 2013-07-08 15:18:57 +08:00
minggo 04465622b7 issue #2129:remove prefix of types in ccTypes.h 2013-07-05 16:49:22 +08:00
James Chen 0f2719fa06 issue #2340: Checking jsc( js compiled) files first. 2013-06-27 17:20:02 +08:00
James Chen 057d5c18a4 issue #2305: sched_yield(); --> std::this_thread::yield(); 2013-06-26 14:55:20 +08:00
James Chen adf6932543 issue #2305: Using std::thread instead of pthread for ScriptingCore. 2013-06-26 14:41:19 +08:00
James Chen 24d32010d6 Compilation errors in ScriptingCore.cpp fixes 2013-06-21 22:29:48 +08:00
James Chen ba1fe39d91 issue #2129: Removing CC prefix for scripting module. 2013-06-20 14:33:59 +08:00
James Chen c0d44cb2e4 fixed #2129: Rename m_iVar to _var, remove CC prefixes. 2013-06-15 14:03:30 +08:00
folecr 99266d19c5 If user has enabled debugger support, call enableDebugger() to setup the debug context, start the debugger thread, etc. 2013-06-10 11:38:31 -07:00
James Chen 736fe3c63a Merge pull request #2792 from folecr/jsdb
Fix flags for debugger server socket
2013-06-06 19:45:33 -07:00
folecr c01c9c8350 Fix flags for debugger server socket
* Works on iOS and Android
2013-06-06 07:35:54 -07:00
James Chen 58205ff322 fixed #2247: Using functions instead of macros to speeding up building for JSB projects. [For not auto binding glue codes]. 2013-06-04 12:53:42 +08:00
James Chen bba2d2bbdc fixed #2247: Using functions instead of macros to speeding up building for JSB project. 2013-06-03 22:31:24 +08:00
James Chen 974546557d fixed #2214: Upgrading Spidermonkey to Firefox v21 2013-05-22 17:31:07 +08:00
James Chen e21926edb8 fixed #1644: Passing NULL parameter to ccdictionary_to_jsval will cause crash. 2013-05-22 11:56:47 +08:00
folecr cf328b5592 Set socket option SO_NOSIGPIPE for IOS 2013-05-20 14:30:41 -07:00
folecr 95487da933 clearBuffers() and JSBDebug_BufferWrite() will both immediately write data in the output buffer to the socket.
* Note : comments in the code say that locking is not an issue. This should be reviewed.
2013-05-20 14:30:41 -07:00
folecr 923d12fa48 Clean up debugger server
* Remove perpetual innner while loop
    * Macro to TRACE_DEBUGGER_SERVER
2013-05-20 14:30:40 -07:00
minggo b118cf6d72 issue #1859:fix compiling error of ScriptingCore.cpp 2013-05-17 09:57:55 +08:00
carlo morgantini 3b50ffe5ba Fix problem with CCLabelTTF + shadow and text alignment; also fontDefinition property names now are lowercase 2013-05-15 16:37:08 -07:00
carlo morgantini 315999edad new "manual" conversion for ccFontDefinition in JS and also updated LabelTest.js using this new way of passing parameters to CCLabelTTF through ccFontDefinition 2013-05-15 16:37:08 -07:00
James Chen 9a7c849ce4 fixed #2106: Fixing a bug on android when only jsc files exist. 2013-05-07 10:50:09 +08:00
James Chen bf6bbba6ee Merge branch 'master' of https://github.com/sunzhuoshi/cocos2d-x into iss2106-js-bytecode 2013-05-07 09:43:24 +08:00
sunzhuoshi fa39c41136 Fixed bad commit 2013-05-06 19:06:16 +08:00
James Chen 9a63b39974 Merge branch 'master' of https://github.com/sunzhuoshi/cocos2d-x into iss2106-js-bytecode 2013-05-06 18:13:26 +08:00
sunzhuoshi 3da5a7d5cd Removed redundant code 2013-05-06 18:06:18 +08:00
sunzhuoshi 6e70884853 Removed redundant code 2013-05-06 15:43:33 +08:00
James Chen f86a843c8b Merge branch 'master' of https://github.com/sunzhuoshi/cocos2d-x into iss2106-js-bytecode 2013-05-06 12:55:44 +08:00
sunzhuoshi d4c4170368 Removed bad comment 2013-05-06 12:02:17 +08:00
James Chen 4657ef716c Merge branch 'master' of https://github.com/sunzhuoshi/cocos2d-x into iss2106-js-bytecode 2013-05-06 11:43:40 +08:00
sunzhuoshi de27f1137a Changed byte code file ext to ".jsc"
Modified loading logic to load js file first
2013-05-06 11:32:23 +08:00
James Chen 0718e6cf70 Merge branch 'master' of https://github.com/sunzhuoshi/cocos2d-x into iss2106-js-bytecode 2013-05-06 11:15:19 +08:00
minggo 0c721096ec fixed #2099:fixed a bug in ScriptingCore::evalString not setting the outval 2013-05-02 09:03:24 +08:00
sunzhuoshi 077214c419 Modified to ensure no popup notify when no byte code file 2013-04-30 20:39:06 +08:00
sunzhuoshi d4832e3f46 Merge branch 'master' of https://github.com/cocos2d/cocos2d-x into cocos2d-master
Conflicts:
	scripting/javascript/bindings/ScriptingCore.cpp
2013-04-30 03:51:07 +08:00
sunzhuoshi 163c19fac2 Added support for javascript byte code 2013-04-30 03:29:56 +08:00
James Chen 5572990e5d Synchronizing some JSB changes in cocos2d-iphone. Fix a bug of "Too much recursion" in loop. 2013-04-25 20:56:27 +08:00
James Chen 556d95d922 Removing an unused comment in ccaffinetransform_to_jsval. 2013-04-18 14:13:26 +08:00