Commit Graph

1516 Commits

Author SHA1 Message Date
James Chen 3cff253446 Updating comments for CCFileUtils.h. 2013-01-29 16:10:18 +08:00
James Chen 558a4bb3cc Updating comments for CCFileUtils.h. 2013-01-29 16:07:50 +08:00
James Chen 0bd2e11d75 Updating comments for CCFileUtils.h. 2013-01-29 15:56:08 +08:00
James Chen 0141b7856d Updating comments for CCFileUtils.h. 2013-01-29 15:52:33 +08:00
James Chen 13c494ad69 Updating doxygen comments for CCFileUtils.h. 2013-01-29 15:50:57 +08:00
James Chen 170fb32b6c Updating CCFileUtils.cpp for BlackBerry. 2013-01-29 15:07:36 +08:00
James Chen 0c01711293 Comments some LOGs in CCFileUtils::fullPathForName. 2013-01-29 10:48:31 +08:00
James Chen 31681e005e CCFileUtils::fullPathFromRelativePath -> fullPathForFilename. 2013-01-29 10:40:44 +08:00
James Chen 6baeee3ff9 Adding LOG in CCFIleUtils::fullPathForFilename for Marmalade port. 2013-01-29 10:27:36 +08:00
James Chen 2694cb150b CCFileUtils::s|gSearchPath -> CCFileUtils::s\gSearchPaths. 2013-01-29 09:56:38 +08:00
James Chen d5237d637d Absolute path check for blackberry. 2013-01-29 00:42:21 +08:00
James Chen 1f0b422112 Fix a typo. 2013-01-28 23:40:56 +08:00
James Chen c160d3ed0a Using full path in CCFileUtils::getFileData. 2013-01-28 23:37:04 +08:00
James Chen 7c89086173 Merge remote-tracking branch 'cocos2d-x/master' 2013-01-28 23:29:41 +08:00
James Chen 341193eec6 Updating comments for CCFileUtils. 2013-01-28 23:28:14 +08:00
minggo 3ea562b4ad fix some logical errors and compiling errors 2013-01-28 23:19:57 +08:00
James Chen 2e421304ca Merge pull request #1911 from dumganhar/iss1683-ccfileutils
issue #1683: Updating CCFileUtils for Blackberry and Marmalade.
2013-01-28 05:43:41 -08:00
James Chen 75d926f810 issue #1683: Fixing complication errors for blackberry. 2013-01-28 21:16:01 +08:00
minggo 05363ee8dd Merge pull request #1908 from minggo/master
fix some warnings
2013-01-28 04:36:01 -08:00
minggo 249b935be8 fix some warnins 2013-01-28 20:34:52 +08:00
James Chen 59f2ae13f8 issue #1683: Updating CCFileUtils for Blackberry and Marmalade. 2013-01-28 20:12:48 +08:00
James Chen 6bceb2ac6f Merge remote-tracking branch 'cocos2d-x/master' into iss1683-ccfileutils 2013-01-28 19:54:02 +08:00
James Chen ba852e8606 issue #1683: Adding default path to the vector of searching path. 2013-01-28 19:53:16 +08:00
James Chen 031380d4e9 issue #1683: Updating CCFileUtils.cpp for Win32. 2013-01-28 19:49:34 +08:00
James Chen 733a334ec2 issue #1683: Fixed compilation errors for linux. 2013-01-28 18:32:34 +08:00
James Chen 632f99b611 issue #1683: Updating CCFileUtils for MAC. 2013-01-28 17:54:49 +08:00
James Chen e736ed487f issue #1683: Adding default search path if developer didn't pass it. 2013-01-28 17:44:53 +08:00
James Chen 13881ba8a8 issue #1683: Updating CCApplication.h/.cpp for linux. 2013-01-28 11:56:56 +08:00
James Chen 345f18ebeb issue #1683: Refactoring CCFileUtils::setResourceRootPath for BB, Linux, MAC. 2013-01-28 10:48:47 +08:00
James Chen c24ca63a0c issue #1683: Making CCApplication::setResourceRootPath deprecated. 2013-01-28 10:36:37 +08:00
James Chen 78c16fdd22 issue #1683: Fixing absolute path check for Android. 2013-01-28 10:23:19 +08:00
James Chen f2dad83610 issue #1683: Refactoring CCFileUtils for MAC port. 2013-01-27 20:53:32 +08:00
James Chen d532670640 Removing some CCLOG. 2013-01-27 20:16:46 +08:00
James Chen 09cef5511a issue #1683: Updating CCFileUtils. 2013-01-26 23:24:41 +08:00
James Chen be6c0c9d9b Updated CCFileUtils of linux. 2013-01-26 23:20:40 +08:00
James Chen 119115502d issue #1683: Making some api of CCFileUtils more c++ friendly by using std::vector rather than CCArray. 2013-01-26 22:31:57 +08:00
James Chen ca9e96213f issue #1683: Commented one LOG. 2013-01-26 15:02:04 +08:00
James Chen 3328cfd6a4 Refactoring some logic of CCFileUtils. 2013-01-26 14:19:14 +08:00
James Chen 522e860205 issue #1683: Fixed a bug in file lookup for Android. 2013-01-26 12:10:55 +08:00
James Chen f71df5a873 Fixed an issue in CCFileUtils::setResourceDirectory for android. 2013-01-25 23:01:47 +08:00
James Chen 2c399de28e issue #1683: Moved CCFileUtils::setResourceDirectory. And fix a compatible issue for android. 2013-01-25 22:55:20 +08:00
James Chen 2235f745d3 issue #1683: Fixed compilation error for Win32. 2013-01-25 22:30:16 +08:00
James Chen ef131beed1 Merge pull request #1885 from dumganhar/refactor-ccfileutils
issue #1683 :Refactoring CCFileUtils.TO BE DONE: 
Making the api of CCFileUtils more c++ friendly.
2013-01-25 05:55:10 -08:00
James Chen fde39c6dcb Adding cache support for CCFileUtils. 2013-01-25 21:52:35 +08:00
James Chen 55af1fd3bf Removing unneeded codes in CCFileUtils.mm for iOS port. 2013-01-25 21:17:28 +08:00
James Chen 6f3b22031f Using new API of getting full path for file name. 2013-01-25 20:51:52 +08:00
martell 684b46dd74 Initial Import of tinyxml2 to replace libxml2 2013-01-25 10:39:54 +00:00
James Chen b3f54f6c1d Merge remote-tracking branch 'origin/refactor-ccfileutils' into refactor-ccfileutils 2013-01-25 17:23:58 +08:00
James Chen 70b8e624d6 Merge pull request #8 from rohankuruvilla/fileutils_test
Merged @Rohan's improvements for CCFileUtils.
2013-01-25 01:20:51 -08:00
minggo dcaa3900a4 fixed #1679: use unstripped libs for armeabi-v7a 2013-01-25 14:49:25 +08:00
James Chen 805067b046 Refactored CCFileUtils for blackberry port. 2013-01-25 14:09:56 +08:00
James Chen 314445e1ca Refectored CCFileUtils for MAC port. 2013-01-25 11:12:38 +08:00
Rohan Kuruvilla 9750bbab95 removing absolute path lookup in fullPathForFilename 2013-01-24 19:04:27 -08:00
Rohan Kuruvilla f5c74d9022 Adding support for getInstance in Cocos2dxGLSurfaceView, to allow for running tasks on GL Thread 2013-01-24 18:37:24 -08:00
Rohan Kuruvilla 287b5575f4 Changing architecture of CCFileUtils 2013-01-24 18:37:23 -08:00
James Chen cefef60e11 Refactored CCFileUtils for Marmalade port. 2013-01-24 17:38:43 +08:00
James Chen 73389d68d5 Refactor CCFileUtils for Linux port. 2013-01-24 16:44:13 +08:00
James Chen e954ce4f75 Made compatibility with old api CCFileUtils::setResourceDirectory. 2013-01-24 14:07:48 +08:00
James Chen 7589be6fb7 Refactoring CCFileUtils for win32. CrystalCraze works ok on WIN32 now. 2013-01-24 13:56:50 +08:00
James Chen 46f38c57fb issue #1661: CrystalCraze works ok on android. 2013-01-24 00:32:22 +08:00
James Chen 8cfd912a06 CrystalCraze works ok on iOS. 2013-01-23 23:17:44 +08:00
James Chen 388e1d82c3 Added resource structure which is the same as cocos2d-iphone. 2013-01-23 22:29:00 +08:00
James Chen 294509c4c0 Merge branch 'master' of https://github.com/dumganhar/cocos2d-x into myccfileutils 2013-01-23 19:52:17 +08:00
James Chen de8a237d73 Merge pull request #1881 from dumganhar/linux-fix
fixed #1676: Refactoring Makefile and eclipse project configuration for LINUX port.
2013-01-22 03:22:41 -08:00
James Chen 8ec1a66db4 Removed glew-1.7.0.tgz. 2013-01-22 18:34:51 +08:00
James Chen 219657ee1a Merge pull request #1872 from moadib/android_manifest_gles20
fixed #1673: Added <uses-feature android:glEsVersion="0x00020000"/> to AndroidManifest.
2013-01-21 23:52:32 -08:00
ivzave 03f1efff78 ignore unpacked glew 2013-01-21 18:01:57 +04:00
moadib e39829269d Added <uses-feature android:glEsVersion="0x00020000" /> to AndroidManifest.xml 2013-01-21 13:03:55 +04:00
James Chen b810aac103 issue #1667: Updated the comments for CCFileUtils.h. 2013-01-21 10:11:57 +08:00
James Chen 30b2a8a882 issue #1867: Updated CCFileUtils.cpp for android. 2013-01-18 22:18:55 +08:00
James Chen 9eb149efda Updated CCFileUtils.mm. 2013-01-18 22:14:03 +08:00
James Chen bc76cf09c4 Added filename lookup support for win32. 2013-01-18 21:54:48 +08:00
James Chen 0a42829428 issue #1667: Adding file name lookup support for iOS and Android, TBD: Other platform supports. 2013-01-18 18:05:32 +08:00
minggo fcecd43f55 Merge pull request #1862 from Horcruxes/master
getFileData("a.png") doesn't work on iOS.
2013-01-17 17:46:23 -08:00
Michael Ding 088e568c8e Update cocos2dx/platform/ios/CCFileUtils.mm
fix the problem when calling CCFileUtils::sharedFileUtils()->getFileData("a.png") doesn't work.
2013-01-18 09:27:22 +11:00
James Chen 31e91e554e issue #1661: Added CrystalCraze for win32 and fix some compilation errors. 2013-01-17 17:07:18 +08:00
James Chen 6565fa92cc fixed #1649: Changed return type to const reference for member variable access. 2013-01-14 15:51:53 +08:00
James Chen 0fd16e7b31 Merge pull request #1827 from folecr/assert_fix
fixed #1654: Assert fix for android.
2013-01-13 22:15:11 -08:00
johnangel a1155f52e6 Merge remote branch 'upstream/gles20' into gles20 2013-01-11 21:48:47 +01:00
folecr e3cf517f32 Assert implementation for Android
* __android_log_assert is not stable
    * Uses __android_log_print instead
2013-01-09 18:51:49 -08:00
folecr c0ecad31fe Consistent use of CCAssert
* Remove @
 * Use CCAssert instead of CC_ASSERT (number of parameters differ between the two)
2013-01-08 14:11:34 -08:00
johnangel e32a193561 Setting Windows app title for non-Debug mode, also. 2013-01-07 12:17:50 +01:00
James Chen b662d5c569 fixed #1620: Added license. Removed LocalStorage.h from cocos-ext.h. 2013-01-07 18:06:53 +08:00
James Chen 3fa771f0c4 fixed #1620: Using sqlite3 to implement sys.LocalStorage for iOS and android. 2013-01-07 17:22:06 +08:00
dualface 37a0f19c46 remove RGB565 support 2013-01-04 23:34:24 +08:00
James Chen f95d1677df Merge branch 'gles20' of https://github.com/dducharme/cocos2d-x into iss-blackberry 2013-01-04 09:52:01 +08:00
James Chen b50bf716a2 Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into gles20 2013-01-03 19:58:10 +08:00
James Chen 760a8c1d39 fix a compilation error for android. 2013-01-03 19:56:34 +08:00
Dale Ducharme 611db78b39 Removing grskia dependancy and adding in freetype support to the builds. 2013-01-02 18:53:31 -05:00
fape 29a2f273b1 reorganize third party libs 2012-12-29 23:56:14 +01:00
fape 4421b6bf7a remove unused libs 2012-12-29 23:53:39 +01:00
dualface d9ef93bbe5 fix some issues 2012-12-30 02:14:30 +08:00
dualface 0b25220f22 update libwebp to 2.1
add support RGB888, RGB565,RGBA4444
2012-12-30 02:12:02 +08:00
dualface 1dcb3742e9 fix for win32 2012-12-29 17:43:34 +08:00
James Chen d2ad820a48 fixed #1627: Adding view name for sample applications. 2012-12-29 14:50:00 +08:00
dualface 39c4765423 fix for mac 2012-12-29 14:17:52 +08:00
dualface 806138d990 fix some issues 2012-12-29 13:58:02 +08:00
dualface b50e4cdf2b add WebP support 2012-12-29 10:27:43 +08:00
James Chen f2f3aa55bf Merge branch 'gles20' of https://github.com/johnangel/cocos2d-x into iss-vs2012
Conflicts:
	samples/Cpp/HelloCpp/proj.win32/HelloCpp.vcxproj
	samples/Cpp/TestCpp/proj.win32/TestCpp.vcxproj
	samples/Javascript/CocosDragonJS/proj.win32/CocosDragonJS.vcxproj
	samples/Javascript/MoonWarriors/proj.win32/MoonWarriors.vcxproj
	samples/Javascript/TestJavascript/proj.win32/TestJavascript.vcxproj
	samples/Javascript/WatermelonWithMe/proj.win32/WatermelonWithMe.vcxproj
	samples/Lua/HelloLua/proj.win32/HelloLua.vcxproj
	samples/Lua/TestLua/proj.win32/TestLua.win32.vcxproj
	scripting/javascript/bindings/generated
	scripting/lua/proj.win32/liblua.vcxproj
2012-12-29 09:48:22 +08:00
fape 3550550568 marmalade acceleromater improvement 2012-12-24 17:24:10 +01:00
minggo df73cd12a6 fixed #1623:use file descriptor instead of file path to create media player 2012-12-24 17:20:44 +08:00
Denis Mingulov ca00d50259 CocosDenshion Android - missing sound effects with some conditions
Android SoundPool.load returns 0 if sound might not be loaded - for
example, it does not exist. Previously - 0 has been ignored and
incorrectly written to HashMap, so it was not possible to
understand on the application side that something goes wrong
(and use some additional workaround).

Use case:
1) On the game loading - preload all possible sound effects
   (to speed up their playing later, when it will be needed)
2) Game APK does not have any sound file, they are downloaded
   later in a separate thread.
3) Application tries to play sound effects as usual, when needed.

So due to this bug - as there was no any sound file exist
during the game loading - internal HashMap contains incorrect
0 as id for every effect, and there is no any sound effect during
the first application start.
2012-12-21 23:15:29 +02:00
johnangel b8eaf00359 ESC button on Windows behaves like Back button 2012-12-19 21:11:26 +01:00
johnangel f409aba724 Setting Windows app title 2012-12-19 20:43:09 +01:00
minggo e15c0a33ae fixed #1610:skip only white character 2012-12-10 17:18:20 +08:00
minggo 0f58987ad1 Merge pull request #1740 from rtissera/gles20
[android] Cocos2dxHelper/CCFileUtils JNI fixes and improvements
2012-12-10 00:33:11 -08:00
minggo 71f61596e9 fixed #1580:request focus after keyboard closed 2012-12-10 14:08:01 +08:00
Mat Hopwood f75f6c2b64 Mac OS Marmalade fixes
Fixed compile issues on Mac OS
2012-12-10 09:54:34 +08:00
Romain TISSERAND bc0309f1a3 [android] Removed hardcoded /data/data path in CCFileUtils, make use of Context.getCacheDir() through JNI callback instead. Needed in order to get CCUserDefault working fine on Nexus 10 (Androi 4.2 multi-user environment) 2012-12-09 19:40:41 +01:00
Romain TISSERAND 4cb7506932 Added proper JNIEXPORT / JNICALL modifiers to Cocos2dxHelper JNI functions called from Java side 2012-12-09 13:44:41 +01:00
fape e488361e3b cosmetics: fix formating 2012-12-05 11:43:04 +01:00
fape 320d532e15 add Hungarian language support 2012-12-05 11:31:05 +01:00
minggo a256d35a5b fix some confilcs 2012-12-05 14:01:05 +08:00
James Chen 8a8038b342 Enable stencil buffer for linux. 2012-12-04 16:48:23 +08:00
Mat Hopwood 3b2eea2541 JPEG and File fixes
* Fixes to JPEG loader
* Fixes to image loader to load tiff and unknown formats properly
2012-12-04 11:03:34 +08:00
minggo 54309c56b2 change accelerometer accurate to SENSOR_DELAY_GAME 2012-11-30 14:07:01 +08:00
minggo 75fb997513 Merge pull request #1670 from rohankuruvilla/gles20
Fixing Accelerometer crash on Android
2012-11-29 22:01:16 -08:00
minggo 61b2e2b880 comment codes for FPS controlling 2012-11-30 13:55:25 +08:00
Rohan Kuruvilla a4b55b5217 Fixing Accelerometer crash on Android 2012-11-28 15:56:57 -08:00
Taro Kobayashi 3a814de07e implemented CCApplication::getCurrentLanguage() for linux platform 2012-11-28 19:41:50 +09:00
Taro Kobayashi a37e034e61 added support for Japanese language 2012-11-28 17:53:10 +09:00
minggo bd025c94c3 use macro CC_TARGET_OS_IPHONE instead of TARGET_OS_IPHONE and make xcode template work ok 2012-11-26 15:08:40 +08:00
fape e259467873 update marmalade languages 2012-11-25 12:13:30 +01:00
minggo a423317abc issue #1564:make iOS test work ok 2012-11-23 16:30:09 +08:00
minggo 96ecb05ca9 issue #1564: make tests run on mac osx 2012-11-23 14:22:50 +08:00
minggo 226b10a9e2 modify lua project setting 2012-11-23 10:41:41 +08:00
James Chen 73b409f116 issue #1564: Enable point size by default on windows. This can fix point size is always equal to 1 pixel in DrawPrimitivesTest. 2012-11-22 10:04:35 +08:00
James Chen 6c81e21935 issue #1564: Set depth buffer to 24bit, stencil buffer to 8bit. 2012-11-22 09:55:44 +08:00
James Chen ebd522e3fa issue #1564: Return a new object instead of 'const reference' for some get methods. 2012-11-20 16:34:55 +08:00
James Chen b892993a83 Merge pull request #1587 from mrmop/gles20
fixed #1559: If file in resource directory doesn't exist, it will not search the root directory.
2012-11-16 04:56:59 -08:00
Mat Hopwood fcb265088d Rssource path root change
fullPathFromRelativePath will now search root if file is not found in
path
2012-11-16 10:56:11 +00:00
James Chen df6a50a23a issue #1555: Fixed some compilation error for marmalade and blackberry ports. 2012-11-16 18:13:55 +08:00
James Chen 7601cc7e27 Merge branch 'iss1555-update' of https://github.com/minggo/cocos2d-x into iss1555-update
Conflicts:
	cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp
2012-11-16 16:21:16 +08:00
James Chen 7557a78e05 issue #1530: Defined a macro 'snprintf' since it's named '_snprintf' on win32. 2012-11-16 15:58:19 +08:00
James Chen da7f3f2969 issue #1530: Added empty implementation of 'CCAccelerometer::setAccelerometerInterval' for win32,blackberry,linux,mac and marmalade ports. 2012-11-16 15:56:51 +08:00
minggo a4a53df159 issue #1555:build ok on android 2012-11-16 14:23:14 +08:00
James Chen a3437d09df issue #1557: Fixed particle crash.We should check the file format by the file header when the format isn't defined. 2012-11-15 10:43:29 +08:00
James Chen c79cac3af6 Merge branch 'gles20' of https://github.com/mrmop/cocos2d-x into iss1557-marmalade 2012-11-15 10:10:53 +08:00
Mat Hopwood 148a558405 Tiff support and resource location
* Tiff support added to CCImage
* CCFileUtils updated to support resource folders
* Examples updated to support multiple resolution assets
2012-11-14 17:46:09 +00:00
minggo a701eaecce issue #1555:update to v2.1 beta3 2012-11-14 18:05:15 +08:00
minggo 5fd56370d8 issue #1555:fix a bug about CCGLProgram 2012-11-13 11:06:32 +08:00
minggo d4aeb8076c Merge pull request #1562 from mingulov/apk
Android: Access to files from APK is boosted
2012-11-11 18:55:03 -08:00
James Chen 833b5b1be8 Merge branch 'gles20' of https://github.com/mrmop/cocos2d-x into iss1557-marmalade
Conflicts:
	cocos2dx/base_nodes/CCNode.cpp
	cocos2dx/sprite_nodes/CCSprite.cpp
	samples/TestCpp/Classes/TouchesTest/Ball.cpp
	samples/TestCpp/Classes/VisibleRect.cpp
	samples/TestCpp/Classes/VisibleRect.h
2012-11-12 10:20:04 +08: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
minggo 3f3d09fabb Merge pull request #1532 from wenbin1989/gles20
Add error handler when read image data using libjpeg.
2012-11-06 20:10:21 -08:00
James Chen 21e4f80fbd Added "executeAccelerometerEvent" for CCScriptEngineProtocol class. Exported Accelerometer event to JS. 2012-11-06 14:18:13 +08:00
James Chen 26547c7b30 fixed #1548: Updated libcurl header files to 7.26.0 on iOS. 2012-11-05 13:13:46 +08:00
wenbin1989 470fcacc81 Add error handler when read image data using libjpeg.
Fix errors when read image using libjpeg.
Fix errors when read image with broken data using libjpeg.
2012-11-01 21:45:51 +08:00
minggo 95d3f87bd7 fix compiling error on linux 64 bit 2012-11-01 15:38:48 +08:00