Commit Graph

206 Commits

Author SHA1 Message Date
RH c8c4c2d703 Merge: 6fbebe9617 8b8b015b02
Merge pull request #6 from c4games/master

Sync with primary
2021-04-25 18:14:50 +10:00
rh101 c26a5e7bd8 Ensure FileStream is used for file access where possible 2021-04-25 17:22:43 +10:00
halx99 964e515f48 Merge: 2a1459b27b 3d8884721f
Merge pull request #341 from rh101/vfs-support

Add support for FileStream in ZipUtils and ZipFile
2021-04-25 14:21:19 +08:00
rh101 0867aa48a9 Add function comments to detail the expected parameters and return values of a FileStream 2021-04-25 15:27:25 +10:00
rh101 cce67f688e Add support for FileStream in ZipUtils and ZipFile 2021-04-25 02:39:47 +10:00
halx99 da1038b147 Fix crash from pr: #340 2021-04-24 18:15:54 +08:00
rh101 155fe98406 openFileStream now returns a nullptr if it fails 2021-04-24 09:22:27 +10:00
rh101 6502627714 Added getNativeWritableAbsolutePath() which will always return the underlying file system raw path.
Re-enabled memory mapped UserDefault usage, since it now has access to the raw file system path.
2021-04-23 01:00:00 +10:00
rh101 95cf5b5c2b Merge: 2aa2d69151 b7506fed0c
Merge branch 'vfs-support' of https://github.com/rh101/engine-x into vfs-support
2021-04-23 00:01:47 +10:00
rh101 54ffa13dff Move PosixFileStream class to its own files
Update UserDefault to work with FileStream
Fix undefined openFileStream on platforms other than Win32
2021-04-23 00:01:32 +10:00
RH dd5f77c3d5 Merge: 15c8f2298d 0886473e1b
Merge pull request #4 from rh101/master

Sync with master
2021-04-22 21:49:43 +10:00
RH 1e15ed4839 Merge: 2cef9f2e76 844119d162
Merge pull request #3 from c4games/master

Sync with master
2021-04-22 21:48:49 +10:00
rh101 7540c06fd3 Use FileStream to write JPG images to disk 2021-04-22 21:36:26 +10:00
halx99 8ed6d34234 Explicit set cmake minimum version at app/build.gradle [ci build] 2021-04-22 11:40:53 +08:00
rh101 57e2d5dea8 Fixed typo 2021-04-22 03:18:23 +10:00
rh101 2bf12b2226 Add support for virtual file system via custom FileStream and FileUtils implementations. 2021-04-22 03:15:49 +10:00
halx99 473e51cee7 Set cmake min version to 3.10 [ci build] 2021-04-21 14:05:44 +08:00
halx99 3a49f0e064 Merge: c3ad19df96 c95e0466e1
Merge pull request #308 from c4games/refactor-android-run-on-gl-thread

Refactor android runOnGLThread
2020-12-10 16:56:14 +08:00
halx99 78aaf568c6 fix FUISprite gray to normal doesn't work 2020-12-10 16:54:59 +08:00
halx99 ca4597a1ff Refactor android runOnGLThread
Ensure the callback run engine core mainLoop,
This commit can solve any weird behaviors, such as:
a. text render maybe missing charactors when bring from back to frontend
b. some renderer objects alpha may present black at sdk callback call
c. some other things
All above behavior is caused gl state not ready when go back to game activity from sdk activity
2020-12-09 15:13:57 +08:00
halx99 571adc605a fix ci 2020-12-02 03:33:53 -08:00
halx99 8b9d5db029 Unify CC_COMPAT_GL to control renderer backend
win32: google angle
mac: NSGL
ios: GLES
2020-12-02 03:03:05 -08:00
halx99 1353c00758 Sync pr: https://github.com/cocos2d/cocos2d-x/pull/20614 2020-11-24 18:10:28 +08:00
halx99 a842beee1f Refine jni param types 2020-11-18 18:19:14 +08:00
halx99 349e435937 jni match natvie API param types 2020-11-18 18:17:55 +08:00
halx99 dd5f706dff Refine jni methods decls [ci build] 2020-11-18 13:25:00 +08:00
halx99 09e2615e51 Add missing param JNIEnv* for natvie interfaces [ci build] 2020-11-18 12:15:48 +08:00
halx99 b341aa31da fix ci warnings 2020-11-15 21:34:53 -08:00
halx99 1ec908d4f9 fix #260 [ci build] 2020-11-16 12:21:27 +08:00
halx99 47603f0ac6 Now, the lua binding generator should works [ci build] 2020-11-02 16:47:33 +08:00
halx99 09d1fffac7 fix userdefault getBoolForKey incorrect 2020-10-27 17:27:52 +08:00
halx99 ab7173e61e GLES ios compile 2020-10-27 01:42:05 -07:00
halx99 534b2acc39 Lock name 2020-10-24 21:57:36 +08:00
halx99 b8a0e0a478 Finsih rename 2020-10-22 10:58:10 +08:00
halx99 ac21c27140 Build pugixml from sources for all platforms (#241) 2020-10-21 12:28:34 +08:00
halx99 03527fd45b Fix CCFileStream write bits
make it behavior same with fopen "wb"
2020-10-21 10:58:48 +08:00
halx99 b9c58a8420 Refactor modules (#238) 2020-10-17 16:32:16 +08:00
halx99 11ffba3758 API qualifiers improments 2020-10-07 00:07:53 +08:00
halx99 4a35122ab0 Remove dep 2020-09-25 13:49:23 +08:00
halx99 f93a26a7de Delete file ant.properties 2020-09-25 13:17:03 +08:00
halx99 3820cffc33 Sync feature from b2a0cb5e2f 2020-09-25 13:13:54 +08:00
halx99 1c57632e51 Delete unused source files 2020-09-25 13:08:39 +08:00
halx99 cca0739793 Refactor pixel format manipulate (#217)
* PixelFormat use table

* Correct PixelFormat name to match 'GL_LUMINANCE'

* Up

* fix cube update texture enum

* linux build

* Refine ci

* fix linux build

* Remove unused function, match mtl framebuffer pixel format

* readPixels always RGBA format

* fix ci for linux

* fix linux build

* Remove unused functions

* fix travis

* fix android ci

* Update config.json

* linux glad

* Update CCGLViewImpl-desktop.cpp

* fix linux build

* Fix linux build

* Link issue [skip appveyor][skip travis]

* Update CMakeLists.txt

* Refine GL enums use

* Update test case name [skip appveyor][skip travis]

* fix linux link issue

* for mtl

* fix ci

* Tidy pixelformat enums

* fix ci

* fix rgba8 to abgr4 error

* fix ci

* fix ci for GLES

* Fix linux build, require glibc-2.27+

* Use properly dist for travis [skip appveyor]

* fix linux build [skip appveyor]

* Update install-deps-linux.sh

* Remove unused members for pixel block info, update external to v73

* Sync from compile linux warnings

* Remove unused check, and PixelFormat::A8 is ordinary format, not compressed format

* metal doesn't support rgb8 (#3)

* Update CCTexture2D.cpp

* Refine code

* Pixel Format Descriptor Table

* fix ci

* BGR5A1

* Simplfy texture format convert function name

* Update

* rgba4 match mtl render format

* Add note about RGBA4

* Remove unused function

* fix osx

* Already converted at texture2d

* Clearly comment

* fixup
2020-09-25 11:07:56 +08:00
halx99 6e7e117a0d RenderTarget abstract, in-progress (#210)
RenderTarget abstract
2020-09-21 22:10:50 +08:00
halx99 bb6faed0a2 fix macro 2020-09-21 11:38:21 +08:00
halx99 c79da1ca05 fix ci 2020-09-11 14:45:45 +08:00
halx99 671b6b4ca9 Tidy code 2020-09-11 00:10:44 +08:00
halx99 cabc917bff Move getFileDataFromZip from FileUtils to ZipFile and mark it as deprecated 2020-09-06 17:00:20 +08:00
halx99 0f078279ff Fix mac [skip appveyor] 2020-09-04 18:16:13 +08:00
halx99 714803916e Fix glviewimpl for osx 2020-09-04 17:58:34 +08:00
halx99 d66e62e436 ASTC6x6 support and more comment about bpp usage in engine (#191)
* ASTC6x6 support and more comment abount bpp usage in engine

* fix log output

* Comment astc compression tool download url

* Add command line comment for astcenc tool [skip travis][skip appveyor]

* Add astc_6x6 test image[skip appveyor][skip travis]

* astc_6x6 mtl

* Refine log info[skip appveyor][skip travis]

* Empty line[skip appveyor][skip travis]
2020-09-03 18:01:40 +08:00
halx99 4a9b2fb9b5 Merge: f2970e72de 8cad7319f6
Merge pull request #188 from halx99/etc2-support

Add etc2 compressed texture support
2020-09-01 00:16:01 -07:00
halx99 bb9652f1a6 Use uint8_t instead unsigned char for byte buffer [skip appveyor][skip travis] 2020-09-01 14:57:18 +08:00
halx99 f9ae5401ec Add copyright notice [skip appveyor][skip travis] 2020-09-01 13:24:45 +08:00
halx99 45b2ab7134 Also decode bmp to RGBA8888 directly 2020-09-01 12:06:21 +08:00
halx99 cc53868d27 More clearly ETC1 format, sync enums for ETC1, correct somethings 2020-09-01 11:43:03 +08:00
halx99 815c737e6b wrap fowardPixels for hardware decoder 2020-08-31 23:09:42 +08:00
halx99 09cedf60b2 Improve images decoder 2020-08-31 21:04:47 +08:00
halx99 e96ae229dd Merge: 5ddc84bbee 539e5ca42c
Merge pull request #189 from aismann/patch-8

Update README.md
2020-08-31 04:27:33 -07:00
halx99 a87c0bba78 More clearly data owner when decode images. 2020-08-31 19:24:23 +08:00
halx99 fa5d2d198b fix resources relative path to avoid test case crash on mobile 2020-08-31 17:39:29 +08:00
halx99 c338472df8 Move copyright notice to header [skip appveyor][skip travis] 2020-08-31 17:35:01 +08:00
halx99 477aa0c185 Clearly CCLOG content 2020-08-31 17:13:04 +08:00
halx99 65a7bd5360 Remove test code [skip appveyor] [skip travis] 2020-08-31 16:31:37 +08:00
halx99 b12068e1c8 Use etc2_decode_image decode etc1 to RGBA8888 [skip appveyor] [skip travis]
This can avoid further texture data convert
2020-08-31 15:34:20 +08:00
halx99 da8f1c56fe ETC2 software decode support 2020-08-31 14:11:48 +08:00
halx99 43f464163c 1. Finish ETC2 support on GL renderer backend
2. Improve ASTC compressed format check
2020-08-30 17:58:39 +08:00
halx99 238cd782e3 Add CMake -DCC_FORCE_USE_GLES to control whether force use gles on win32,iOS 2020-08-28 12:57:00 +08:00
halx99 2a234afc3d Improve listFiles for win32, use std::move avoid string deep copy 2020-08-28 11:05:32 +08:00
halx99 e75a29a393 fix #179 2020-08-28 11:04:14 +08:00
halx99 6345cca301 freetype stream parsing support, reduce memory use on FontCache 2020-08-27 11:35:55 +08:00
halx99 ea1cb45ba3 Refine code style 2020-08-27 10:19:21 +08:00
halx99 c9d6c5afdf Rename PXFileStream to CCFileStream 2020-08-27 00:21:44 +08:00
halx99 083d14f342 Improve code quality 2020-08-18 14:29:09 +08:00
halx99 b594cda5e3 Consider mutex use, which object dou you want guard? 2020-08-18 12:48:16 +08:00
halx99 9eb32b634f Make core lib can be build as dll, fix link issue for external 2020-08-18 12:36:44 +08:00
halx99 c9882c195a Update README_CN.md 2020-08-18 12:11:04 +08:00
halx99 641b2e40f3 Sync fix from https://github.com/cocos2d/cocos2d-x/pull/20518 2020-08-18 12:09:56 +08:00
halx99 a3a231495c Backport CCValue APIs 2020-08-18 11:33:18 +08:00
halx99 b090664084 Make android listFiles behavior same with other platforms 2020-08-17 12:09:31 +08:00
aismann 63e7c6e4dc OpenGL 'works' better... 2020-08-07 08:10:12 +02:00
halx99 4214ed6add Add missing optimize from v3 2020-08-05 13:10:37 +08:00
halx99 df2073f1e5 win32 cover wide API use, remove unused long getFieSize(const std::string&) 2020-08-05 12:24:31 +08:00
halx99 9f66d7dce0 utf-8 file path 2020-08-05 12:17:57 +08:00
halx99 8f541a61a7 Merge: 5f96ce8981 3e95b8ccf3
Merge pull request #135 from halx99/unify-plist-ops

Unify plist implementation, remove apple specific sources.
2020-08-02 20:22:36 -07:00
halx99 588e977ef0 Merge: 8cc189fb4d 6fd4d6e4ab
Merge pull request #134 from halx99/fullscreen-mode

Refactor full screen support
2020-08-02 20:03:07 -07:00
halx99 d6958498d4 Unify plist implementation, remove apple specific sources. 2020-08-03 10:48:26 +08:00
halx99 8024b9b2e9 Adapte multi monitors 2020-08-03 10:33:04 +08:00
halx99 1c59ba423c Unnecessary space lilne [skip appveyor] [skip travis] 2020-08-02 17:00:35 +08:00
halx99 996f303eb7 Optimize param use. 2020-08-02 16:48:19 +08:00
halx99 b12cde7c19 vidMode need moniter 2020-08-02 16:36:58 +08:00
halx99 049a7e58ba Update comment [skip appveyor] [skip travis] 2020-08-02 16:24:30 +08:00
halx99 76d246ce54 check isFullscreen 2020-08-02 16:22:41 +08:00
halx99 2bd0a48e02 Provide more useful for setFullscreen with width,height,refreshRate. 2020-08-02 16:18:39 +08:00
halx99 7c816dae8d Refactor full screen support, fix different behavior when enter full screen between 1 and >=2 times 2020-08-02 11:54:46 +08:00
halx99 bd9a409dd7 Add wav testcase 2020-08-01 19:25:39 +08:00
halx99 f807981d80 fix #129 2020-08-01 11:23:13 +08:00
halx99 2a2b397f27 Add alconfig.h to choose whether use openal-soft 2020-07-31 17:03:58 +08:00
halx99 9345f18159 Add CMAKE option CC_USE_ALSOFT_ON_APPLE to use kcat openal-soft on apple platform, by default currently OFF 2020-07-31 00:06:59 +08:00
halx99 4ff88cc55c Sync fix from v3, see also: https://github.com/cocos2d/cocos2d-x/pull/20509 2020-07-30 10:59:50 +08:00