Commit Graph

420 Commits

Author SHA1 Message Date
RH c37bcf8977
Prevent excessive calls to deleteBackward method which may cause crashes on Android (#2248)
* Pass the number of characters to delete from a TextField

* Include TextFieldEx.h reference in axmoil-ui.h

* Remove logging calls used for testing

* Update parameter name
2024-11-28 23:12:21 +08:00
halx99 1e633a015d
Remove TTF Font charCode 65535 limit 2024-10-29 06:53:23 +08:00
aismann 53ec946592
Improve DrawNode::drawPie() (#2222) 2024-10-28 21:43:09 +08:00
aismann 044cc87543
Fix DrawNode::drawPie(DrawMode::Line, thickness =1) draw a closed line (like DrawMode::Semi) (#2217) 2024-10-22 21:56:00 +08:00
aismann 2e70bfc98a
DrawNode calls: replacing Color4F with Color4B (without the 'test' folder!) (#2192)
* drawNode calls: replace Color4F with Color4B

* replace Color4F

* removed unused includes
2024-10-01 19:10:07 +08:00
halx99 08b1657e14
Fix #2186 2024-09-27 21:40:24 +08:00
aismann f320ba1f66
Remove all DrawNode setLineWidth() stuff (#2172)
* remove all setLineWitdth stuff

* Update axlua_base_auto.cpp

* Update DrawNode.cpp
2024-09-23 22:13:12 +08:00
smilediver 5c31ecb3c2
Optimize DrawNode (#2165)
* DrawNode: refactor buffer update

* DrawNode: optimize transform application

* DrawNode: remove unused variables

* DrawNode: use reinterpret_cast

* DrawNode: fix crash on render context loss
2024-09-21 23:55:26 +08:00
halx99 805390e9d7
Fix #2163 (#2166) 2024-09-20 07:30:12 +08:00
Thang Nguyen 1e178b8273
Update Sprite.cpp (#2164) 2024-09-19 21:53:45 +08:00
aismann c488380170
Add (missing) parameter 'drawLineToCenter' to 'drawSolidCircle(...)' (#2160)
* Add parameter drawLineToCenter to drawSolidCircle

* fix  drawSolidTringle/drawTriangle

* Update axlua_base_auto.cpp
2024-09-17 22:09:05 +08:00
aismann 46332b544b
Fix #2140 DrawNode issue (#2158) 2024-09-16 22:51:15 +08:00
halx99 cfcdddd89b
Enable cache render data for webgl by default (#2151)
* Remove unused static function
2024-09-15 06:00:48 +08:00
halx99 76b30a9a80
No longer add sprite as child of RenderTexture (#2149) 2024-09-15 02:02:21 +08:00
halx99 a6dd7e932d
Allow turn on/off deprecated features, follow #2111 (#2136)
- Add new cmake option: `AX_CORE_PROFILE`
- Remove deprecated stubs from extension: `cocostudio`
- Remove `AX_DEPRECATED_ATTRIBUTE`
2024-09-13 02:17:35 +08:00
halx99 6a78b18781 Use pod_vecttor for DrawNode 2024-09-08 00:17:47 +08:00
aismann 4ae3792164
DrawNode V2 (#2124)
* DrawNodeV2 ready4merge

* Update README.md

* Lua stuff

* Update DrawNode.h

* Update DrawNode.cpp

* Update DrawNode.cpp

* Update DrawNode.cpp

* Add the cocos2dx test again, add some improvements

* Some improvements

* Remove CandyMix from Android devices

* Update DrawNodeTest.cpp

* Clean tester code
2024-09-06 21:31:18 +08:00
RH 0fbf9f7fde
Set RenderTexture content size (#2120) 2024-08-30 22:46:40 +08:00
smilediver 89629c9dd7
Sprite: show stretch warning only if stretching is enabled (#2113) 2024-08-29 00:18:19 +08:00
smilediver ebdf2a7f6f
SpriteFrameCache: fix dangling ref in `removeSpriteFramesFromTexture()` (#2106) 2024-08-27 23:28:51 +08:00
smilediver e6174ff62f
Node: fix `setPosition()` and `setPositionNormalized()` not switching modes if positions match (#2102) 2024-08-27 20:24:28 +08:00
j-jorge 15268dc182
Remove the NS_AX_BEGIN and NS_AX_END macros. (#2100) 2024-08-26 00:25:33 +08:00
smilediver 3f8d47dc36
Trim trailing whitespace for files in `core` folder (#2089) 2024-08-15 12:14:02 +08:00
smilediver ad94765c09
Remove some bad warnings (#2088) 2024-08-15 12:13:42 +08:00
halx99 b25b702d97 Release 2.1.5 (#2076)
* Fix  unexpected libpng used

* Fix string format incorrect for tests

* Fix #1751, use coroutine control AutoTest flow

* Update CHANGELOG.md

* Added OpenType font (.otf) to the noCompress list. (#2077)

* Update 1k & copyright notice in some sources

* Move doctest to axmol 3rdparty

* Fix ci

* Update 1kdist to v90

* Update 1kiss.ps1

* DrawNodeV2 0.95.1 (#2079)

* Rename remaining legacy engine related spells and improve code style

* Update 3rdparty README.md

* Fix checkReallySupportsASTC does not work on ios device

reported by @BIGCATDOG in https://github.com/axmolengine/axmol/issues/2078

* Fix ci

* FastRNG: add missing include for AXASSERT (#2081)

* Delete unused files

* Improve FileUtils

- Rename FileUtils::createDirectory to FileUtils::createDirectories
- Use splitpath_cb to optimize FileUtils::createDirectories
- Rename FileUtils::getFileShortName to FileUtils::getPathBaseName
- Rename FileUtils::getFileExtension to FileUtils::getPathExtension
- Add FileUtils::getPathDirName
- Add FileUtils::getPathBaseNameNoExtension
- Mark all renamed FileUtils stubs old name deprecated
- Mark all FileUtils offthread APIs deprecated

* Update box2d to v2.4.2

* Disable /sdl checks explicitly for winuwp

For axmol deprecated policy, we need disable /sdl checks explicitly to avoid compiler traits invoking deprecated functions as error

* Update cppwinrt to 2.0.240405.15

* Update simdjson to 3.10.0

* Fix box2d testbed compile error

* Improve file path to url

* Fix FileUtils::createDirectories unix logic

* axmol-cmdline: remove arch suffix for host build output directory

* Update CHANGELOG.md

* Update lua bindings

---------

Co-authored-by: Dani Alias <danielgutierrezalias@gmail.com>
Co-authored-by: aismann <icesoft@freenet.de>
Co-authored-by: smilediver <smilediver@outlook.com>
2024-08-11 23:51:35 +08:00
Turky Mohammed 4c80b80ff7
Improve FastRNG implementation (#2056)
* Update FastRNG and improve particle system and tests

* Update FastRNG.h

* remove unnecessary includes

* Adapt unit_tests

* unit test rotL too
2024-07-27 23:44:25 +08:00
halx99 11b8d28fd7
Mark StringUtils::format deprecated, use fmt::format instead (#2029) 2024-07-13 22:53:14 +08:00
aismann fe0adcbb1f
Rename all AXLOG/printf to AXLOGD (without .\core, .\3rdparty) (#2020) 2024-07-11 23:28:31 +08:00
RH 7a5c45a75b
Ensure the RenderTexture reference is valid on threaded task completion (#2024) 2024-07-11 09:07:53 +08:00
RH e590b9d146
Set several log messages to verbose level (#2021) 2024-07-05 22:17:00 +08:00
halx99 a3a5203fb5
Mark AXLOG, AXLOGINFO, AXLOGWARN, AXLOGERROR deprecated (#2017)
* Mark AXLOG, AXLOGINFO, AXLOGWARN, AXLOGERROR deprecated

* Fix winuwp build
2024-07-05 07:51:36 +08:00
smilediver d79a202e6e
Renderer fixes (#1996)
* Backend: remove RenderTargetFlag and refactor depth/stencil state setup

* Fix Z-test and Z-write being enabled by default for main queue

* GL: fix framebuffer attachment not being cleared

* Use dirtyFlags for RenderTarget update

---------

Co-authored-by: halx99 <halx99@live.com>
2024-06-29 00:20:32 +08:00
halx99 ad051f353f
Update TLD to axmol.dev in sources (#1977) 2024-06-10 02:25:43 +08:00
AlexandreK38 aacfa570a0
Count run action finish to call final finish when two run actions are… (#1946)
* Count run action finish to call final finish when two run actions are performed

* change logic to use wait count
2024-06-08 23:14:16 +08:00
halx99 8eeed46cfc
Add JobSystem support (#1968) 2024-06-07 00:33:01 +08:00
AlexandreK38 79aabfd6af
Sprite and TextureCache from ax::Data (#1967) [skip ci]
* Add Sprite and TextureCache way to use image from Data

* add Sprite cpp tests

* Apply suggestions from code review

---------

Co-authored-by: halx99 <halx99@live.com>
2024-06-07 00:30:55 +08:00
Purple 22ecef1c77
just addressing some compiler warnings on windows (#1954)
* fixed UIWebViewImpl-win32 warning C4244 while changing LPWSTR to string

* use direct `socket_native_type`

* directly use HMENU instead of int

* not sure why it wasn't auto converted but msvc spitted warnings

* we're moving it, it doesn't need to be constant, using ntcvt::from_chars

* ignore it to reduce one more warning

* add some missing `noexcept`

* reverted some const removal didn't realize it was used for rvalues
2024-06-03 23:16:54 +08:00
RH 66ca90cf41
Apply child stencils correctly to the clipping node (#1957)
* Child stencils are now applied correctly to the clipping node
Fix incorrect reference count for original program states stored in collection

* Add test for unique child stencils

* Fix comment
2024-06-03 23:15:57 +08:00
AlexandreK38 1639861dc5
Fix Callback and store Renderer Image type (#1945) 2024-05-31 13:01:42 +08:00
RH 741472398f
Do image processing to reverse premultiplied alpha in separate thread (#1929)
* Add missing parameter names

* Move processing intensive operation to a separate thread

* FileUtils instance may not be thread safe
2024-05-26 09:26:06 +08:00
Turky Mohammed ef3f14c2d7
[BUG] Fix system font blurring (#1907)
* Update Label.cpp

* Update core/2d/Label.cpp

---------

Co-authored-by: halx99 <halx99@live.com>
2024-05-21 21:49:06 +08:00
RH 49bd2bc7de
Add support for ensuring sprite content size does not change on new texture (#1897)
* Add support for ensuring sprite content size does not change on new texture

* Use better method name for enabling sprite dynamic sizing
2024-05-16 19:33:09 +08:00
Tyelor D. Klein 99866d9462
Retain _debugDrawNode in Label (#1890)
* Retain _debugDrawNode in Label

This fixes a memory corruption bug and resulting crash in the TextFieldTTF (and likely other TextField classes) where the _debugDrawNode wasn't being retained, and the label isn't added to the scene for a TextField, but is maintained by the TextField. This caused _debugDrawNode in the Label class to get cleaned up, even though Label still thought it had a valid reference to a DrawNode.

* Added missing Axmol copyright

* Changed Label to use visit for _debugDrawNode
2024-05-16 19:32:53 +08:00
halx99 1baf5cde3b Fixup 2024-05-11 01:22:27 +08:00
Deal 004065a054
Rename ax::Ref ==> ax::Object (#1877)
* Rename ax::Ref ==> ax::Object

* Update Object.h [skip ci]
2024-05-03 22:15:08 +08:00
Deal 32250c8355
Fix #1838
Change parameter 'sharedRT' of RenderTexture::create to false
2024-04-27 10:27:44 +08:00
Deal aed58e6c28
Cleanup cc stubs (#1847)
* Cleanup cc stubs

1. Rename ax::ccMessageBox to ax::messageBox
2. Remove unused API: ax::LuaLog
3. Move ax::ccNextPOT to ax::utils::nextPOT

* Improve code style [skip ci]
2024-04-25 00:51:00 +08:00
tkzcfc 16cb4b5e9d
When loading csb files, prevent repeated loading of plist files (#1844)
* When loading csb files, prevent repeated loading of plist files

* Add more feature

* Rename function

* Use isSpriteFramesWithFileLoaded to determine whether the atlas is loaded

* use string_view instead of string

* Update SpriteFrameCache.cpp

* Fix compilation error
2024-04-23 21:21:53 +08:00
Deal 6f8e07167b
Revert "Fix failed assertion and memory leak with event listeners (#1837)" (#1841)
This reverts commit d9a95c6a8d.
2024-04-21 05:51:22 +08:00
Deal 74612ef296
Remove deprecated pixel formats L8, A8, LA8 (#1839)
* Remove deprecated pixel formats

* Fix ci

* Fixup [skip ci]

* Fixup [skip ci]

* Update tests [skip ci]
2024-04-20 22:29:16 +08:00