Commit Graph

290 Commits

Author SHA1 Message Date
halx99 9872818890 Fix typo: BLEND_CLOLOR ==> BLEND_COLOR 2024-04-10 21:47:00 +08:00
halx99 95fe4d35bf Fix ax::print missing '\n' 2024-04-06 23:46:04 +08:00
halx99 ba734bc3e5 Fix some compiling warnings 2024-04-06 18:05:42 +08:00
Deal bf7635fe63
Add CMake option to remove Console from builds (#1788)
* Add CMake option to remove Console from builds

- option: AX_ENABLE_CONSOLE

* Fix ci
2024-04-05 14:25:22 +08:00
halx99 4d89b04850 Move Logging APIs from Console.h/Console.cpp to Logging.h/Logging.cpp 2024-04-03 21:03:40 +08:00
RH 690e16df30
Use single macro to control each feature (#1776)
* Use single macro to control each feature

* Allow Physics module to be enabled or disabled via cmake option
2024-03-30 08:56:32 +08:00
RH 4fb845244f
Allow certain code modules to be removed from build process (#1769)
* Add support for disabling code sections from build process

* Add support for disabling built-in audio

* No need to add definition here

* Remove extra blank lines

* Add required copyright notice

* Document new options
2024-03-28 10:45:20 +08:00
RH f0c0c75979
Add support for verbose trace level logging (#1764)
* Add support for verbose trace level logging

* Set trace log color to white and debug log color to cyan
2024-03-25 12:56:22 +08:00
halx99 d1ec623bb5 Rename folder thirdparty ==> 3rdparty 2024-03-19 21:33:02 +08:00
aismann 06d4c3f255
Update Console.cpp (removed the '\n' which creates an second (empty) line) (#1746) 2024-03-15 19:50:22 +08:00
Deal 76db9007b0
Move color types to math/Color.h (#1741)
* Move color types to math/Color.h

* Use V3F_C4F

* Fix ci
2024-03-14 23:38:45 +08:00
halx99 7c7d3beb02 Improve wasm logging color style 2024-03-11 23:32:34 +08:00
halx99 c1718fee9b Fix linux crash 2024-03-10 01:24:32 +08:00
Deal 729718134f
Improve logging color style (#1739)
* Improve logging color style

* Improve code style

* Fix ci

* Fix ci

* Fix ci

* Fixup

* Fix ci
2024-03-09 09:23:39 +08:00
halx99 1297642416 Fix #1737 2024-03-08 20:42:05 +08:00
halx99 0972191e89 Reset console text color on non-win32 platforms 2024-03-08 01:55:10 +08:00
Deal 931ca91c71
Logging colorful support (#1735)
* Add logging colorful support

* Enable full log fmt style in cpp-tests
2024-03-08 01:15:26 +08:00
Deal 5d2c42e73f
Implement new axmol log system based on fmtlib (#1732)
* Implement new log macros based on fmtlib

* Fix ci

* Fix ci

* Fix android ci

* Fix warnings

* Replace more ax::log by AXLOGX

* Fix ci

* Fix linux build

* Use stack memory for log prefix

* Fix linux build

* Fix warning

* Add ILogOutput support

* Replace old log calls with new log macros

* Fixup

* Fixup

* Fixup

* Update ci msvc to 14.39

* Update Console.h [skip ci]

* Pass log level to ILogOutput
2024-03-07 08:47:00 +08:00
Deal f22cc4be68
Don't use fmt header only (#1707) 2024-02-20 05:37:28 +08:00
Deal 9774d4751c
Fix memory leaks refreshed (#1638)
* Fix memory leaks when axmol apps exit on non-embed systems

    1. DriverBase no destroyInstance
    2. Every object inherited from ax::Ref shoud destory before ScriptEngineManager, otherwise will trigger it's reinit and leak
    3.  QuadCommand always leak isolated indices
    4. static singleton should'nt inhert from ax::Ref due to destory it before ScriptEngineManager impossible
    5. Make Director don't inherit from ax::Ref due to it also cause ScriptEngineManager re-init, because we destroy ScriptEngineManger in destructor of Director
    6. Explicit Director managed by Application and don't delete self at purgeDirector, since it will release at mainLoop and re-init in glView->pollEvents then leak
    7. Rename ApplicationProtocol to ApplicationBase
    8. Rename purgeDirector since we don't delete director self at it, maye rename to cleanup
    9. Change ShaderCache to new/delete singleton, managed by ProgramManager

---------

Co-authored-by: lich426 <lich426@gmail.com>
2024-01-29 22:30:14 +08:00
halx99 c06bed508b Rename cocos_android_app_init to axmol_android_app_init and othre code cleanup 2024-01-29 08:51:35 +08:00
Deal 01d4ad60c7
Fix #1630 2024-01-24 22:00:01 +08:00
BinTester 3cf419a35c
add some utils functions and lua support (#1629)
* UIButton bugfix

* add utils lua support

* add utils lua support
2024-01-24 21:42:39 +08:00
halx99 4600c961cd Update astcenc to 4.7.0 2024-01-15 23:44:36 +08:00
smilediver 5bcaa9ce51
Fix AXASSERT() not working with more complex msg arguments (#1609) 2024-01-12 21:17:40 +08:00
halx99 dea9eb672a Improve code style
Use std::string_view instead std::string
2024-01-10 09:16:56 +08:00
arman hossiny 214fdface8
Add multi UserDefault support (#1592)
* fixed bug replace scene

* add multi UserDefalut (set file name UserDefalut)

help to run multi player on local
2024-01-10 07:34:54 +08:00
aismann 70fa8872de
Add extension 'DrawNodeEx' aka 'DrawNode v2' (#1568) 2024-01-05 02:07:13 +08:00
arman hossiny 29504d102c
Fixed bug replace scene (#1543) 2023-12-26 06:05:42 +08:00
Deal 213f788f75
Merge backend Device, DeviceInfo to DriverBase (#1499)
* backend::Device ==> backend::DriverBase
* backend::DeviceInfo ==> backend::DriverBase
* code style: remove unnecessary virtual function marks
2023-12-11 21:59:25 +08:00
halx99 affcf05b69 Prepare 2.1.0 release
* Update copyright notice
* Remove prebuilt libs from SCM
* Remove optional thirdparty sources/repo from SCM
* Remove tests resources  folder 'Content' from SCM
2023-12-08 01:04:43 +08:00
RH 371ee89f8a Reduce memory usage when using getFileMD5Hash function (#1472)
* Avoid high memory usage when hashing a file.

* Make the chunk size adjustable when hashing a file. Default to 16KB.

* Add computeFileDigest to enable the use of different hashing algorithms.

* A hash should still be reported for an empty file.
2023-12-04 19:08:18 +08:00
Paulo Coutinho 0aab228acc Rename glview to correct representative name (#1467) 2023-12-01 09:04:51 +08:00
halx99 7b33b4edf0 Apple: remove deprecated gamepad
refer #1453
2023-11-27 00:01:14 +08:00
halx99 6a0f021ba9 Update thirdparty
simdjson 3.3.0 ==> 3.6.0
astcenc 4.5.0 ==> 4.6.0
yasio 4.1.0 ==> 4.1.1
2023-11-23 23:27:27 +08:00
RH 6f00aed73f [Android] Enable support for restarting application process if OpenGL context is lost (#1409)
* Add code to allow app to restart cleanly.
Call native renderer before the sleep in onDrawFrame due to possibility of invalid texture data after delay.
Dispatch event if application process will be restarted.
Add AX_ENABLE_RESTART_APPLICATION_ON_CONTEXT_LOST configuration option. Disabled if AX_ENABLE_CACHE_TEXTURE_DATA is enabled.

* Add missing code for nativeOnContextLost

* Revert onDrawFrame change to commit in separate PR

* Fix activity reference
2023-11-02 19:41:41 +08:00
RH e808fb9758 [Android] Fix corrupted FPS stats font textures on OpenGL context lost (#1402)
* Fix corrupted FPS stats font textures on OpenGL context lost

* Ensure _rendererRecreatedListener is recreated on a director restart.
2023-10-25 09:44:08 +08:00
halx99 429f11fd1c Fix #1391 2023-10-17 23:23:57 +08:00
halx99 4ccac3c21c Fix #1389 2023-10-16 20:24:38 +08:00
halx99 de286831de Improve code style 2023-10-12 22:10:11 +08:00
Deal c2847f892e Use std containers instead uthash (#1379) 2023-10-12 22:00:46 +08:00
halx99 b9042aeb20 Add a dedicated class for easy load padded string for simdjson parser 2023-10-12 00:02:48 +08:00
halx99 65e253b54a Fix wasm build 2023-10-10 22:01:09 +08:00
Deal 58221bbf2a Fix osx ci 2023-10-08 08:03:47 +08:00
halx99 dbb0dbcb79 Use JsonWriter for SDFGen 2023-10-08 02:28:08 +08:00
halx99 2305bfeced Update yasio to latest 2023-10-06 01:02:01 +08:00
halx99 539f37651b Make Data::fastSet behavior compatible, refer #1369 2023-10-02 21:08:51 +08:00
halx99 57492b203c Update yasio, improve pod_vector
a. now the pod_vector more reusable, byte_buffer, array_buffer aka dynamic_array
b. change pod_vector resize, assign allocate memory exactly/fit and +=, append, insert operations trigger msvc capacity growth strategy
2023-10-01 22:04:47 +08:00
halx99 79cd628235 Improve API utils::base64Encode with std::span 2023-09-29 17:13:10 +08:00
halx99 8ea11838a3 Minor improvements 2023-09-29 11:30:33 +08:00