Commit Graph

1849 Commits

Author SHA1 Message Date
James Chen fa6a0d4051 issue #2301: m_pTextures --> _pTextures. 2013-06-19 13:15:03 +08:00
James Chen 1eadcd8b38 fixed #2301: Merge branch 'emscriptenate' of https://github.com/j4m3z0r/cocos2d-x into j4m3z0r-emscriptenate
Conflicts:
	cocos2dx/proj.emscripten/cocos2dx.mk
2013-06-19 13:03:51 +08:00
Lee, Jae-Hong b546fc3214 Implement Accelerometer. 2013-06-19 09:31:34 +09:00
minggo e9d8595617 fixed #2124: make CCImage::initWithIamgeFileThreadSafe() thread safe 2013-06-18 17:10:54 +08:00
James Gregory ad90fe88a8 Merge remote-tracking branch 'origin/master' into emscriptenate 2013-06-17 20:30:36 -07:00
waiter ecebf31287 solve android crash with CCLabelTTF setString function
solve android crash with CCLabelTTF setString function
2013-06-18 10:08:34 +08:00
James Gregory 5095b03f9c Get async image loading building with -O2 and asm.js 2013-06-17 17:10:41 -07:00
minggo b9c85d87ae Merge pull request #2896 from dumganhar/iss2129-format-codes
issue #2129: New naming of member varibles, renaming m_iVar to _var.
2013-06-17 03:27:01 -07:00
James Chen 8fb40eaee2 android target 17 --> 8. 2013-06-17 15:55:09 +08:00
James Chen 4c6043c9d2 Merge pull request #2898 from pyrasis/tizen_2.1
[Tizen] Add armv7l webp library.
2013-06-15 20:03:37 -07:00
Lee, Jae-Hong 8c1953eed9 Add armv7l webp library. 2013-06-16 11:07:55 +09:00
James Chen c0d44cb2e4 fixed #2129: Rename m_iVar to _var, remove CC prefixes. 2013-06-15 14:03:30 +08:00
James Chen 82cd7bb01f Merge branch 'iss2284-merge-master' of https://github.com/minggo/cocos2d-x into minggo-iss2284-merge-master 2013-06-14 15:41:01 +08:00
minggo a221f06592 issue #2284: fix bugs after merging master 2013-06-14 14:34:50 +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
Mykyta Usikov 28e8899089 fixed strokeColor and fontFillColor of CCLabelTTF 2013-06-13 14:16:33 +03:00
minggo cd5bcb87af issue #2284: merge master and fixed some conflicts 2013-06-13 17:54:05 +08:00
James Chen b372fc8534 Merge pull request #2872 from maciekczwa/develop
fixed #2283: Adding Polish language support.
2013-06-13 00:00:36 -07:00
James Chen 0de1a4ebd8 Merge pull request #2877 from pyrasis/tizen_2.1
Support Tizen device
2013-06-12 22:56:23 -07:00
Ricardo Quesada c1d519aac2 LabelTTF vertical alignment fixed on OS X
vertical alignment was broken on OS X.
top and bottom were switched.
2013-06-13 10:46:28 +08:00
minggo 92ce25371a Merge pull request #2874 from ricardoquesada/labelttf_mac_fix
LabelTTF vertical alignment fixed on OS X
2013-06-12 19:45:31 -07:00
Ricardo Quesada 1780643c63 merge pull reqeust fixing for iOS7 and Xcode5 into master 2013-06-13 10:43:41 +08:00
James Gregory 872be8e964 Initial commit of browser accelerated async image-loading code for Emscripten. 2013-06-12 14:46:32 -07:00
Lee, Jae-Hong 1bd3f10601 Support Tizen device. 2013-06-12 10:20:18 +09:00
Ricardo Quesada 75b9913c92 LabelTTF vertical alignment fixed on OS X
vertical alignment was broken on OS X.
top and bottom were switched.
2013-06-11 14:59:40 -07:00
Ricardo Quesada af49023741 Fixes for iOS7 and Xcode5 2013-06-11 12:11:05 -07:00
Maciej Czerniak 1e71ea85f3 add Polish language support 2013-06-11 16:46:38 +02:00
Maciej Czerniak dddb487639 fix formatting 2013-06-11 16:43:35 +02:00
Maciej Czerniak c9b88e1c0c add missing Norwegian language for marmelade platform 2013-06-11 16:41:54 +02:00
Maciej Czerniak eb79c01003 add missing Norwegian language for linux platform 2013-06-11 16:39:33 +02:00
Rene Klacan f31a258c01 Merge pull request from cocos2d/develop 2013-06-11 01:06:12 +02:00
minggo 6eaa1f97ec Merge pull request #2828 from minggo/develop
fixed #2161: fixed crash of loading ETC file
2013-06-08 02:02:52 -07:00
minggo d5bfe10379 fixed #2161: fixed crash of loading ETC file 2013-06-08 17:01:45 +08:00
minggo 2b3f3b6744 fixed #2161: fixed crash of loading ETC file 2013-06-08 16:58:18 +08:00
minggo 52f55802b7 Merge pull request #2826 from minggo/develop
make CCFileUtil::getFileData() get data correctly
2013-06-07 22:44:01 -07:00
minggo f56c20657b fixed #2266:make CCFileUtil::getFileData() get data correctly 2013-06-08 13:42:52 +08:00
minggo 6d3615157a fixed #2266:make CCFileUtil::getFileData() get data correctly 2013-06-08 13:40:03 +08:00
minggo f2be4c62ee Merge pull request #2820 from minggo/develop
fixed #2161: don't close AssetManager
2013-06-07 20:24:27 -07:00
minggo b023158c85 fixed #2161: don't close AssetManager 2013-06-08 11:23:13 +08:00
minggo 206502dccb fixed #2161: don't close AssetManager 2013-06-08 10:57:19 +08:00
Michael Chinen 9471c51201 set up keyboard handling for mac 2013-06-07 20:29:02 +09:00
Lee, Jae-Hong b9f5691706 [Tizen] Add libwebsockets.h, .a and support C++11 2013-06-07 20:14:43 +09:00
James Chen ec8ab8bd8b Updating multi-platform-xxx template for win32. 2013-06-07 12:57:28 +08:00
James Chen d72e9d10b5 Updating multi-platform-xxx template for win32. 2013-06-07 12:50:02 +08:00
Ricardo Quesada 428711482e Adds missing config files for CCConfiguration
...and add functionality on the Director to override the default values
from the config file.

Supported values:

 - cocos2d.x.fps
 - cocos2d.x.display_fps
 - cocos2d.x.gl.projection
 - cocos2d.x.texture.pixel_format_for_png
 - cocos2d.x.texture.pvrv2_has_alpha_premultiplied

If the "config.plist" file is not present, or some keys are not present,
the default values are going to be used

IMPORTANT:
 The folder "samples/Cpp/TestCpp/Resources/configs" needs to be added
 in the Android, Linux, Win32 projects.
 Already added in OS X and iOS Xcode projects.
2013-06-06 12:23:44 -07:00
James Chen 5832934e41 Reverting target to android-8. 2013-06-06 16:20:22 +08:00
Rene Klacan 8b16178f9f Merge pull request from cocos2d/develop 2013-06-06 09:42:18 +02:00
James Chen 5c592943db [Mamarlade] Fixing a compilation error in cocos2dx/platform/marmalade/CCImage.cpp. 2013-06-06 15:02:57 +08:00
James Chen ab3f42bb5f Merge pull request #2784 from dumganhar/some-fixes-marmalade-master
[master] Some fixes:
Adding libwebsockets license in WebSocket.h/.cpp.
Log error instead of triggering an assert for shadow and stroke.
[Mamarlade] Fixing a compilation error in cocos2dx/platform/marmalade
Fixing a bug that display is wrong when setting setTexture(NULL) for CCSprite
[Spine] Using getContentSize to make spine-runtime supports the strategy of loading resources in cocos2d-x.
Removing unreadable print in CCBReaderLoad.lua.
Removing CODE_SIGN_IDETITY section in prom.pbxproj.
Marmalade projects fix.
2013-06-05 23:47:01 -07:00
James Chen 0248c23b20 [Mamarlade] Fixing a compilation error in cocos2dx/platform/marmalade/CCImage.cpp. 2013-06-06 14:19:59 +08:00
minggo a8fe210c7e fixed #2260: make CCDictionary::createWithContentsOfFile() return NULL when the file is missing 2013-06-06 12:50:42 +08:00
Ricardo Quesada 479062fdb7 on dealloc, log "this" with %p, not %x.
Also adds %p where it was missing.
And make a few fixes on the iOS project
2013-06-05 18:21:05 -07:00
Ricardo Quesada 609801e900 compiles on linux and other machines without C99 support 2013-06-05 09:29:27 +08:00
Ricardo Quesada 9b305a60d1 cc_timeval works on 64bit machines, like OS X 2013-06-05 09:29:12 +08:00
René Klačan f66e12f414 Merge pull request #4 from cocos2d/develop
pull request from main repo
2013-06-04 02:05:36 -07:00
minggo c21812b270 Merge pull request #2729 from ricardoquesada/timeval_64bit_fix
cc_timeval works on 64bit machines, like OS X
2013-06-03 22:47:45 -07:00
Ricardo Quesada 7e7e943699 compiles on linux and other machines without C99 support 2013-06-03 20:45:06 -07:00
Ben Ward 0f8fa2e5a4 Fixed tabbing. 2013-06-04 10:45:20 +08:00
Ben Ward 73b8050fa1 Fixed linebreaks on Mac OSX 2013-06-04 10:45:07 +08:00
minggo 74b86021e6 Merge pull request #2624 from benjamesward/master
Fixed linebreaks on Mac OSX
2013-06-03 19:40:34 -07:00
Ricardo Quesada c6d00a3ccb cc_timeval works on 64bit machines, like OS X 2013-06-03 17:31:59 -07:00
René Klačan 9e4c5bbca3 Merge pull request #3 from cocos2d/develop
pull request from main repo
2013-06-03 04:07:43 -07:00
James Chen cedb427a6e fixed #1647: Adding WebSocket support for Cpp and JSB.
Conflicts:
	extensions/proj.win32/libExtensions.vcxproj
	extensions/proj.win32/libExtensions.vcxproj.filters
2013-06-02 18:55:57 +08:00
Rene Klacan c8b4291731 keyboard support throught compiler directive 2013-06-02 04:11:43 +02:00
James Chen 0ff1ef6f84 Merge branch 'tizen_2.1' of https://github.com/pyrasis/cocos2d-x 2013-06-01 23:20:11 +08:00
James Chen 05a88c89dc fixed #1647: Adding WebSocket support for Cpp and JSB. 2013-05-31 23:13:03 +08:00
Rene Klacan 50ad3e1c80 KeyboardDispatcher + tests for it on linux 2013-05-31 14:29:32 +02:00
minggo 08b80bfbc9 Merge pull request #2675 from j4m3z0r/emscriptenate
Emscripten: Fix calculation of offsets in font rendering so that we don't scribble a...
2013-05-29 23:05:05 -07:00
James Gregory 8b4f5b5853 Fix calculation of offsets in font rendering so that we don't scribble all over memory! 2013-05-29 21:25:32 -07:00
Ben Ward d166de4684 Fixed tabbing. 2013-05-29 15:40:19 +01:00
James Chen 8456072aa0 Merge pull request #2671 from pyrasis/tizen_2.1
Implement setIMEKeyboardState function for Tizen
2013-05-29 07:23:47 -07:00
Lee, Jae-Hong ae78bb9b47 Modify space character check. 2013-05-29 23:14:52 +09:00
Lee, Jae-Hong ccd20af8f9 Implement setIMEKeyboardState function for Tizen. 2013-05-29 22:46:52 +09:00
James Chen 50c9515741 Merge pull request #2663 from pyrasis/tizen_2.1
Fix Tizen CCEditBox bug.
2013-05-29 06:39:01 -07:00
minggo 53365b9e46 Merge pull request #2669 from frranck/master
adding norwegian language
2013-05-29 02:10:37 -07:00
franck 3fab093f5b adding Norwegian language support 2013-05-29 10:16:22 +02:00
Lee, Jae-Hong e48553bc27 Delete ByteBuffer pointer and NULL check. 2013-05-29 10:52:45 +09:00
Jaroslaw Lewandowski 2999abed2b Explicitly initialising CCAcceleration structure to report zeros when run in device simulator 2013-05-29 00:02:36 +01:00
Lee, Jae-Hong c20e4f3700 Keep a previous text on Tizen CCEditBox. 2013-05-28 20:43:47 +09:00
Lee, Jae-Hong 5031aa1fd3 Encoding UTF-8 on Tizen CCEditBox and check empty string. 2013-05-28 20:04:37 +09:00
Michael Contento 026026e3af use onWindowFocusChanged(bool) instead of onResume()/onPause()
we should use onWindowFocusChanged(bool) to detect if the app is currently
visitible to the user or not. because onPause()/onResume() leads to false
positives on some android versions (e.g. Kindle Fire). if you lock those
devices, while the app running, everything is fine (onPause() is handled
properly). but as soon as you wake up the device, and the lock screen gets
visible, the app is resumed and the music is played (onResume() is
called to early).

this is a) not the best behaviour and b) such games will be rejected on the
samsung app store. onWindowFocusChanged(bool) is, like onPause()/onResume(),
available since API level 1 and it should be safe to simply switch.
2013-05-28 12:05:46 +02:00
minggo 6f624351b3 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ETC1-support 2013-05-28 11:36:05 +08:00
minggo beef61fc90 issue #2161: android supports ETC format now 2013-05-27 14:42:22 +08:00
Lee, Jae-Hong 47fac0ed98 Implement CCEditBox for Tizen. (develop branch) 2013-05-26 20:40:13 +09:00
Ben Ward dbcb4357e7 Fixed linebreaks on Mac OSX 2013-05-23 18:30:56 +01:00
James Chen 5c506e2edc Merge pull request #2607 from pyrasis/background_foreground_tizen
Implementing foreground and background status for Tizen port.
2013-05-21 21:43:51 -07:00
Lee, Jae-Hong 4152850592 Remove EVENT_COME_TO_BACKGROUND notification. 2013-05-22 13:17:54 +09:00
minggo e07761688e Merge pull request #2591 from nicolasgramlich/patch-1
Updated .classpath of Android project to latest ADT 22 build tool compatibility.
2013-05-21 19:43:25 -07:00
minggo d1a8f54113 Merge pull request #2609 from j4m3z0r/emscriptenate
Add Audio Support for Emscripten
2013-05-21 18:32:12 -07:00
Lee, Jae-Hong d83ed86739 Implementing foreground and background status and modify CocosDenshion comment. 2013-05-21 22:48:51 +09:00
Lee, Jae-Hong 4b248d5f8c Delete Tizen 2.0 headers and libraries. 2013-05-21 21:52:10 +09:00
Lee, Jae-Hong 6f34c7cb46 Support Tizen 2.1 SDK. 2013-05-21 21:22:31 +09:00
minggo 0857fdd599 issue #2188:fix compiling error of iOS 2013-05-21 18:18:44 +08:00
minggo cc2b00e9fe Merge pull request #2573 from j4m3z0r/emscriptenate
Use browser font rendering instead of FreeType
2013-05-20 22:50:28 -07:00
James Gregory da7113a04f Implement audio for Emscripten using SDL. Still needs methods to release samples when we're done with them. 2013-05-20 20:09:56 -07:00
James Chen acef98a350 Merge pull request #2572 from pyrasis/tizen
fixed #2185: Cocos2d-x Tizen support.
2013-05-20 20:08:28 -07:00
Lee, Jae-Hong 5faa5e92af Modify getWritablePath function. 2013-05-21 10:56:18 +09:00
Lee, Jae-Hong 6bb8d58d3a Update cocos2d project and use float.h 2013-05-21 10:32:34 +09:00
Nicolas Gramlich cef2575180 Updated .classpath of Android project to latest ADT 22 build tool compatibility.
Changes correspond to: https://groups.google.com/forum/?fromgroups#!msg/adt-dev/epOfZbKPFdk/RbR2VYNQ5_8J
2013-05-20 14:39:25 -06:00
James Gregory 391fb636fa Add a flag to indicate whether raw image data is pre-multiplied or not, and switch to using Emscripten's SDL implementation when loading images from file (much faster) 2013-05-17 17:11:52 -07:00
James Gregory 7cca63130c Pre-multiply text when rendered by Emscripten's SDL implementation (since HTML5 canvas is non-pre-multiplied). 2013-05-17 17:10:51 -07:00
James Gregory a1ff189854 Query the GL canvas for its width and height and use that rather than hardcoding it. Default the frame size to the whole canvas, and update the samples to use iPad resolution (1024x768). 2013-05-17 12:39:18 -07:00
Lee, Jae-Hong 900190e468 Replace tab to spaces. 2013-05-17 22:04:39 +09:00
James Gregory 95b5ce2e56 Remove freetype since it now works using Emscripten's SDL. 2013-05-16 17:34:33 -07:00
Lee, Jae-Hong 43b11a73d6 Remove unused headers and defines. 2013-05-16 20:24:00 +09:00
Lee, Jae-Hong fb00de3e97 Implementing screen orientation function. 2013-05-16 20:17:11 +09:00
Lee, Jae-Hong e1cf030372 Change the default font path. 2013-05-16 20:16:57 +09:00
Lee, Jae-Hong f47958356c Adding dependencies for libcurl.so 2013-05-16 20:09:23 +09:00
Lee, Jae-Hong 659e884009 Use CCImage.cpp from Linux implementation. 2013-05-16 20:07:31 +09:00
Lee, Jae-Hong e459129fac Move to rootstraps directory. 2013-05-16 20:06:25 +09:00
Lee, Jae-Hong 8915e90a36 Adding CCDevice.cpp for Tizen. 2013-05-16 20:05:04 +09:00
Lee, Jae-Hong 0ba2a82d35 Set return value. 2013-05-16 20:04:51 +09:00
Lee, Jae-Hong 434878c736 Delete libcurl.a because link error. Adding libcurl.so. 2013-05-16 20:04:06 +09:00
Lee, Jae-Hong 109e2feec8 Adding libcurl headers and x86 libraries for tizen. 2013-05-16 20:03:11 +09:00
Lee, Jae-Hong ce4663f851 Implementing file utils use with Osp. 2013-05-16 20:01:36 +09:00
Lee, Jae-Hong 704b8013fc Fix Assert bug. 2013-05-16 20:01:01 +09:00
Lee, Jae-Hong e51fe4f75e Define CC_ASSERT. 2013-05-16 19:59:38 +09:00
Lee, Jae-Hong d887b3cd84 Implementing getCurrentLanguage function. 2013-05-16 19:59:16 +09:00
Lee, Jae-Hong 0bd49de547 Implementing Animation Interval setting. 2013-05-16 19:58:46 +09:00
Lee, Jae-Hong b011bd2904 Implementing touch. 2013-05-16 19:58:14 +09:00
Lee, Jae-Hong d66abaa12c Implementing Termination. 2013-05-16 19:57:47 +09:00
Lee, Jae-Hong 3856c94416 Modify header define. 2013-05-16 19:57:17 +09:00
Lee, Jae-Hong ab8ede5ff8 Adding Osp Application, Osp Form Layer and implementing CCEGLView. 2013-05-16 19:55:26 +09:00
Lee, Jae-Hong 86bf779812 Adding third party headers and x86 libraries for Tizen. 2013-05-16 19:54:01 +09:00
Lee, Jae-Hong 58b181736d Adding platform code for Tizen. 2013-05-16 19:53:37 +09:00
Lee, Jae-Hong 27428dc5f4 Adding defines and enums for Tizen. 2013-05-16 19:49:16 +09:00
minggo 1412eeefd1 Merge pull request #1893 from martell/mingw
Added Mingw-crt Support without breaking VS SDK
2013-05-15 23:30:43 -07:00
James Gregory bdbab7f5cf TTF rendering via SDL now seems to basically work. Not perfect yet, but seems to be about 3X faster on Chrome. 2013-05-15 20:21:30 -07:00
James Gregory 82f1a8e8ff Re-enable mouse-handling. 2013-05-15 20:21:02 -07:00
carlo morgantini fb2a73048d it now shares code between createTextBitmap and createTextBitmapShadowStroke (no more duplication) 2013-05-15 16:37:08 -07:00
carlo morgantini 3c28048c14 fix alignent problem when rendering text with shadow 2013-05-15 16:37:08 -07:00
carlo morgantini 0ff33fd4f5 fix a problem with float stroke size 2013-05-15 16:37:08 -07: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 74441203cb stroke and shadow are implemented and supported only on iOS and Android for now 2013-05-15 16:29:33 -07:00
carlo morgantini fcea506fef fixed some text formatting issues 2013-05-15 16:29:33 -07:00
carlo morgantini c727fa33c0 CCLabelTTF have now a tint, plus bug fixing and code clean up 2013-05-15 16:29:33 -07:00
carlo morgantini 221884f6d4 better CCTexture2D API for init texture with shadow and stroke 2013-05-15 16:29:32 -07:00
carlo morgantini fc846bb9ac label TTF stroke and shadow for Android 2013-05-15 16:29:32 -07:00
carlo morgantini 690d5968ca New stroke and shadows for Android 2013-05-15 16:12:43 -07:00
carlo morgantini dd9b4a8932 new shadow and stroke for CCLabelTTF 2013-05-15 16:12:43 -07:00
James Gregory ab2d94c040 First pass at using SDL to render fonts instead of FreeType. 2013-05-14 21:38:56 -07:00
James Gregory 0daa3adfd6 Emscripten changed ABI for .a files. Rebuild all deps, updating to current version. Switch Emscripten to incoming branch as it's not working on master right now. Added simple script for rebuilding deps in case it becomes necessary again. Switch builds to always use -g flag, per Emscripten's warnings. Undefine native client defines so that it builds (Emscripten switched to NaCl alignment, macro got defined as a side-effect). 2013-05-14 15:26:48 -07:00
James Gregory de1a6340da Add my hacky script to rebuild dependencies, in case this is needed again in the future. 2013-05-14 15:14:54 -07:00
James Chen cdb3985f0d fixed #2151: Commenting a log in CCFileUtils::fullPathForFilename. 2013-05-13 21:48:25 +08:00
James Chen 8fa593a8fe fixed #2151: Custom font can't be loaded correctly if using full path of filename. 2013-05-13 19:12:37 +08:00
James Chen 4e3ff65707 Merge branch 'android_custom_font_fix' of git://github.com/DarraghCoy/cocos2d-x into iss2151-customttf 2013-05-13 18:40:14 +08:00
minggo 3ebb61a09c Merge pull request #2543 from FlagellumDei/patch-1
centerWindow() fix
2013-05-12 19:44:15 -07:00
James Chen 23f23be681 Bug fixes for Nacl port. 2013-05-10 16:02:12 +08:00
Darragh Coy 032aed4499 Fix custom font loading on Android when using fonts that are in resource mapped directories/paths.
1: Use the CCFileUtils::fullPathForFilename function to lookup the resolved path for the font in the Android specific function, CCImage::getBitmapFromJava.

2: Remove a warning previously added in pull request 2422 (https://github.com/cocos2d/cocos2d-x/pull/2422) in CCFileUtils::fullPathForFilename in order to support change (1) above. If we pass just a system font name to CCFileUtils::fullPathForFilename such as 'Arial' (instead of a path) then it should just return 'Arial' and not generate a warning. We can't assume that when a path (or handle) given to CCFileUtils::fullPathForFilename isn't found within Cocos2dx that it doesn't exist or isn't valid. Depending on the platform there might be files or folders or handles that could be accessible to the app which might exist outside of the knowledge of Cocos2dx. The correct place to warn about missing resource files would be at the point where the resource loading itself fails; e.g if a texture or sound fails to load for example.
2013-05-09 14:29:42 +01:00
Attila Szilágyi 989b0a249c Fix centerWindow() when the taskbar is located along the top or left screen edge
centerWindow() will not center the window correctly when the taskbar is located along the top or left screen edge.
2013-05-09 14:13:24 +03:00