* Use correctly scaled radial deadzones instead of naive per-axis
deadzones
* Option to adjust the "maximum zone" (upper deadzone)
* Option to remap square input into circular. Unfortunately there's no
nice way to detect which type the controller reports. We assume
circular by default.
* A more sensible sensitivity setting
* Use a larger minimum deadzone when emulating key presses (e.g. in
menus)
* Adjusted key repeat to be less aggressive
Removed static_assert_nomsg, since static_assert's message argument is
optional now. In C2X mode this uses the native _Static_assert
functionality, otherwise it falls back to a macro-based overload.
Additionally, rewrote the assert macro so it correctly marks the failing
branch as a dead end.
This is mostly aimed at speeding up TAISEI_SKIP_TO_BOOKMARK mode
- Store global handlers in a dynamic array
- Merge global and local handlers more efficiently, and only do it once
per events_poll() call
- Do not pump SDL events while skipping through stages
- Avoid expensive system call when pushing custom events to the queue
- Process SDL events in batches; do not pump after every event
- Simplify handling of EventPriority enum - EPRIO_DEFAULT equals to 0,
no remapping required
This replaces SDL_mixer with an internal streaming and mixing system,
relying only on basic SDL audio support. It's also a partial refactor of
the audio API, most notably BGM-related. The BGM metadata resource type
is gone, as well as the `.bgm` files. The metadata is now stored inside
the `.opus` files directly, using standard Opus tags.
- RESF_UNSAFE is removed.
- Resources that don't have to be finalized on the main thread can load
completely asynchronously.
- A thread waiting for a concurrent task to complete can start executing
that task itself if it hasn't started yet.
- Refactor the resource loading interface, add support for load-time
dependencies.
- Main-thread finalization of asynchronously loaded resources is now
spread out across multiple frames to mitigate frametime spikes.
- Remove some archaisms from the resource management code.
- Fix potential hashtable synchronization issue.
- Fix some deadlock edge cases.
- Don't spawn more worker threads than there are CPU cores (degrades
performance).
- Add TAISEI_AGGRESSIVE_PRELOAD env variable to attempt to aggressively
discover and preload every possible resource.
- Make r_texture_fill{,_region} expect optimal pixmaps, so that it's
never forced to convert them on the main thread. The optimal format may
be queried with the new r_texture_optimal_pixmap_format_for_type API.
These functions will also no longer needlessly copy the entire image
into a staging buffer - previously they did this even if no conversion
was needed.
- Other random changes to facilitate the stuff above.
The overall effect is somewhat faster load times.
Of course it's still all terrible and full of lock contention because I
suck at concurrent programming, but it's not worse than it was.
Probably.
* Renderer: rename render targets to framebuffers
* Refactor framebuffer pair helper and some of the video API
* Remove hardcoded dimensions from draw_framebuffer_tex
* Make viewport a per-framebuffer property rather than a global one
* Handle config updates via the events system. React to viewport fg/bg quality change requests.
I would've preferred to just go with 4-spaces for indent and no tabs,
but lao is a bit conservative about it. :^)
Still, this is a ton better than mixing different styles all over the
place, especially within the same file.