This is related to a494a3f411 and should hopefully
fix the last issues with this for good.
Seems fine with SDL versions from 2022 and 2023 on windows;
untested on linux.
(The second window->handleInput() that got removed broke the sing circle
if it was there. It was previously added as a mitigation and is no longer
needed.)
Major code/logic cleanups + it has a multithreaded batch mode now.
The VFS code doesn't like multiple threads at all,
so for now there's a big lock in front of where it matters.
Changed precacher, map/tileset, and worldmap loading to batched mode.
Still TODO:
- fix broken mod preview images
- reloading resources on debug key
- make mod recache entirely unnecessary
- actually drop resources when no longer needed
Also fix bug that mouse.change got stuck on a tiny value and constantly
move the camera in editor mode.
This is a continuation of 764d106d50 and seems to fix the
previous issues with SDL2 >= 2.0.17
Also remove some unused vars.
Observations:
- Entity::renderPass was never set to RENDER_ALL -> can simplify some things
- The initial pass check in RenderObject::render() was constant for each pass
-> All logic that is per-pass-constant can be moved to a renderability pre-check
- Core::overrideStartLayer, Core::overrideEndLayer, Core::rlayer were never used
- Should be possible eventually to prepare & render layers in parallel
I am not sure if the changes in this commit are 100% correct, but layer passes
are still working and the hug looks like it should.
Thinking about it, the overrideRenderPass functionality should never have existed.
The game scripts don't actually use entity_setRenderPass
(which in turn calls Entity::setOverrideRenderPass())
so I might remove that function in a future commit,
together with the rest of the "override" functionality.
Without this and using an affected SDL version, the song circle
is all jittery; the mouse cursor appears to really like to stick
to notes in the left half of the circle.
This issue first appeared in SDL commit 82793ac279d19b5 and caused
the entire game to hang (infinitely firing mouse motion events);
SDL commit 31f8c3ef4409a93fa fixed the hang but instead made
SDL_WarpCursor() jittery.
(Also see SDL commit 331859079674465 for a follow-up)
- Building with CMake for development is now actually sane
- Split deps into projects and extra files
- Building against external deps should still work but needs testing
- Can now build out of the box without further adjustments as long as SDL(2) is found properly
- Build Lua in C++ mode (so it can use exceptions instead of setjmp/longjmp)
- Unfortunately we need to enable exceptions for this :(
- Remove these defines:
* AQUARIA_BUILD_SCENEEDITOR (now always on)
* AQUARIA_BUILD_CONSOLE (now always on)
* BBGE_BUILD_ACHIEVEMENTS_INTERNAL (now always on unless BBGE_BUILD_STEAMWORKS is defined)
* BBGE_BUILD_OPENGL_DYNAMIC (now always on, define BBGE_BUILD_OPENGL_STATIC if needed)
* BBGE_BUILD_FMOD_OPENAL_BRIDGE (now always on)
- BBGE_BUILD_STEAMWORKS is not actually implemented (any volunteers?)
- Prepare later removal of SDL & the old vc90 project from the repo. See #74 for extra notes.
- Enumerate display modes to show in the resolution selector based on the
screen we're on
- Correct graphics init code to use the display index specified in
user settings
Also: Recently introduced key names in usersettings.xml will no longer work.
But this should automatically detect key names as they used to be,
and convert automatically. Needs testing.
This makes the window resizable in desktop mode, and fixed size otherwise.
Fullscreen desktop has always the dame resolution as the desktop.
Add config setting to specify initial display.
Add config setting for the refresh rate (not yet properly integrated)
Closes#17