Commit Graph

37 Commits

Author SHA1 Message Date
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
natural-law e38d3a2277 Merge branch 'master' into iss434
Conflicts:
	cocos2dx/platform/airplay/CCFileUtils_airplay.h
	template/xcode3/cocos2d-x_app/___PROJECTNAME___.xcodeproj/project.pbxproj
	template/xcode3/cocos2d-x_box2d_app/___PROJECTNAME___.xcodeproj/project.pbxproj
	template/xcode3/cocos2d-x_chipmunk_app/___PROJECTNAME___.xcodeproj/project.pbxproj
2011-03-28 17:06:32 +08:00
natural-law ed2566e201 issue #434,Refactor class CCFileUtils on platform airplay. 2011-03-28 16:27:26 +08:00
natural-law cee82fe9fa issue #434,refactor class CCFileUtils on android and ios. 2011-03-26 17:24:37 +08:00
walzer f568ad8487 issue #379, fix a bug caused by airplay port integration, which makes android port unable to load resources by zlib. 2011-03-26 14:09:42 +08:00
walzer ed492bbd1e [airplay] first commit of airplay port. Thanks for Аксёнов Максим's contribution! 2011-03-23 22:16:20 +08:00
natural-law 7c6147421b [wophone]fixed #377,Replace the word "uphone" with "wophone". 2011-03-09 17:28:35 +08:00
minggo dc55c164ba fixed #292 2010-12-29 18:01:37 +08:00
minggo b2b8591b26 fixed #279 2010-12-28 10:23:14 +08:00
natural-law 95e697d316 fixed #262 Add namespace for the project CocosDenshion. 2010-12-15 18:28:18 +08:00
natural-law 94c9addace fixed #226 add support read resource file from zip file in cocos2d-uphone 2010-11-29 10:55:32 +08:00