Commit Graph

60 Commits

Author SHA1 Message Date
boyu0 cecfc13bc4 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into 2345 2013-07-27 22:06:30 +08:00
boyu0 a2b611d8c3 Refactor Image and Texture2D, combine TexturePVR to Image and Texture2D, and delete TexturePVR 2013-07-25 21:35:00 +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 cf262c28e2 getInstance() / destroyInstance() are used...
... instead of sharedXXX / purgeXXX.
They are more C++ friendly, and also easier to remember.

common files + Mac files + iOS files + tests/samples files were updated.

The old methods are deprecated now.
2013-07-11 15:24:23 -07:00
minggo 8938268183 issue #2329: remove unneeded codes 2013-06-26 16:42:11 +08:00
James Chen a90f51d03a Merge branch 'develop' of z:/Project/cocos2d-x into develop 2013-06-20 17:38:23 +08:00
James Chen d79ecd038c Merge pull request #2942 from dumganhar/iss2129-format-codes3
closed #2129: Removing CC prefix to make cocos2d-x more CPP friendly.
2013-06-20 01:19:49 -07:00
minggo e39df16d49 use correct pointer to be closed 2013-06-20 15:03:51 +08:00
James Chen 93b6328303 issue #2129: Removing CC prefix for cocos2dx module. 2013-06-20 14:13:12 +08:00
James Chen 663673b683 Adding missing include in ZipUtils.h. 2013-06-19 16:11:16 +08:00
minggo e9d8595617 fixed #2124: make CCImage::initWithIamgeFileThreadSafe() thread safe 2013-06-18 17:10:54 +08:00
James Chen c0d44cb2e4 fixed #2129: Rename m_iVar to _var, remove CC prefixes. 2013-06-15 14:03:30 +08:00
Rene Klacan c8b4291731 keyboard support throught compiler directive 2013-06-02 04:11:43 +02: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 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
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
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
Sam Clegg ce247a6304 [NaCl] Fix warnings in ARM build 2013-03-06 13:02:55 -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
Sam Clegg 33c422d1d5 Add new port: Native Client 2013-03-02 12:15:24 -08:00
James Chen 5f645cefba issue #1489: ZEXPORT -> CC_DLL for unzip.h. 2013-02-25 18:35:18 +08:00
James Chen d94a0cf4c7 issue #1603: fixed a warning in unzip.cpp. 2012-12-20 18:39:29 +08:00
minggo 605771697a Merge pull request #1566 from mingulov/unzip_crc
Zip support: broken CRC check / unzCloseCurrentFile
2012-11-15 23:31:14 -08:00
Denis Mingulov 869168a884 ZipFile - speedup initialization for zip archive by 30-50%
unzip.h/.cpp - unzGoToFirstFile/unzGoToNextFile retrieves information
about the current file, so it is possible to remove redundant calls
to unzGetCurrentFileInfo and speed up general execution.

unzip.h/.cpp are modified accordingly by creation unzGoToFirstFile64
and unzGoToNextFile64 with file info (unz_file_info64) and name as
possible output parameters.

ZipFile::setFilter (it is used to create a file list at ZipFile
constructor) - redundant calls to unzGetCurrentFileInfo64 are removed,
so briefly the time required to generate a zip file list is something
like 1 average old unzLocateFile call.
2012-11-11 15:04:41 +02:00
Denis Mingulov eaed42c8bd Zip support: broken CRC check / unzCloseCurrentFile
A fix for changes at 75ae8d2201
- unzOpenCurrentFile3 has set pfile_in_zip_read_info->crc32_wait
just in case if Zip file has unknown structure / might not be
unpacked, so almost any unpacked file was considered as having
UNZ_CRCERROR.
2012-11-11 10:22:48 +02:00
Denis Mingulov 83cf8aaf29 Android: Access to files from APK is boosted - 1st review update 2012-11-09 09:53:40 +02:00
Denis Mingulov 071d264cc5 Android: Access to files from APK is boosted
Open APK file just once and cache a file list information (name and
position inside archive). Also a general ZipFile helper class is
created to read multiple files from Zip archives - might be used
for another platforms if needed.

Previously it was so for each separate file access operation:
- Open zip archive, initially parse its structure (unzOpen)
- Locate the particular file there by a linear search through
  full archive (unzLocateFile).
  So if file does not exist - still an archive has to be handled
  fully, even slower than a file exists.
- Read file.
- Close zip archive

After this commit:
- Once - open zip/apk file and collect file list information
  (average consumed time - the same like a search for 2 different
  files by unzLocateFile)
- When needed - directly retrieve file position inside the archive,
  setting it up to the zip reader and reading file

ZipFile class is located in support/zip_support/ZipUtils.h and .cpp
to prevent creation of a new files and adding them to multiple
project files.
2012-11-08 13:46:53 +02:00
Donald Alan Morrison 4cbd993091 Minor English Spelling Corrections. A few grammar corrections. 2012-09-17 00:02:24 -07:00
Donald Alan Morrison 75ae8d2201 Commented out unused debug variable to silence Static Analyzer Warning. (Value never read.) 2012-08-20 14:54:12 -07:00
Dale Ducharme 4004a8ac61 Cocos2dx for gles2. 2012-08-17 17:45:21 -04:00
James Chen b818c0afa6 fixed #1336: Used CC_DEPRECATED_ATTRIBUTE macro to mark deprecated interfaces. 2012-06-20 11:48:31 +08:00
James Chen 07b9db8e91 Merge branch 'gles20' into gles20-ccbi 2012-06-19 17:28:31 +08:00
James Chen c4056b1bb0 fixed #1269: Updated include search paths for win32 and android. 2012-06-19 17:22:55 +08:00
James Chen 591566b43a fixed #1335: Memory leaks in cocos2dx and CCBReader. 2012-06-19 16:31:26 +08:00
James Chen 23574172ff issue #1324: Added create() for static member functions that new an autorelease object, updated cocoa folder. 2012-06-14 16:05:58 +08:00
James Chen 76a560a474 issue #1310: Made CCFileUtils as a singleton. 2012-06-08 16:22:57 +08:00
James Chen 230b8a386b issue #1176: Changed linebreak symbol to UNIX format ('\n'),replaced 'tab'
with four spaces. Also,
1. Used macro NS_CC_BEGIN instead of namespace cocos2d {, NS_CC_END instead
of }.
2. Removed some unused files.
3. Renamed the name of some folders, for example,
"test.android"-->"proj.android" .
2012-04-19 14:35:52 +08:00
dumganhar 4b9cbb85ff #issue 908: Merge marmalade to latest cocos2d-x source
Merge branch 'master' of https://github.com/gzito/cocos2d-x into marmalade

Conflicts:
	cocos2dx/platform/CCFileUtils.cpp
	cocos2dx/platform/CCPlatformConfig.h
	cocos2dx/support/zip_support/ioapi.cpp
2011-12-12 17:46:21 +08:00
Giovanni Zito 0a7a000c2d Changed symbols from "airplay" to "marmalade", added files and folders for marmalade 2011-12-08 12:21:48 +01:00
dumganhar bfdb908d01 add Cocos2dx project
add HelloWorld project and rename proj.blackberry fold to proj.qnx
2011-12-06 14:56:37 +08:00
minggo f0d22ae504 issue #879: replase assert with CCAssert 2011-11-28 17:28:43 +08:00
dumganhar da794c1613 Merge branch 'master' into bada 2011-10-21 09:28:29 +08:00
Walzer ae411f9503 fix some warnings detected by xcode4.2, fix a stupid typo in RayCasts.h 2011-10-18 17:41:19 +08:00
dumganhar c94adc58b9 changed bada projects directory, add bada macro 2011-09-19 17:53:45 +08:00
Walzer 554e3fda52 fixed #701, CCZHeader.version should be an unsigned short, instead of unsigned char. Keep the same to cocos2d-iphone 2011-08-30 15:26:17 +08:00
Walzer 3afe6ebfb2 fixed #638, add support for pvr ccz format. I've tested it on both ios & android, also with instrument memleak detection. But haven't tested on win32 & marmalde, in thoery it will work. 2011-08-16 11:56:17 +08:00
natural-law fcbe0443be Resolve a bug in ZipUtils.cpp. And modify the Makefile of tests on wophone. 2011-07-11 15:16:29 +08:00
minggo 70ce4f877f fixed #565: upgrade tileMap_parallax_nodes to 1.0.0-rc3 2011-07-04 14:11:43 +08:00