1188 Commits
Author SHA1 Message Date
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
kichikuou e3dcadd5dd Allow the volume dialog to work without VolumeValancer
When a game defines no VolumeValancer[], fall back to two generic
channels so BGM and sound effects can be adjusted independently.

Volume controls are now always available, so drop the conditional menu
handling.
2026-06-29 15:52:08 +09:00
kichikuou ff31d03153 Implement mus_vol_set_valance()
Apply the System39.ini volume valancer levels to audio output, so the
Volume controller dialog actually adjusts per-channel volumes. PCM scales
its chunk volume by the channel mapped via the .wai file, and BGM scales
its music volume by valancer channel 0.

Fixes #62.
2026-06-29 11:44:22 +09:00
kichikuou 63886d7d00 Make the volume dialog's close button functional 2026-06-29 11:44:21 +09:00
kichikuou c119c2f969 Enable the volume controller dialog on Windows
Rename s39init.{c,h} to volume.{c,h}, move the dialog code there behind
volume_dialog_open(), and add a "Sound Settings" item to the Windows
menu.
2026-06-29 11:44:18 +09:00
kichikuou fb63d42ec1 Remove popupmenu_opened flag
With the blocking modal_run(), the game's main loop is frozen while a
menu is open, so the flag's input-suppression and VM-pause checks are
unreachable. Quit requested during a modal is now handled by closing the
modal and letting it propagate through the main loop.
2026-06-28 13:27:39 +09:00
kichikuou 6f631d073d menu_sdl: Use a light color scheme
Override microui's dark default palette with a light scheme (light gray
windows, dark text) in init_context().
2026-06-28 13:27:39 +09:00
kichikuou 49dca57fbd Call setlocale() so menu translations work
gettext only honors LANG / LC_* once setlocale() has been called. This
used to happen inside gtk_init(); now that GTK is gone, call
setlocale(LC_ALL, "") ourselves before bindtextdomain(), otherwise the
locale stays "C" and the menu is always shown in English.
2026-06-28 13:27:39 +09:00
kichikuou c8987da470 menu: Remove GTK menu backend
Linux and macOS now both build the pure-SDL + microui menu. Remove GTK3
detection, the ENABLE_GTK build branches, and the GTK menu sources.

Decouple gettext NLS from ENABLE_GTK so menu labels stay translatable on all
desktop builds, and update i18n to the new sources (POTFILES.in, .pot, ja.po).
2026-06-28 13:27:35 +09:00
kichikuou 0dfb3eb378 menu_sdl: Implement volume controller panel
Rewrite s39init.c GTK-free: keep the System39.ini / Volume.sav loading,
saving and mus_vol_set_valance() logic, and expose the channel table via
s39ini_available() / s39ini_channels() instead of driving a GtkWidget.

Add a microui volume panel to menu_sdl.c, offered as a "Volume" item in
the popup menu when the game defines volume channels.
2026-06-28 13:08:25 +09:00
kichikuou 269132fede menu_sdl: Implement the string-input dialog
The text field is hand-drawn and IME-aware: SDL_TEXTINPUT /
SDL_TEXTEDITING / BACKSPACE are handled directly (mirroring editor.c)
instead of using a microui textbox.
2026-06-28 13:07:42 +09:00
kichikuou 651fc21a19 menu_sdl: Implement the number-input dialog 2026-06-28 09:49:22 +09:00
kichikuou 03f86bc4d7 menu: Add pure SDL popup menu using microui
Vendor microui 2.02 under src/microui/ and use it to draw an in-game
popup menu as an overlay.

modal.c provides generic modal infrastructure: a loop that pumps SDL
events into microui and renders the command list via SDL_Renderer,
hooked into gfx_updateScreen(). menu_sdl.c builds the concrete popup
menu on top of it.
2026-06-28 09:49:19 +09:00
kichikuou 4ffab8e4e9 Fix compiler warning in cg.c 2026-06-27 16:18:09 +09:00
kichikuou 1593452146 menu: Signal number-input cancellation via the return value
It was inconsistent across backends. Now: true = confirmed,
false = cancelled.
2026-06-25 13:25:29 +09:00
kichikuou 50d05e5b56 font: Replace stateful font_select() with explicit parameter
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().
2026-06-24 16:11:49 +09:00
kichikuou c4026f9eb1 Version 2.18.0 v2.18.0 2026-06-23 19:18:38 +09:00
kichikuou 3318bebf6c fonts: Replace mincho font with IPA Mincho
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.
2026-06-23 17:40:22 +09:00
kichikuou d4ad329583 game_compatibility.md: Fix typo 2026-06-18 07:34:45 +09:00
kichikuou 2e828710ca gtk: Fix popup menu on Wayland
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().
2026-05-03 16:37:28 +09:00
kichikuou fad4236458 CI: Fix emscripten build failure 2026-04-12 22:43:27 +09:00
kichikuou 77d62c7c13 CI: Update GitHub Actions 2026-04-12 22:43:24 +09:00
kichikuou a726d577ef modules: Move SACT/sactcg.c to lib/ and use it from NIGHTDLL 2026-03-17 11:09:47 +09:00
kichikuou 4a5cd4a1c1 dDemo/tDemo: Fix .alk filename case sensitivity
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).
2026-03-15 11:13:08 +09:00
kichikuou 022d6af4f1 Implement dDemo HLL (Daiakuji intro demo) 2026-03-08 10:09:01 +09:00
kichikuou df816e3708 README.md: Specify supported audio formats (MP3, Ogg) 2026-01-17 07:32:26 +09:00
kichikuou 2c9079c875 Version 2.17.1 v2.17.1 2026-01-10 16:13:16 +09:00
kichikuou 54b8d6c993 android/README.md: Add Obtainium installation instructions 2026-01-10 14:57:43 +09:00