Commit Graph

222 Commits

Author SHA1 Message Date
James Chen b128018f76 Merge branch 'suppressed-C4996' of https://github.com/savdalion/cocos2d-x into savdalion-suppressed-C4996
Conflicts:
	extensions/CocoStudio/Armature/external_tool/GLES-Render.cpp
	samples/Cpp/TestCpp/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.cpp
2013-09-16 20:58:26 +08:00
signmotion 5dffb1b44e Deprecated methods are replaced (warning MSVC C4996 is suppressed). 2013-09-16 15:38:03 +03:00
James Chen dd7bfd7b60 Merge branch 'develop' of git://github.com/cocos2d/cocos2d-x into new-event-dispatcher-rebase
Conflicts:
	cocos2dx/CCDirector.h
	cocos2dx/keyboard_dispatcher/CCKeyboardDispatcher.h
	cocos2dx/keypad_dispatcher/CCKeypadDelegate.h
	cocos2dx/keypad_dispatcher/CCKeypadDispatcher.h
	cocos2dx/layers_scenes_transitions_nodes/CCLayer.h
	cocos2dx/menu_nodes/CCMenu.h
	cocos2dx/platform/CCAccelerometerDelegate.h
	cocos2dx/platform/android/CCAccelerometer.h
	cocos2dx/platform/ios/CCAccelerometer.h
	cocos2dx/platform/mac/CCAccelerometer.h
	cocos2dx/platform/win32/CCAccelerometer.h
	cocos2dx/script_support/CCScriptSupport.h
	cocos2dx/touch_dispatcher/CCTouchDelegateProtocol.h
	cocos2dx/touch_dispatcher/CCTouchDispatcher.h
	cocos2dx/touch_dispatcher/CCTouchHandler.h
	extensions/CocoStudio/Components/CCInputDelegate.h
2013-09-13 19:06:09 +08:00
samuele3hu d8bd65b2e8 issue #2784:Add class constructor js-binding document 2013-09-13 16:46:31 +08:00
samuele3hu 5ddd9ae23c issue #2784:Delete class destuctor js-binding and lua-binding document 2013-09-13 13:52:42 +08:00
samuele3hu a34ec99014 issue #2784:Add js-binding and lua-binding document 2013-09-13 11:41:20 +08:00
James Chen 6f37529236 [dispatcher] Adding 'Node::updateEventPriorityIndex' and making 'Node::addEventId(removeEventId)' method to be private. 2013-09-12 20:47:15 +08:00
minggo c5b113c35e Merge pull request #3554 from ricardoquesada/fileutils_perf_improvements
Fileutils perf improvements
2013-09-08 19:50:12 -07:00
James Chen b8c82ae5a9 [develop] Warning fixes. 2013-09-08 11:26:38 +08:00
Ricardo Quesada 2d2e15d275 Key should start with '/' to gain performance
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-09-06 22:51:47 -07:00
Ricardo Quesada b2a81b5b86 Removes some Hungarion notation...
...and improves performance in FileUtils: String is not created
2013-09-06 18:46:33 -07:00
minggo 2de8963a0a fix warnings caused by deprecating some functions of Array 2013-08-22 10:45:47 +08:00
boyu0 1f87fa37f4 closed #2522: Fix some coding style. 2013-08-12 17:05:19 +08:00
James Chen 2df0b056ce closed #2480: Fixed the crash caused by improper deletion of VBOs and VAO in ParticleSystemQuad. 2013-08-05 15:42:01 +08:00
dotsquid e92337f82d Fixed the crash caused by improper deletion of VBOs in ParticleSystemQuad. 2013-08-05 15:23:01 +08:00
Timothy Qiu 978fc634be Use C++ code in C++ comments.
Removed Hungarian notation from parts of the code.
2013-08-01 16:40:56 +08:00
boyu0 afde1e57b2 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into 2345 and fix the per premultipied tag 2013-07-30 11:10:05 +08:00
James Chen 343c98af13 Fixing warnings of the order of member variables and fixing errors for tizen projects. 2013-07-29 14:07:57 +08:00
boyu0 cecfc13bc4 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into 2345 2013-07-27 22:06:30 +08:00
James Chen 4f9d0672aa Fixing errors when disabling VAO. 2013-07-26 13:49:24 +08:00
James Chen 37f6685894 MODE_GRAVITY --> Mode::GRAVITY, POSITION_TYPE_XXX --> PositionType::XXX 2013-07-26 13:48:32 +08:00
Ricardo Quesada 8bf24f0475 ccGLXXX -> GL::xxx
Adds GL namespace. Deprecates the `ccGLFunctionName` functions. New functions are `GL::functionName`

Also, converts the class `DrawPrimitives` into a namespace
2013-07-25 18:42:53 -07:00
Ricardo Quesada 191aaebe2a More const fixes
`Menu::STATE_XXX` -> `Menu::State::XXX`
Removes more Hungarian notation
Removes Configuration::Type <- I added it a few months ago, and it was not being used. It is safe to remove it
2013-07-25 17:47:42 -07:00
Ricardo Quesada 07c6c904cc Removes more Hungarian notation and more
Adds Touch::DispatchMode. Removes Layer::TouchDispatchMode
2013-07-25 16:27:24 -07:00
Ricardo Quesada 058935aa8d Removes Hungarian notation
Removes Hungarian notation from the code.
2013-07-25 15:53:24 -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
boyu0 a2b611d8c3 Refactor Image and Texture2D, combine TexturePVR to Image and Texture2D, and delete TexturePVR 2013-07-25 21:35:00 +08:00
minggo 2bb577be8b issue #2430:change Image enum item to upper letter 2013-07-25 20:29:53 +08:00
minggo 2293630335 issue #2430:move enum in ccTypes.h class 2013-07-25 18:46:43 +08:00
minggo acdd1cfe9d issue #2430:move GLProgram enum into class 2013-07-25 17:48:22 +08:00
minggo 658bffbb69 issue #2430:use upper letter for enum item in ccGLStateCache.h 2013-07-25 15:04:13 +08:00
minggo edcea3eb8d issue #2430:move more Particle enum into class 2013-07-25 14:27:46 +08:00
minggo 4bfe6c2439 issue #2430:move Particle enum into class 2013-07-25 13:54:32 +08:00
James Chen 9c859d5f9d issue #2378: Mark ParticleSystem::getOpacityModifyRGB as deprecated. 2013-07-23 20:44:42 +08:00
James Chen a0851cb5e0 issue #2378: Minor fix in CCParticleSystem. 2013-07-23 20:39:54 +08:00
James Chen 4110b95e96 issue #2378: inline function are in header files now. 2013-07-23 20:36:41 +08:00
James Chen a1c4c73c1c issue #2378: More setter/Getter, removing CC_PROPERTY_XXX macros. 2013-07-23 18:26:26 +08:00
minggo f6cfe3007f issue #2412:fix merging conflict 2013-07-23 10:41:11 +08:00
James Chen b58d18e20a More unsinged int -> int in some places where it could be difficult to find underflow bugs. And some warnings fix. 2013-07-22 14:28:19 +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 1f0dac4ed0 Removes CC_PROPERTY / CC_SYNTHESIZE from some parts of the code
As agreed previously, CC_PROPERTY_XXX and CC_SYNTHESIZE_XXX should
not be used in the code.
This patch removes some of them. There are still many more to remove
2013-07-19 13:16:38 -07:00
minggo 7704ab9161 issue #2412:remove platform.cpp/.h 2013-07-19 13:42:45 +08: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
James Chen 209392085c issue #2410: Reverting some changes about VAO. And adding CC_ENABLE_CACHE_TEXTURE_DATA to 'EVNET_COME_TO_FOREGROUND' in DrawNode. 2013-07-17 13:53:16 +08:00
James Chen 56419b9e90 issue #2410: [Android] Adding listener for CCDrawNode when application resume from background.
Reset the order of reloading shaders and textures in main.cpp.
2013-07-17 12:53:30 +08:00
minggo eada29ee40 issue #2404:created CCDprecated.h and move all global functions and variables into it 2013-07-15 16:14:26 +08:00
Jason Lust 5455d20fc1 Fix Issue #2354
Once a Texture Atlas VAO has deallocated by glDeleteVertexArrays. The GLStateCache may have been recently set to that vaoID. When shortly after a new glGenVertexArrays gets the same vaoID but the glBindVertexArray is bypassed because of the GLStateCache is not aware the VAO was just invalidated, and new vertex are copied to the old freed address.
2013-07-12 19:51:42 -07:00
minggo 6abe6fce78 closed #2393: fix conflicts 2013-07-12 18:04:32 +08:00
minggo 5d9fea1416 issue #2393:mark PointZero RectZero and SizeZero as deprecated 2013-07-12 14:47:36 +08:00