Commit Graph

892 Commits

Author SHA1 Message Date
Zhe Wang a640f007ef Fix doxygen format mistakes in enum class Platform
An user reported this error in the forum http://forum.cocos.com/t/api-document/36199/2
I noticed that our doxygen was written in wrong format.
2016-04-30 15:20:24 +08:00
Xpol Wan f111583214 Refactor FileUtils::getFileData() and CCFreeTypeFont::loadFont().
* Remove unnecessary memory copy in FileUtils::getFileData()
* Add Data::takeBuffer() to simplify FileUtils::getFileData() and CCFreeTypeFont::loadFont().
2016-04-29 09:31:09 +08:00
minggo fc5e537327 Merge pull request #15508 from xpol/remove-use-of-getFileData
Remove last internal use of deprecated `FileUtils::getFileData()`.
2016-04-27 09:38:30 +08:00
Xpol Wan bd3c3a7c3d remove default value for size argument. 2016-04-26 14:54:20 +08:00
minggo 2319860d38 remove unsupport flags 2016-04-26 14:08:23 +08:00
Xpol Wan 3f8910d80c Remove last internal use of deprecated `FileUtils::getFileData()`. 2016-04-26 13:57:53 +08:00
xpol 43a94c0693 Add FileUtils::getContents(). (#15479)
* Add FileUtils::getContents().

* skip FileUtils::getContents() in binding generator config.

* use FileUtils::getContents in CCDataReaderHelper.

* obey the cocos2d-x coding style.

* Explicit constructor.

* More docs.

* More tests.

* Move FileError to FileUtils::Error.

* Fixes wrong buffer size for reading into string and vector.

* Update tests.

* Add note on padding for output buffers.

* FileUtils: implements old methods by using `getContents()`.

methods are:

* FileUtils::getDataFromFile()
* FileUtils::getStringFromFile()
* FileUtils::getFileData()

and follow Android methods are now just calls FileUtils' ones.

* FileUtilsAndroid::getDataFromFile()
* FileUtilsAndroid::getStringFromFile()
* FileUtilsAndroid::getFileData()

* Fixes build error.

* FileUtils::getFileData: Return the size of data.

* Remove old methods form FileUtilsAndroid they are now done in FileUtils.

* Fixes for win32 code.

* Fixes build error in test and add more test.

* Better error message.

* Make template type name more readable.

* Update comments.

* Move internal functions to anonymous namespace.

* Refactor FileUtils test.

* Fix warning about compare signed and unsigned.

* Win32 and WinRT does not use text mode.

That is we don't need simulate convert CRLF to LF.

* Fixes for Win32 and WinRT.

* Update for Win32 and WinRT.

* Win32: return FileUtils:Error::TooLarge when file is large than 2^32-1.
* Win32: remove checkFileName() which has no effect at all.
* WinRT: add FileUtilsWinRT::getContents() using ::CreateFile2.
* WinRT: add override keyword for FileUtilsWinRT::getFileSize().

* Update for coding styles.

* More error strings.

* check read and malloc return codes.

* rename FileUtils::Error to FileUtils::Status.

* Fixes for WinRT, use GetFileInformationByHandleEx to get file size.

* Fixes build error for winrt and cleanup FileUtils::Status.

* Try to fix the build error on Linux.

Status must defined in some header, so move FileUtils.h up.

* Remove support of text mode on WinRT (it is the last platform support text mode).
2016-04-26 13:37:22 +08:00
Josh Bodily 614c3c47d7 Josh/winrt inplace editbox (#15473)
* WinRT in-place edit box

* Fix static analysis errors
2016-04-25 11:17:09 +08:00
minggo 6459c92ee7 Merge pull request #13950 from Almax27/patch-4
Added CC_PROPERTY const qualifier
2016-04-21 14:56:01 +08:00
minggo 095f404738 Merge pull request #14735 from linguofeng/patch-2
CCFileUtils-apple.mm Grammatical errors
2016-04-20 11:00:38 +08:00
minggo e16d016c46 Merge pull request #15452 from 1scaR1/fix_osx_sandbox
Implement createDirectory for apple platform.
2016-04-20 10:26:45 +08:00
Julien Jorge a3f28a18df Uniformize image support macro usage.
All images format implementation but WIC test the value of a CC_USE_<FORMAT>
preprocessor macro to verify if the implementation must be available or not.
WIC support is checked against the definition of the macro only,
independently of its value, thus making the implementation available even
if CC_USE_WIC = 0.

This commit makes the tests of the CC_USE_WIC macro identical to the tests
of the other similar image format macros.
2016-04-19 14:15:43 +02:00
Бесшапошников Никита a3717b6907 Add error logging of incorrect directory creating. 2016-04-19 10:17:31 +03:00
minggo 5c567c54b4 Merge pull request #15198 from perminovVS/v3-dev-wrong-log-detect-image-type
Wrong log message if use tga image
2016-04-19 11:00:55 +08:00
minggo f3fd111200 Merge pull request #14944 from mxenabled/josh/export_wicimageloader
Export WICImageLoader form DLL
2016-04-18 18:33:39 +08:00
Бесшапошников Никита e555ed5b9e Implement createDirectory for apple platform. 2016-04-18 12:52:20 +03:00
xiaofeng11 061fc2f287 Fix on win32 platform if cpp-tests' windows been minisized, after window restore, content size is wrong. (#15236) 2016-04-18 17:15:56 +08:00
minggo 6cc80f28fc Merge pull request #15096 from fnz/volume_control
Set music volume control as default
2016-04-18 16:48:55 +08:00
xpol 1e70fb5eb5 Remove include of cocos2d.h (#15435) 2016-04-18 15:09:21 +08:00
xpol 3780064a82 Allow inherit form platform fileutils (#15304)
* Allow inherit form FileUtilsLinux, FileUtilsWin32 and FileUtilsWinRT.

* Removed objc from CCFileUtils-apple.h

define FILEUTILS_APPLE_ENABLE_OBJC to enable FileUtilsApple:setBundle() for compatibility.

* Smart pointers heal us all.

* Add config macro in ccConfig.h and prefix with CC_.

* enabled by default.
* use #if rather than #ifndef.

* Do not deprecate setBundle.
2016-04-14 11:59:24 +08:00
minggo d8764ab730 Merge pull request #15200 from perminovVS/v3-dev-wic-image-loader-bad-hresult
WICImageLoader incorrect use S_FALSE constant
2016-04-07 17:31:15 +08:00
minggo 43a70f0a92 Merge pull request #15342 from xpol/allow-easy-decrypt-plist-files
Allow plist and other ValueMap files be (easy) decrypted.
2016-04-07 11:02:20 +08:00
Xpol Wan cd1c26ecd1 Allow plist and other ValueMap files be (easy) decrypted.
The origin implementation of `FileUtilsApple::getValueMapFromFile()` reads the contents of file and parse it by calling one Apple API.
This make it harder to decrypt user encrypted plist files.

This commit use the `FileUtils::getDataFromFile()` to get read file data first then use `getValueMapFromData()`
to parse it into a ValueMap. Where `FileUtils::getDataFromFile()` can be overwrite by user's decoding file utils (say `DecodingFileUtils`).

I know that user's `DecodingFileUtils` can also overwrite `getValueMapFromFile`, but this pr make the author of `DecodingFileUtils` less suffering.
2016-03-29 21:39:16 +08:00
mogemimi 44080a04d8 Fix typos in comments and strings 2016-03-29 10:52:17 +09:00
Dale Stammen ee05081f3a fixed include paths 2016-03-23 12:14:12 -07:00
Xpol Wan a225130010 Fixes windows universal build. 2016-03-22 18:51:58 +08:00
Xpol Wan 71f0537734 Merge commit '43db5c052d3a8605ebfd9dc2acc23e26129c4265' into remove-uncessary-search-paths 2016-03-22 16:07:02 +08:00
Xpol Wan e7864cdb89 Removed unnecessary search paths. 2016-03-22 16:04:12 +08:00
zilongshanren 400e77808c Revert "UIEditBox attachWithIME, detachWithIME make working" 2016-03-22 14:18:39 +08:00
Xpol Wan 32e408487f Fixes import path for m and mm files. 2016-03-21 20:12:58 +08:00
Xpol Wan 931d56bc10 Fixes includes in .m and .mm files. 2016-03-21 11:02:00 +08:00
Xpol Wan 768f02bae3 revert pch.cpp for windows 8.1 and windows 10. 2016-03-21 11:00:32 +08:00
Xpol Wan 90456d29ba Fixes 1605 include path in 541 files
using the tools/coding-style/include-linter.py with -f options.
2016-03-20 21:53:44 +08:00
zilongshanren 2bb4847848 Merge pull request #15251 from xpol/detect-apple-platforms
Detect Apple platforms
2016-03-18 13:44:24 +08:00
Xpol Wan 4bbfb56983 Try fixes binding generator error. 2016-03-18 10:21:38 +08:00
zilongshanren ad7ac83128 Merge pull request #15240 from newnon/v3_not_needed_define
fix unneeded define that breaks some libraries to build on windows
2016-03-17 11:40:51 +08:00
YooJaehong 7eeccbc771 UIEditBox attachWithIME, detachWithIME make working
(android, iOS tested)
2016-03-17 10:26:53 +09:00
Xpol Wan 0211c372b4 Update comment. 2016-03-16 13:30:11 +08:00
Xpol Wan bfb97739e2 Detect Apple platforms correctly. 2016-03-16 13:15:41 +08:00
Sergey 0d67d5d533 fix unneeded define that breaks some libraries to build on windows 2016-03-14 16:58:01 +03:00
Vladimir Perminov 5c1a272178 Remove comment // S_FALSE is succeeded 2016-03-13 19:30:13 +03:00
Vladimir Perminov 3e16236a95 WICImageLoader incorrect use S_FALSE constant 2016-03-07 15:48:49 +03:00
Vladimir Perminov 8c8c741213 Wrong log message if use tga image 2016-03-07 15:41:20 +03:00
Vladimir Perminov 2a201a5c4e WinRT support key repeat and implement dispatchControlKey 2016-03-07 14:43:44 +03:00
Vladimir Perminov 8eec628e04 Desktop implement dispatchControlKey
And fix bag control char for OSX onGLFWCharCallback
glow send on CharCallback character control key unicode.
2016-03-07 14:33:59 +03:00
Ricardo Quesada 462f4f4c0a Merge pull request #15156 from ricardoquesada/cmake_android_squash_2
cmake for android
2016-03-02 17:24:35 -08:00
Ricardo Quesada 028f8c28e1 Squashed commit of the following:
commit 59e43a3c80f4af8998e4a14f6463bd7a91617d5f
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Mar 2 15:19:48 2016 -0800

    uses new naming convention for projects

    uses _ instead of -

commit f97ba56608d48b17909649c8617ba9047b566196
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Mar 2 14:49:22 2016 -0800

    fooling cmake for real

commit 20c2560f75eab952e5131b484284bf20cb07fe07
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Mar 2 14:43:05 2016 -0800

    fooling cmake

commit a0ada44bc82941830f6c71219a1492d28c28c306
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Mar 2 14:26:59 2016 -0800

    makes CMake for Mac happy

commit 656b4f5e2dd741215a4699db979fe1b0dce60298
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Mar 2 13:50:15 2016 -0800

    linux fix

commit fa98aeac8505c764f4a69f15c8a8ff1123fad2a3
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Mar 2 11:18:18 2016 -0800

    links correctly!

commit 9c56ce7143d3a35b44d33f246cec093ca9eaa7d9
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Mar 1 17:44:58 2016 -0800

    Squashed commit of the following:

    commit 2ef52723dae44204c047cb177d5a5670fb659c79
    Merge: 8a5c998 25cf1f1
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Tue Mar 1 16:54:04 2016 -0800

        Merge branch 'v3' into cmake_android

    commit 8a5c9981192e344fffc9f14be5cb14f66eccfa24
    Author: Chaoren Lin <chaorenl@google.com>
    Date:   Thu Feb 11 18:34:46 2016 -0800

        Fix module name in Android template to match CMake project.

    commit be85e19e852a9d5fbd6c58cea60c75fe47a5a576
    Author: Chaoren Lin <chaorenl@google.com>
    Date:   Thu Feb 11 18:27:45 2016 -0800

        Add missing platform specific source file to CMake project.

    commit 705389ac6582107a381d0cbc56268eaa98ffc5c3
    Author: Chaoren Lin <chaorenl@google.com>
    Date:   Wed Feb 10 19:21:12 2016 -0800

        Find AndroidNdkModules.cmake relative to android.toolchain.cmake.

    commit a10075e2cb30af2e1f9a30da99efac880658ad6b
    Author: Chaoren Lin <chaorenl@google.com>
    Date:   Wed Feb 10 19:03:11 2016 -0800

        Remove cpp-empty-test from project templates.

    commit e070fcbf210b8628f75785e738202a80a95ac0ff
    Author: WenhaiLin <wenhai.lin@chukong-inc.com>
    Date:   Mon Aug 31 09:56:03 2015 +0800

        Fix CMake for Android Target
2016-03-02 16:51:54 -08:00
mogemimi 2a8d84e7f9 Remove unnecessary const from return types 2016-02-29 16:48:07 +09:00
Victor K ce8f85f33e set music volume control as default 2016-02-22 11:43:01 +03:00
Ricardo Quesada 37db8407f1 Merge pull request #14867 from dumganhar/refactor-websocket
WebSocket refactoring, bug fixes, improvements, and passes most Autobahn Test (The most standard WebSocket Protocol Test).
2016-02-21 06:59:59 -08:00