Commit Graph
1165 Commits
Author SHA1 Message Date
kichikuou 6456f59c37 emscripten: Add JSPI build option 2026-08-21 08:54:34 +09:00
reiicheru f748e8f678 android: Hide android status bar when app is resumed (#81) 2026-08-10 09:44:56 +09:00
kichikuou a9e23508b7 Reimplement the string input dialog with a microui textbox
The dialog edited and drew its field by hand because microui's textbox
cannot display IME composition text.

Teach microui about compositions instead, and split mu_textbox_raw()
into input and drawing halves so the MJ inline editor can share the
input path while keeping the game's own appearance.
2026-08-08 13:03:31 +09:00
kichikuou c3bd978f02 microui: Add keyboard navigation
ctx->focus is a transient "pressed with the mouse" state, so it cannot
serve as a keyboard focus. Add a persistent ctx->kb_focus alongside it.
Controls enter the focus cycle from mu_update_control(), which every
widget already calls, so this needs no per-widget code.

Tab and Down move the focus forward, Shift+Tab and Up backward, Enter or
Space activates the focused control, and Left/Right adjust a focused
slider. The focused control is outlined with the new MU_COLOR_FOCUSRING;
window chrome is excluded via MU_OPT_NOKBNAV.
2026-08-08 10:17:02 +09:00
kichikuou 50a6b17c5e Version 2.19.1 v2.19.1 2026-08-02 12:41:18 +09:00
kichikuou 0d49619366 Fix unit map storage for 16-bit variables
Store unit map attributes as vmvar_t and derive VR/VW transfer sizes
from their element type. This prevents buffer overruns after vmvar_t
became uint16_t and fixes upward movement in Rance IV.

Add scenario coverage for both transfer directions and verify that
adjacent variables remain intact.
2026-08-02 12:34:40 +09:00
kichikuou da3cc5d900 ags: Consolidate display info accessors 2026-07-24 21:04:25 +09:00
kichikuou 1785e93fcc Refactor gfx API 2026-07-24 21:04:22 +09:00
kichikuou a77e849f82 Version 2.19.0 v2.19.0 2026-07-19 12:53:09 +09:00
kichikuou 978dbdbc3b Tweak menu strings
Also, do not show "Mouse Movement" item on Android.
2026-07-19 12:46:03 +09:00
kichikuou e3c168c5a6 Android: Isolate game execution process
The launcher and GameActivity previously ran in the same process. Native
globals and library state therefore survived after returning to the
launcher, leaking static data from one game to the next game.

Run GameActivity in a private :game process and terminate it after SDL
shutdown completes, so every game starts with fresh native state. Keep
the launcher in the main process and refresh its game list from disk
when it resumes.
2026-07-19 09:09:21 +09:00
kichikuou 9f8c2af842 Emscripten: Fix ReferenceError for SE_VOLVAL_CH
EM_ASYNC_JS stringifies its function body without expanding macros. Pass
the BGM and sound-effect channel values through C wrapper functions so
the generated JavaScript receives numeric channel arguments.
2026-07-19 07:20:53 +09:00
kichikuou 5d8b1c5632 Change vmvar_t from int to uint16_t 2026-07-17 09:50:21 +09:00
kichikuou 30188c3a4f Match variable bounds with System 3.9
System 3.9 saturates compound addition and multiplication at 65535,
while an overflowing ascending loop stores the wrapped 16-bit result
after testing the wide value.

Update the scenario expectations and regenerated fixture to cover both
cases. The suite passes with xsystem35 and the original System39.exe.
2026-07-17 09:50:02 +09:00
kichikuou a627a8ea3d Add VM variable storage type
Define a dedicated `vmvar_t` type for values stored in variable pages
and propagate it through interfaces that expose those values. Keep the
type as int for now so this commit does not change runtime behavior.
This separates VM storage from ordinary int buffers and makes a later
conversion to 16-bit storage mechanically checkable.
2026-07-17 08:48:10 +09:00
kichikuou 0cf9c1fe8d Add variable semantics tests
Cover variable page allocation, array reference handling, and Shift-JIS
conversion in src_tests.

Extend the scenario suite with 16-bit boundary behavior for assignments,
loops, module results, and save/load round trips.
2026-07-17 08:11:01 +09:00
kichikuou 0887c44292 Run scenario tests headlessly
Register the existing scenario suite with CTest using SDL's dummy
video and audio drivers.
2026-07-16 20:53:19 +09:00
kichikuou 27a0c89a73 QNT: Add odd-size image test 2026-07-10 08:54:22 +09:00
kichikuou 5c827225ab QNT: Calculate decompression buffers exactly
Round image dimensions up to even values for QNT's 2x2 pixel blocks, and
use the resulting exact size for pixel and alpha decompression.

Verification against Only You Re Cross's QNT files confirmed that the
former 1164-byte discrepancy is odd-height padding, not extra zlib
output. Remove the obsolete fixed margin.
2026-07-10 08:54:19 +09:00
kichikuou bc37ba6256 Require SDL2 >=2.18.0 2026-07-09 09:50:44 +09:00
kichikuou ab4bc2d8d1 Move more modules into src_lib 2026-07-09 07:16:59 +09:00
kichikuou f26321c5e0 Android: Add some comments to CdImageReader 2026-07-05 16:34:16 +09:00
kichikuou 1d897c72d0 Android: Add CD image unit tests
Add synthetic ISO9660, CUE, CCD, and MDS fixtures for JVM unit tests.
Cover CD image sector mapping, audio extraction, install cleanup,
playlist generation, and output path validation.
2026-07-05 16:21:17 +09:00
kichikuou 172c76b4e2 Update android/README.md 2026-07-05 14:51:50 +09:00
kichikuou 100584f896 Android: Support CCD and MDS CD images
Extend the Android CD image reader to accept .bin/.img + .ccd and
.mdf/.mds pairs. CCD metadata is converted into the existing track
model, and MDS descriptors provide data and audio track offsets for
extraction.
2026-07-05 14:48:05 +09:00
kichikuou 975f618b53 Android: Support .img/.cue installs
Extend the Android CD image reader to parse .bin/.img + .cue images
and map MODE1 data tracks into the ISO9660 extractor. Audio tracks are
extracted as WAV files under GAMEDATA/cdda, and playlist.txt is
generated from the CUE track numbers.
2026-07-05 14:20:51 +09:00
kichikuou 0c8bab0c64 Android: Add ISO CD image installer
Add a CD image install path that accepts selected files from the
launcher and extracts GAMEDATA from ISO9660 images. The installer
reuses the existing install transaction cleanup and writes
game_directory.txt so installed games launch through the normal
GameActivity path.
2026-07-05 13:37:15 +09:00
kichikuou 0192fd3d8e Android: Split launcher storage and install logic
Move ZIP installation and file-store responsibilities out of Launcher.
Launcher now coordinates install state and delegates game scanning,
save-data operations, and ZIP extraction to focused helper classes.
2026-07-05 12:28:57 +09:00
kichikuou d69fc5c6a3 Android: Keep launcher install state in Launcher
Move ZIP install jobs from GlobalScope to a Launcher-owned coroutine
scope and store progress, success, and failure in InstallState. This
lets a recreated LauncherActivity render the current install state and
consume completed results once, even when observer callbacks happened
while the activity was absent.
2026-07-05 11:24:40 +09:00
kichikuou 68a39843e2 Android: Prevent ZIP path traversal in launcher 2026-07-05 10:16:48 +09:00
kichikuou e3d7b60785 Emscripten: Apply volume-valancer levels to the shell 2026-07-04 16:17:31 +09:00
kichikuou 2bb891ada8 Move WAI parser to audio_meta.c (renamed from bgi.c) 2026-07-04 16:17:28 +09:00
kichikuou f109fe11f5 Replace event_custom_handler with modal_handle_event 2026-07-01 17:57:14 +09:00
kichikuou 73b3377b77 Add option to mute audio while the window is unfocused
Disabled by default; enable via the mute_on_unfocus rc setting or the
-mute_on_unfocus flag.

Fixes #37.
2026-07-01 17:36:58 +09:00
kichikuou 9400572502 Rename menu_render_overlay to modal_render_overlay 2026-07-01 17:26:04 +09:00
kichikuou a1e063c4b2 Enable the volume controller dialog on Emscripten
Export volume_dialog_open() so the web shell can open it, and add
modal_run to ASYNCIFY_ADD since it drives an async loop.
2026-07-01 17:21:49 +09:00
kichikuou 602c55a5e5 Enable UI translation on platforms without libintl
Compile po/ja.po into a built-in catalog and select it by locale via
SDL_GetPreferredLocales(), so translations work without libintl.
2026-07-01 13:53:18 +09:00
kichikuou 9624192a41 Provide native input/menu implementations directly on Windows
Let win/dialog.c and win/menubar.c define input_modal_string,
input_modal_number, menu_open and menu_init directly instead of
dispatching to them through wrappers.
2026-07-01 10:53:14 +09:00
kichikuou 5c7436e2b1 Factor out the confirmation dialog in menu.c 2026-07-01 10:24:52 +09:00
kichikuou 6c9844697f Merge menu_emscripten.c into menu.c
Consolidate the SDL and Emscripten menu backends into a single menu.c.
2026-07-01 10:11:32 +09:00
kichikuou 210c0a13e4 Reword the quit/restart confirmation dialogs 2026-07-01 09:23:44 +09:00
kichikuou 3ebb1faece Use the SDL popup menu on Android
The popup menu opens with a three-finger tap. Add touch support to the
modal framework: a tap is replayed as a multi-frame mouse
hover->press->release so microui registers the click, and the press is
held so sliders can be dragged. Fix a microui command-buffer alignment
bug that crashed on 32-bit ARM.
2026-07-01 09:23:38 +09:00
kichikuou 286f150510 Android/Emscripten: Move input dialogs into input_modal.c
Consolidate the Android and Emscripten implementations of the string/
number input dialogs into input_modal.c, and split the input-dialog API
out of menu.h into input_modal.h.
2026-07-01 08:22:14 +09:00
kichikuou a194cf10a6 Reimplement the windowless string input on the modal framework
Move edit_string into input_modal.c as an inline modal dialog, sharing the
IME buffer handling and event handler with menu_inputstring.
2026-07-01 08:22:09 +09:00
kichikuou 9587d350ec Split string/number input dialogs out of menu_sdl.c into input_modal.c 2026-06-30 14:17:44 +09:00
kichikuou 02f62d51bb Add Restart to the SDL popup menu
Also localize the quit/restart confirmation dialogs.
2026-06-30 12:34:14 +09:00
kichikuou 54b98ec3e4 Translate UI strings and guard the .pot against staleness
Translate the menu/dialog strings that were left untranslated. Add a CI
step that fails when po/xsystem35.pot is out of sync with the sources.

Also remove unused autotools gettext files.
2026-06-30 12:20:51 +09:00
kichikuou 8cde827ee6 modal: Reset input state when a modal dialog closes
The click (or keypress) that opened a modal dialog leaves its button
"down" in the engine, and the modal consumes the matching release, so
afterwards IK kept reporting a stuck mouse button (or key). Forget all
held keys/buttons when a modal closes.
2026-06-30 10:04:19 +09:00
kichikuou a5d67b067c Use System39.exe-compatible format for Volume.sav
Also, save Volume.sav when the volume dialog is closed.
2026-06-29 17:18:49 +09:00
kichikuou 5cb70110b9 Apply BGM_VOLVAL_CH to MIDI and CD playback
MIDI and CD are background music, so they should share the same volume
control as BGM. Route them through the BGM volume valancer channel.
2026-06-29 16:17:13 +09:00