Commit Graph

222 Commits

Author SHA1 Message Date
boyu0 86074c23d8 issue #2345: class Image add tga image format support. 2013-11-29 14:31:42 +08:00
minggo bcb131262c add helper funcion to invoke a function in gl thread 2013-11-27 16:49:07 +08:00
James Chen 63702188be issue #3258: Compilation error fix for linux port. 2013-11-26 15:56:43 +08:00
Ricardo Quesada 9b52af010d Macro CC_DISABLE_COPY is renamed to CC_DISALLOW_COPY_AND_ASSIGN
and the old CC_DISALLOW_COPY_AND_ASSIGN is removed
2013-11-22 16:09:05 -08:00
Jason Xu 7c5784005c Fix: on android, Device::setAccelerometerInterval will causes dead loop 2013-11-23 00:07:15 +08:00
Ricardo Quesada b6ddc6d048 Uses std::unordered_map<> instead of std::map<>
and more fixes.
2013-11-21 13:43:59 -08:00
Ricardo Quesada 90f51e0dab Merge branch 'develop' into constructors_are_protected 2013-11-20 11:26:55 -08:00
Ricardo Quesada 6a8c4784a4 Adds some #pragma mark love 2013-11-20 11:26:33 -08:00
Ricardo Quesada 9a51d6c0ba Merge branch 'develop' into constructors_are_protected 2013-11-19 17:59:43 -08:00
Ricardo Quesada 0d750cdbaf Adds virtual destructors on Interfaces
Classes with at least one virtual function needs a virtual destructor.
This patch adds virtual destructors to  Interface classes

And also enables  'warn on  missing virtual destructors'
2013-11-19 16:57:23 -08:00
Ricardo Quesada c943702bc8 Merge branch 'develop' into constructors_are_protected
Conflicts:
	cocos/editor-support/cocostudio/CCActionObject.cpp
	samples/Cpp/TestCpp/Classes/PhysicsTest/PhysicsTest.h
2013-11-18 11:07:15 -08:00
minggo c7971bcaad Merge pull request #4300 from minggo/textinput-crash
[ci skip]fix crash of textinput test case
2013-11-18 00:23:51 -08:00
minggo 30b7ac8dd1 fix crash of textinput test case 2013-11-18 15:14:48 +08:00
Huabing.Xu 09f27f1d16 HotFix: remove Mac platform Image::saveToFile assert 2013-11-18 10:14:57 +08:00
Ricardo Quesada 208d25bdff ControlSwitch compies
Uses procted constructor
2013-11-15 12:04:47 -08:00
Ricardo Quesada 417657b5a9 Merge branch 'develop' into constructors_are_protected 2013-11-15 10:11:49 -08:00
Huabing.Xu 022b5c7b9a Merge branch 'develop' into free_instead_of_delete
# By CaiWenzhi (4) and others
# Via minggo (7) and others
* develop:
  fix asynchronize loading bug
  [AUTO] : updating submodule reference to latest autogenerated bindings
  fixed #3185 support for html5.
  fixed bug of widget
  fixed bugs of widget
  fixed #3185  ComponentTest and SceneTest NULL to nullptr.
  Add deprecated functions of class TextureCache
  fix warning
  set z order after reorder
  fixed #3185 replace NULL to nullptr.
  add "override"
  fixed #3185
  Modify code criterion

Conflicts:
	cocos/editor-support/cocostudio/CCSGUIReader.cpp
	cocos/editor-support/cocostudio/CCSSceneReader.cpp
2013-11-15 09:44:29 +08:00
Ricardo Quesada a583ad461f CCControlButton has protected constructor 2013-11-14 17:19:16 -08:00
minggo 2f7f05d1d7 fix asynchronize loading bug 2013-11-14 18:39:23 +08:00
Huabing.Xu 4894632467 Fix bug: add android, fix android can not compile 2013-11-14 17:14:35 +08:00
Huabing.Xu 03c8c8f4fc Fix bug: use free() in imageCommon_cpp.h 2013-11-14 14:48:16 +08:00
Huabing.Xu bc55d3246b Merge branch 'develop' into free_instead_of_delete
# By minggo (12) and others
# Via minggo (18) and others
* develop: (78 commits)
  [AUTO] : updating submodule reference to latest autogenerated bindings
  Update CHANGELOG[ci skip]
  Update AUTHORS [ci skip]
  fix bug: cccolor to jsval function has error in jsb
  [ci skip]
  [ci skip]
  [ci skip]
  [ci skip]
  [ci skip]
  C++11: NULL -> nullptr
  [ci skip]
  Fix: UserDefault::createXMLFile with correct XML definition.
  [ci skip]
  [ci skip]
  [ci skip]
  Fix bug: rename const with under line seperator
  [AUTO] : updating submodule reference to latest autogenerated bindings
  Fix bug: Z fighting on TransitionScenePageTurn
  Fixed bugs
  Modify reader and fixed bugs
  ...

Conflicts:
	cocos/editor-support/cocostudio/CCSGUIReader.cpp
2013-11-14 14:47:01 +08:00
minggo ed83a0b374 Merge pull request #4205 from bmanGH/fix_touch_retain
[ci skip]fix direct delete touch object without use release crash bug;
2013-11-13 18:30:21 -08:00
minggo 84689e0121 Merge pull request #4206 from boyu0/iss2770_fix_warnings
[ci skip]issue #2770: fix warnings
2013-11-13 17:57:25 -08:00
boyu0 fb04c9e574 issue #2770: fix some warning 2013-11-13 11:22:34 +08:00
bmanGH 683ce1692d Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into feature/configuration_VAO_runtime
Conflicts:
	cocos2dx/CCConfiguration.cpp
	cocos2dx/draw_nodes/CCDrawNode.cpp
	cocos2dx/particle_nodes/CCParticleSystemQuad.cpp
	cocos2dx/platform/android/CCEGLView.cpp
	cocos2dx/platform/ios/EAGLView.mm
	cocos2dx/textures/CCTextureAtlas.cpp
	cocos2dx/textures/CCTextureAtlas.h
2013-11-12 20:18:04 +08:00
bmanGH 9893fbc514 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into fix_touch_retain
Conflicts:
	cocos2dx/platform/CCEGLViewProtocol.cpp
2013-11-12 19:24:09 +08:00
James Chen cfd82a26bb Merge pull request #4156 from bopohaa/patch-1
closed #3159: Webp Test Crashes.
2013-11-11 18:31:03 -08:00
Ricardo Quesada be64dd97cf replaces `delete[]` with `free()` in C-based API
API that returns a newly allocated buffer as an output argument (not return value) are error-prone.

- Users forget to release the newly allocated buffer
- Or the call `delete` instead of `delete[]`

But some of those API need to call `realloc` on the buffer.
But `realloc` is only valid if the buffer was previously allocated with `malloc`.
If a buffer needs to be re-allocated using a C++ API, then `std::vector<char*>` should be used instead...

So, this patch does:

- Migrates the API from  `new []` / `delete[]` to  `malloc()` / `free()`
- Fixes all the memory issues: incorrect deallocs and memory leaks
- Updates the documentation
- And fixes misc issues with the API: removes `cc` from the ZipUtils class.
2013-11-11 18:09:47 -08:00
James Chen cc3a6ebda9 Merge pull request #4150 from ledyba/fix_ccdevice
Close X Display
2013-11-11 17:40:32 -08:00
Ricardo Quesada d6446e9b14 calls `delete[]` instead of `delete`
calls `delete[]` instead of `delete`
2013-11-11 16:07:46 -08:00
James Chen 51cfd3fb4b Merge pull request #4151 from pyrasis/develop
[Win32] fix compile error.
2013-11-11 04:42:42 -08:00
minggo cd22f5543b Merge pull request #3997 from ondesly/screen_size_change
[ci skip]android & ios screen size change support
2013-11-10 23:10:13 -08:00
minggo bbb2579114 Merge pull request #4160 from dabingnn/iss3025_TextureCache
[ci skip]Iss3025 texture cache
2013-11-10 23:08:01 -08:00
Huabing.Xu 02da3a29cc issue #3025: deprecate TextureCache::reloadAllTextures, call VolatileTextureMgr::reloadAllTextures instead 2013-11-11 11:38:02 +08:00
bopohaa ef92efcd79 Update CCImageCommon_cpp.h
webp don't work for me
2013-11-11 02:28:27 +03:00
Lee, Jae-Hong 5e36021d54 [Win32] fix argument type.
- argument of interface is a long type.
2013-11-09 23:44:15 +09:00
psi c4e70387f7 Close display 2013-11-09 23:02:45 +09:00
Ricardo Quesada 5faae4a51e removes exe bit from text files 2013-11-08 11:30:50 -08:00
minggo b9b14571ac fix compiling erros on Android 2013-11-07 17:16:31 +08:00
James Chen 4e4798fdcc Merge commit 'refs/pull/4099/head' of https://github.com/cocos2d/cocos2d-x into 64bit-fix 2013-11-06 15:15:47 +08:00
Ricardo Quesada 84a6aa29cd Adds more 64-bit fixes
Replaces more `int` with `long` where it makes sense.

Also , it repalces some `unsigned long` with `long` for "lenght"
values as described in our c++ guideline
2013-11-05 17:36:44 -08:00
Chris Hannon 471dd07f3b [android] update nativeactivity.cpp to work with changes made in commit 0220f27 (AMD support), changing int to long int for the second argument in most touch callbacks 2013-11-05 15:54:31 -05:00
James Chen 963d7f3bd0 Changes the touch id declaration from int to long. 2013-11-05 15:49:58 +08:00
Ricardo Quesada ba7ed6e578 Fixes some compiler warnings
The warnings are related to:

* 64-to-32-bit conversion
* shadow variables
2013-11-04 16:31:36 -08:00
Ricardo Quesada 8fb5fad20d Merge branch 'develop' into arm64 2013-11-04 15:02:35 -08:00
Ricardo Quesada 0350ac7021 arm64 support 2013-11-04 11:53:40 -08:00
James Chen e560de6e4e HelloCpp works. 2013-11-04 21:03:07 +08:00
Michael Contento ffad18a1ed Trigger onKeyReleased only after the key has been released 2013-11-02 06:15:08 +01:00
James Chen c754e1b64f Merge pull request #4035 from darkdukey/mousewheel_mac
issue #3099: Adding MouseEvent and MouseListener, Adding Mouse Support For Desktop Platform.
2013-11-01 02:33:28 -07:00
James Chen ed10b92a60 Fix of including wrong include files. 2013-11-01 15:19:10 +08:00
samuelhu 15cf519757 issue #2970:crash for CCLabelTTF when setting dimension width less than the font height 2013-10-31 16:59:55 +08:00
Nite Luo fe04448c8d Merge folder changes from develop 2013-10-30 23:19:36 -07:00
James Chen 5c8424423e issue #3069: Update ios/CCDevice.mm. 2013-10-29 16:29:29 +08:00
James Chen e2ce714463 issue #3069: Update device.mm for iOS. 2013-10-29 16:20:42 +08:00
James Chen ca598f29eb Merge pull request #4008 from dumganhar/touchevent-refactor
issue #3069: Refactor and Improve EventDispatcher
2013-10-29 00:46:56 -07:00
James Chen 91932ea906 issue #3069: Fixing compilation errors. 2013-10-29 15:36:43 +08:00
Andrew Glass 06bd7fafd5 Clear NoSuchMethodError Exception when JniHelper fails to find methodID
When calling GetMethodID a NoSuchMethodError will be raised if the method cannot be found.
See http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/functions.html#wp16660
This exception should be cleared if JNI execution is to be continued.
Currently JniHelper informs that the method is not found, but there is no way to continue execution without manually clearing the exception. This prevents checking for the existence of a method and recovering from it being missing.

This fix will clear the exception if JniHelper fails to find the method.
2013-10-28 18:40:58 +00:00
James Chen 48ce5e39fe EventDispatcher is managed by Director now, like Scheduler and ActionManager. 2013-10-26 15:04:01 +08:00
James Chen 27b71ba73c Use integer as event type and listener type. 2013-10-25 10:53:47 +08:00
James Chen 1f3863e787 Event Dispatcher refactor commit. TestCpp could run. 2013-10-25 10:53:45 +08:00
ondesly 969b464b9b android & ios screen size change support 2013-10-23 12:29:59 +04:00
minggo abcf8f268d fix conflicts 2013-10-22 18:36:13 +08:00
minggo 6a664d480a issue #2905:samples build ok on linux 2013-10-22 18:01:56 +08:00
Dhilan007 6ce34288e0 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into develop 2013-10-18 15:53:26 +08:00
minggo 5f65cdc3c0 fix xcode compiling error and simplify android.mk 2013-10-18 15:39:09 +08:00
Dhilan007 6f39f903e3 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into develop 2013-10-17 16:23:19 +08:00
XiaoLongHan a2de02cc19 Change the class name of textfield to compare, so that you can touch anywhere outside of the virtual keyboard. 2013-10-17 14:21:55 +08:00
Dhilan007 2865ad798b issues #2905:Updating project configuration for folder change. 2013-10-15 10:18:37 +08:00
James Chen 438fe70287 issue #2905: [iOS, Mac] HelloCpp works now. 2013-10-14 15:53:14 +08:00
minggo 95acb1b9e3 issue #2905: helloworld build ok on android 2013-10-14 14:01:00 +08:00
minggo 4313c46e93 issue #2905:adjust folder structure 2013-10-12 11:22:05 +08:00