Provide a trackpad-style on-screen cursor for touch environments (mainly
Android), where touching the screen previously jumped the pointer to the
touched location (absolute) and SDL hardware cursors are invisible.
When enabled, a finger drag moves an arrow cursor relatively, a tap
left-clicks (held briefly so polling games detect it), two fingers
right-click, and a stationary long press starts a left-button drag. Real
mouse motion is ignored (including the spurious startup (0,0) event), and
program-driven cursor moves are followed via the internal pointer location
instead of warping the OS cursor.
The feature is disabled by default and enabled via the -virtualpointer
command-line option, the virtualpointer profile setting, or the "Virtual
mouse pointer" toggle in the Android launcher (persisted in
SharedPreferences and passed to the engine as -virtualpointer).
The gesture handling lives in event.c and the cursor rendering in the new
platform-independent virtual_pointer module, so it works on any touch
target.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This removes (old, unmaintained) real CD-ROM support for Linux and
FreeBSD. It may be possible to implement cross-platform CD support using
libcdio (https://www.gnu.org/software/libcdio/), but it would not be
worth the effort given the low avilability of hardware that can play
CD-DA these days.
This implements the hexagram, pentagram, and windmill effects of the CE
command. These were implemented in the (removed) X11 backend, but not in
the SDL backend.
This implementation uses SDL_RenderGeometry() which is added in SDL
2.0.18. If it is not available, these effects will fall back to
crossfade.
If -debug_dap flag is given, xsystem35 speaks the Debug Adapter Protocol
(https://microsoft.github.io/debug-adapter-protocol/) via stdin/stdout.
This enables xsystem35 to work as a backend of VS Code's Debugger (and
possibly other debuggers that support DAP).
- Add some functions to ASYNCIFY_ADD
A function that calls an asynchronous function via a function pointer
must be added to ASYNCIFY_ADD, even if it had a direct call to
another asynchronous function, so that the indirect call itself is
instrumented.
- Add dummy emscripten_sleep() call to send_agsevent
Because adding a function to ASYNCIFY_ADD does not make its callers
instrumented transitively.
If -debug option is specified, xsystem35 enables built-in debugger. It
optionally loads debug information from *SA.ALD.symbols file (generated
by xsys35c), and drops into a debugger REPL.
Currently the debugger supports:
- Simple breakpoints
- Backtrace
- Single-step execution (step into / step over)
- Printing variables
Also, when the debugger is enabled SIGINT breaks execution and enters a
REPL.
This adds functionality equivalent to the MsgSkip module, for older
games. It is enabled if "MsgSkip" file is specified in the game resource
file.
Since messages in pre-system3.9 games don't have IDs, it uses a Bloom
filter to test whether a message has been already seen or not.
This is safe because we use SDL_HINT_EMSCRIPTEN_ASYNCIFY = 0. This
significantly reduces the number of Asyncified functions and reduces the
wasm code size by 80kb.