Commit Graph

228 Commits

Author SHA1 Message Date
Jaroslaw Lewandowski 7d4eea0646 Fixed compilation error for iOS project using Compiler Default C++ Language Dialect 2013-05-29 21:14:19 +01:00
Jaroslaw Lewandowski 94eef4d235 Removed unused variable which caused Linux build to fail 2013-05-29 10:15:31 +02:00
Jaroslaw Lewandowski 3f7c506638 Ability to save/retrieve CCData into/from CCUserDefault 2013-05-29 01:06:41 +01:00
samuele3hu 0a1c12a2d3 issue #2103 add some overlapping file and delete some comment line 2013-05-24 13:45:06 +08:00
samuele3hu 338c7c8d67 issue #2103 add more test lua 2013-05-24 11:42:27 +08:00
Ed Bartley 8b55f1285f Fix ccCArray 2013-05-08 15:22:05 -04:00
minggo e5155eedca export ZipUtils 2013-05-08 11:45:27 +08:00
minggo 8e78f8a7eb Merge branch 'TexturePacker-SpriteSheetProtection' of https://github.com/FlowerpotGames/cocos2d-x into TexturePacker-SpriteSheetProtection 2013-05-08 10:32:26 +08:00
Ed Bartley 3ff7e5871c Added function ccSetPvrEncryptionKey(…) to set the encryption key in a single function call.
Updated the TextureAtlasEncryptionTest to show how to use the ccSetPvrEncryptionKey(…) function.
Updated the notes and header docs for improved clarity.
2013-05-07 10:14:38 -04:00
James Chen c45ebfa628 Merge pull request #2422 from brawsome/master
fixed #2127: Adding CCLOG before original path is returned in CCFileUtils::fullPathForFileName to aid in debugging.
The PR has fix two issues:
1) Added additional CCLOG to CCFileUtils::fullPathForFilename:
There's currently no way to be sure, from a calling function, that
fullPathForFilename has returned an invalid file path, which makes it
difficult to quickly track down missing, or incorrect file paths. Added
a CCLOG before the original string is returned to make debugging
missing or incorrect file paths easier.

2) Optmization to ccArrayGetIndexOfObject …
Optimized loop of ccArrayGetIndexOfObject to remove the overhead of 3
pointer dereferences per iteration, and pre-increment the int for
speed. If this function is called a lot, and with a large list, this
will result in a good performance win.
This can probably be done with just pointers, but I haven't taken the
time to validate all function calls to make sure it would be
appropriate. Though I can guarantee that if this worked fine before, it
will work fine with this change.
2013-05-07 01:40:57 -07:00
minggo 1166a02e13 resolve conflict for #2505 2013-05-07 14:31:00 +08:00
minggo 90b8dfd383 Merge pull request #2504 from wagaf-d/ccpchanges
Move ccpX functions to CCPoint methods and operators
2013-05-06 23:22:21 -07:00
James Gregory 955ba1bfd3 ifdef tango around some symbols that aren't defined in Emscripten (nor a bunch of other platforms, it seems). 2013-05-06 20:58:43 -07:00
minggo 80dfd4d493 Merge pull request #2407 from sergey-shambir/attribute_format
Added __attribute__(__format__()) for CCLog and CCString
2013-05-06 20:06:52 -07:00
Ed Bartley 040e6fc5b9 Promote global functions and variables for PVR decryption to ZipUtils class.
Rename PVR decryption functions and variables to better fit in the Cocos2DX framework.
Improve log error notes.
Update TextureAtlasEncryptionTest to match revised function call in ZipUtils.
Update ccSetPvrEncryptionKeyPart documentation to clarify that encryption is never 100% secure.
2013-05-06 10:04:45 -04:00
Adrien Béraud 637cc1a9ed CCPoint::getDistance() implemented, CCPoint::length() renamed to getLength(), bug fixes 2013-05-05 02:58:46 +10:00
Adrien Béraud b9fe35901a Moved most CCPointExtension functions to CCPoint OO-equivalents 2013-05-04 17:18:22 +10:00
Ed Bartley f89d39953e Add PVR.CCZ encryption support to ZipUtils based upon http://www.codeandweb.com/texturepacker/contentprotection
Add sample to TestCPP.
2013-04-25 13:40:49 -04:00
Andrew Goulding d2ca2a4d10 Optmization to ccArrayGetIndexOfObject
Optimized loop of ccArrayGetIndexOfObject to remove the overhead of 3
pointer dereferences per iteration, and pre-increment the int for
speed. If this function is called a lot, and with a large list, this
will result in a good performance win.

This can probably be done with just pointers, but I haven't taken the
time to validate all function calls to make sure it would be
appropriate. Though I can guarantee that if this worked fine before, it
will work fine with this change.
2013-04-25 12:18:40 +10:00
minggo d89792fdc6 fixed #2073: fix memory leak in CCUserDefault 2013-04-22 16:43:05 +08:00
Sergey Shambir e5b2f300f9 Added CC_FORMAT_PRINTF(x,y) macro to warn on CCLog() format errors
Uses printf format. Enabled for GCC and clang.
2013-04-19 11:54:08 +04:00
James Chen 63ce8adfad fixed #2059: Fix complication errors on Android. 2013-04-17 17:05:39 +08:00
James Chen ddd6d9d155 fixed #2059: cc.FileUtils.getInstance().getStringFromFile(filename) doesn't return a whole string. 2013-04-17 16:08:48 +08:00
minggo a0dc39ca38 fixed #2034:use previous path to get UserDefault.xml 2013-04-10 11:39:01 +08:00
minggo ac43ff7584 Merge pull request #2325 from minggo/userdefault-hotfix
fixed #2034:make CCUserDefault compatible with previous version on Android and iOS
2013-04-08 18:34:20 -07:00
minggo d3aa718b22 fixed #2034:make CCUserDefault compatible with previous version on Android and iOS 2013-04-08 21:35:43 +08:00
James Chen 7c6cb8c8cd commit latest uthash.h utlist.h 2013-04-08 10:59:41 +08:00
Darragh Coy 7f565bb2fa Fix CCUserDefault.cpp compiling on Android.
CCUserDefault.cpp shouldn't compile on Android.
2013-03-31 22:24:10 -07:00
minggo 1d51f9a3d7 issue #1529:CCUserDefault work ok on Android 2013-03-11 16:45:20 +08:00
minggo ac888fee01 issue #1529:CCUserDefault supports default value on iOS 2013-03-11 14:45:07 +08:00
Asad ur Rehman c1a8059998 Added CCNotificationCenter::removeAllObservers
This is a helper method that removes all observers with a particular
target. It can be used in destuctors to ensure no observers trigger
callbacks on objects that no longer exist.
2013-03-10 19:34:01 +05:00
James Chen a889322a47 Fixed compilation error for MAC port. 2013-03-10 16:34:41 +08:00
minggo dd8681b18b Merge pull request #2113 from minggo/refactor-ccuserdefault
Refactor ccuserdefault
2013-03-06 23:05:50 -08:00
Sam Clegg ce247a6304 [NaCl] Fix warnings in ARM build 2013-03-06 13:02:55 -08:00
minggo 648e9a7bf1 issue #1529:use NSUserDefaults on iOS and SharedPreferences on Android to implement CCUserDefault 2013-03-06 16:36:44 +08:00
Sam Clegg 38878b084b Fix all compiler warnings produced by gcc.
This allows the linux and NaCl builds (and perhaps others)
to be compiles with -Wall and -Werror, and it makes the build
output much less noisy.
2013-03-05 17:01:00 -08:00
minggo a9fa61af34 issue #1529:CCUserDefault -> user_default 2013-03-05 14:55:26 +08:00
minggo f37b1525b4 issue #1529:use NSUserDefault to implement CCUserDefault on iOS 2013-03-05 14:53:37 +08:00
Sam Clegg 33c422d1d5 Add new port: Native Client 2013-03-02 12:15:24 -08:00
James Chen 537abaec42 fixed #1753: Android works ok now. 2013-02-27 16:57:36 +08:00
James Chen 0d70e6f92f issue #1753: Win32 works ok. 2013-02-27 15:45:23 +08:00
James Chen 473e8e6139 issue #1753: Upgrading SpiderMonkey to Firefox19.0, iOS works ok. 2013-02-27 15:16:49 +08:00
minggo 7941d70a04 fix a bug of CCUserDefault 2013-02-26 12:44:20 +08:00
James Chen 5f645cefba issue #1489: ZEXPORT -> CC_DLL for unzip.h. 2013-02-25 18:35:18 +08:00
minggo 1df0095993 fix a bug of CCUserDefault 2013-02-22 11:01:57 +08:00
James Chen ad61fa3e9b fixed #1703: fixed compilation errors for BlackBerry. 2013-02-16 11:05:30 +08:00
minggo ba8f26fed9 Merge pull request #1969 from minggo/iss1702-writablePath
modify writable path for iOS and Android
2013-02-06 22:16:46 -08:00
fape 05eb3a59f5 include missing CCPlatformMacros.h 2013-02-06 15:50:09 +01:00
fape 948732d617 marmalade tinyxml2 fixes 2013-02-06 14:49:04 +01:00
minggo 0c5bcb3f7b issue #1702:fix a typo error 2013-02-06 18:04:40 +08:00