Commit Graph

8 Commits

Author SHA1 Message Date
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
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
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
minggo 70ce4f877f fixed #565: upgrade tileMap_parallax_nodes to 1.0.0-rc3 2011-07-04 14:11:43 +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