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>
The font module kept a global "currently selected font" set by
font_select() and implicitly used when drawing. Make it stateless by
introducing a FontSpec {type, weight, size} that font_render_text() /
font_draw_text() and gfx_drawString() take directly.
Make FontWeight a two-valued enum and normalize the 1-9 weight to it
in commandZB().
Removes font_select(), ags_setFont() and ags_setFontWithWeight().
Switch the bundled mincho font from a Source Han Serif JP subset to a
subset of IPA Mincho, which has monospace ASCII glyphs.
IPA Mincho's hhea ascent/descent already match its OS/2 typo metrics, so
adjust_metrics.py is no longer needed. However, IPA Mincho is distributed
under the IPA Font License v1.0, under which a subset is a "Derived
Program"; Article 3.1(4) forbids the derived font's name from containing
the licensed program's name ("IPA"). Add rename_font.py to rewrite the
name table accordingly, and replace licenses/mincho.txt with the IPA Font
License.
gtk_menu_popup() is deprecated since GTK 3.22. Since no GdkEvent is
available at the call site, use gtk_menu_popup_at_rect() with the
current pointer position obtained via gdk_device_get_position().
Instead of hardcoding "dDEMO.alk" / "tDEMO.alk", use the actual filename
stored in nact->files.alk[0] from the directory scan. This fixes loading
failures on case-sensitive filesystems where the actual file may be
named "dDemo.alk" or "tDemo.alk".
Also update gameresource.c to store .alk files without a numeric suffix
at index 0 (these games have only one .alk file).
This resolves issues where saving to and loading from paths with
subdirectories (e.g., "Save\file.asd") would fail.
The original problems were:
1. Writing failure: A path mismatch between directory creation in
commandQE and file writing in fc_open.
2. Loading failure: fc_search could not handle paths containing
directory separators, preventing saved files in subdirectories from
being found.
This commit addresses these issues with the following changes:
- fc_open now automatically creates parent directories when writing a
file.
- fc_search is updated to support two modes:
- It performs a case-insensitive search for simple filenames
(preserving original behavior).
- It performs a case-sensitive existence check for full paths.
Fixes#74.
This introduces "Streamer Mode" to mosaic specified NSFW images, making
the game suitable for streaming or public viewing. This feature is
enabled via the '-censor <file>' command-line option, which takes a file
containing a list of image numbers to be filtered.
Rance 5D uses filename `Save\\Rance5dSystem.asd`. This caused issues:
- On Windows, saving would fail if the `Save` directory did not exist.
- On other platforms, files were created with literal backslashes in
their names.
This change addresses these problems by:
- In commandQE, normalizing backslashes to forward slashes in the path
and ensuring that the target directory exists by calling mkdir_p().
- In commandLE, first attempting to load files with normalized forward
slashes. If that fails, it retries with the original path (containing
backslashes) for compatibility with older saves.
Graymerca uses JPEG images for map tiles, which suffers from color
bleeding due to chroma upsampling in the JPEG decoder.
Since stb_image cannot disable the bilinear upsampling filter, this
switches the JPEG decoder to NanoJPEG.
Fixes#67.