Commit Graph

3891 Commits

Author SHA1 Message Date
halx99 13a7258150 Remove unused files[skip ci] 2024-05-02 15:56:04 +08:00
halx99 87e4174122 Update ChangeLog 2024-05-02 15:49:26 +08:00
halx99 e3e3460aca Update ImGui to v1.90.5 2024-05-02 15:37:12 +08:00
RH 8b4ac1d262
Setup vertex data before adding new RenderCommand to ensure data is copied across to backend buffers correctly. (#1875) 2024-05-02 10:33:04 +08:00
smilediver 561b8c2349
Enable running `unit-tests` in GitHub workflow (#1871)
* Enable running `unit-tests` in GitHub workflow

* Attempt to fix macOS unit-tests run

* Use axmol run to run unit-tests

* Skip launch when desktop cpu mismatch

* Skip launch when desktop cpu mismatch

* Fix unit-tests crash on linux

* GitHub Action: divide osx arm64, x64 to differrent runner image

---------

Co-authored-by: Deal <halx99@live.com>
2024-05-01 22:24:53 +08:00
RH d6781284a5
Media controller content size should be based on video size not media player size. (#1873) 2024-05-01 12:49:08 +08:00
halx99 3e3628f1b3 Improve axmol run, add opiton: -wait to support run console app 2024-05-01 10:47:38 +08:00
halx99 d69fdfd038 Fix unit-tests working directory on vs debugger 2024-05-01 02:16:53 +08:00
halx99 d50b7aad0b Improve AXGLSLCC for winrt 2024-05-01 01:16:51 +08:00
smilediver dadd5fe983
Fix `unit-tests` build on macOS and Linux (#1870) 2024-04-30 23:26:42 +08:00
Deal d4a2aa93cc
Fix axmol.ps1 2024-04-30 21:07:10 +08:00
smilediver 9ac6db4384
Add unit tests (#1862)
* Add unit-tests app for running automatic unit tests

* Move unit tests from cpp-tests to unit-tests

* TEMP

* Add FileUtils::fullPathForDirectory() tests

* Use test assets from `axmol-sample-assets` repo

* Add more FileUtils::isFileExist(), FileUtils::isDirectoryExist() tests

* Add `unit-tests` builds to GitHub's workflows

* Fix `.github/worflows/build.yml`
2024-04-30 20:52:28 +08:00
smilediver d845e54b49
Fix FileUtils on macOS (#1863)
* Fix FileUtils::getFileSize() not returning -1 when file is not found

* Fix FileUtils::fullPathForDirectory() not appending a trailing slash

* Fix `not` and `and` keyword usage

* Fix FileUtils::getDefaultResourceRootPath() returning nothing on macOS

* Fix FileUtils::isFileExist() returning true for directories on macOS
2024-04-30 20:03:58 +08:00
RH edb4d47bc2
Update documentation to reflect latest changes (#1867) 2024-04-30 20:03:30 +08:00
halx99 4c59349ac7 Improve cmake scripts 2024-04-30 00:43:54 +08:00
RH b6792383a2
Fix accidental removal of break statement. (#1861) 2024-04-29 09:15:33 +08:00
smilediver 354f3abed9
Add ability to create console apps (#1859)
* Print cmake build command when running `axmol build`

* Add option to `ax_setup_app_config()` for building console applications

* Fix console app entrypoint

---------

Co-authored-by: halx99 <halx99@live.com>
2024-04-29 00:24:06 +08:00
halx99 37bb594ad6 Improve ChangLog break changes section 2024-04-27 23:43:32 +08:00
halx99 da2947e0f6 Update ChangeLog 2024-04-27 23:40:52 +08:00
halx99 35313f1cdc Check does Xcode installed 2024-04-27 23:32:27 +08:00
halx99 1e2ad6318c Fix #1857 2024-04-27 23:31:44 +08:00
Deal 1ba83b617e
Remove outdated section from DevSetup.md 2024-04-27 22:19:56 +08:00
Deal 32250c8355
Fix #1838
Change parameter 'sharedRT' of RenderTexture::create to false
2024-04-27 10:27:44 +08:00
RH f20be6ab95
Ensure the window size is correct (#1855) 2024-04-27 03:09:52 +08:00
RH d69f0c0d91
Adjust media control positioning if video aspect ratio is maintained (#1851) 2024-04-26 02:06:02 +08:00
kingy71 7bbcb86ec4
Remove Info.plist from mac Resources (#1849)
Set elsewhere and fails upload to MacAppStore with shared bundle path
2024-04-26 02:04:59 +08:00
RH 1fd770c5bf
[Apple] Fix media controls not appearing (#1848)
* Create media controls in onEnter to work around issue with Metal renderer when creating a RenderTexture

* Add support for setting timeline bar height in media player controller

* Use consistent positions for fullscreen enter and exit controls

* Update core/ui/UIMediaPlayer.cpp

* Create media controls on the next update cycle to work around RenderTexture creation issue with Metal renderer backend

* Add event notification for when video player full screen state changes

* Add full screen switching event to normal media player event handler
2024-04-25 23:20:41 +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
halx99 96fd4e5522 Add libvlc prebuilt entry CMakeLists.txt[skip ci] 2024-04-25 00:01:58 +08:00
halx99 3b2cdace06 Update ChangeLog 2024-04-24 23:01:18 +08:00
RH 3916a2367b
Cross-platform media controller for video playback (#1845)
* Initial work on media controller

* Media player controller for WMF media engine

* Add getDuration and getCurrentTime methods to media engines

* Fix compilation

* Fix Android media timeline issues

* Fix compilation issue

* Fix WinRT compilation issue

* Fix compilation issue

* Add missing header include

* Make it simpler to create a custom media controller

* Ensure the basic media controller widget size is the same size as the media player on initialization

* Add dark media control underlay to give more contrast to the controls
ADd copyright notices

* Removing existing media controller from parent if required

* Adjust for view scaling since embedded resources are created for a scale of 1.

* Scale central media controls if required on content size change

* Remove pointless fast forward and fast reverse buttons
Ensure media controller correctly resizes on full-screen media playback

* Allow enable vlc on windows

* Improve media macro detect

* Add media controls drawn by DrawNode into single texture
Add fullscreen enter and exit controls
setUserInputEnabled and isUserInputEnabled replaced by setMediaControllerEnabled and isMediaControllerEnabled

* Update function calls to new names

* Revert back to setUserInputEnabled and isUserInputEnabled

* Remove embedded circle image and create it with DrawNode

* Change radius of drawn circle to half the total image size

---------

Co-authored-by: halx99 <halx99@live.com>
2024-04-24 22:28:59 +08:00
halx99 9d3eeded39 Update axmol version in cmake [skip ci] 2024-04-24 02:44:25 +08:00
Deal 9c63cb4b9e
Update .appveyor.yml 2024-04-24 02:43:24 +08:00
halx99 ce06671df7 Add missing permision for cmdline tool 2024-04-24 02:24:42 +08:00
halx99 65466ca22c Fix linux ci 2024-04-24 02:18:16 +08:00
halx99 078d6bf21d Fix ci, don't limit xcode version 2024-04-24 02:13:02 +08:00
halx99 ce89c306f5 Rename tools/console ==> tools/cmdline 2024-04-24 02:08:29 +08:00
halx99 599cbdb4c9 Fix ci 2024-04-24 01:48:22 +08:00
halx99 39b7ba6c61 Update build script path 2024-04-24 01:42:55 +08:00
halx99 f8de198e18 Improve build system 2024-04-24 01:39:49 +08:00
axmol-bot 96101ffe97
Committing luabindings for commit 16cb4b5 (#1846) 2024-04-23 22:54:44 +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
halx99 f159250c4e Don't assert since we remove deprecated pixel formats 2024-04-22 23:07:09 +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
Tyelor D. Klein d9a95c6a8d
Fix failed assertion and memory leak with event listeners (#1837)
* Fix failed assertion and memory leak with event listeners

This solves an issue that was fixed for Cocos2d-x v3.16 and then reverted afterwards for "backwards compatibility".

I don't think we need this backwards compatibility anymore, and the benefits to cleaning up this memory outweigh the potential for some developers to need to refactor their code.

Specifically this also solves an ASSERT that fails when quitting the game on a scene which has nodes with Event Listeners that I experienced without this change, and with the Config.h setting AX_NODE_DEBUG_VERIFY_EVENT_LISTENERS enabled.

* Fixed typo
2024-04-19 09:42:43 +08:00
smilediver 547b5c0b38
Fix glfw crash on macOS for large mouse button ids (#1835) 2024-04-19 09:26:54 +08:00
halx99 d03c823573 Update ChangeLog 2024-04-19 00:28:57 +08:00
halx99 3de47cd23a Remove unnecessary crc32 calc when read file from zip 2024-04-18 23:34:34 +08:00
halx99 18a2c9bdba Fix warnings 2024-04-18 23:34:09 +08:00