Commit Graph
1409 Commits
Author SHA1 Message Date
kichikuou 5f13b3e9d0 Fix crash on Windows introduced in commit ed2239f
Memory allocated with xcalloc_aligned (which uses _aligned_malloc on
Windows) must be freed with _aligned_free. Using standard free() caused
heap corruption and crashes.
2026-02-06 16:29:14 +09:00
Nunuhara Cabbage 15cfc5463b Merge pull request #296 from kichikuou/alignment-fix
Use xcalloc_aligned for allocating structures containing mat4
2026-01-12 17:08:34 -08:00
kichikuou ed2239fb1b Use xcalloc_aligned for allocating structures containing mat4
This fixes #294.

cglm's mat4 requires 32-byte alignment when __AVX__ is defined.
2026-01-13 08:17:31 +09:00
kichikuou 5980e49a96 Update libsys4
There is no need to call initialize_instructions() in system4.c, because
ain_open() initializes the instruction set internally when it reads the
VERS tag.
2026-01-13 08:11:33 +09:00
Nunuhara Cabbage a6871623f2 flatpak: include metadata file 2025-11-15 15:14:15 -08:00
Nunuhara Cabbage 477bbdb949 ci: cache FFmpeg build 2025-11-15 14:03:13 -08:00
Nunuhara Cabbage 0baa493f79 flatpak: enable --device=input permission
For gamepad access.
2025-11-15 13:02:40 -08:00
Nunuhara Cabbage 2c51bec001 Merge pull request #293 from brombrom-hani/fullscreen-toggle
SystemService: fullscreen control
2025-11-15 12:59:13 -08:00
BromBrom d6b5bde80c SystemService: fullscreen control 2025-11-15 13:42:20 +01:00
Nunuhara Cabbage 2510fa6b9b ci: add nightly build 2025-11-14 16:50:45 -08:00
Nunuhara Cabbage 8fecf72281 Merge pull request #292 from kichikuou/flash-fix
parts: Fix ERROR() in flash.c
2025-10-31 22:03:19 -07:00
kichikuou 93ce40bcdd parts: Fix ERROR() in flash.c
This fixes a crash when processing DefineSprite tags that contain no
PlaceObject2 tags, as seen in Rance Quest's `Battle/斧攻撃・雷.aff`.
These sprites are now registered in parts_flash->sprites with a NULL
object, and are safely skipped by the renderer.
2025-10-30 09:48:22 +09:00
Nunuhara Cabbage 4f2d367b19 Fix bug _ald_get
See description of bug at nunuhara/libsys4@4da6bf6

This fixes an issue in Rance VI when compiled at high optimization
levels.
2025-10-21 20:50:26 -07:00
Nunuhara Cabbage 74bdbd4f37 Add windows build workflow 2025-10-21 18:58:39 -07:00
Nunuhara Cabbage 2c8fc425db Add linux CI workflow 2025-10-21 17:53:39 -07:00
Nunuhara Cabbage f59158648f Check in test .ain file 2025-10-21 17:42:52 -07:00
Nunuhara Cabbage 484b643f02 Merge pull request #291 from kichikuou/android-manual
Add Android support for SystemService.OpenPlayingManual
2025-10-18 06:48:18 -07:00
kichikuou d1fdab4cde Add Android support for SystemService.OpenPlayingManual
The heavy lifting will be done on the Java side. Here we just send a
message.
2025-10-18 13:43:10 +09:00
Nunuhara Cabbage 43c6a2804c Merge pull request #290 from kichikuou/dap-race
debugger_dap: Defer starting execution until configuration is done
2025-10-10 21:49:35 -07:00
kichikuou 180c81e5f5 debugger_dap: Defer starting execution until configuration is done
The debugger previously started execution upon receiving a 'launch'
request. This created a race condition where execution could begin
before breakpoints were set by the client.

This change ensures the debugger waits for both 'launch' and
'configurationDone' requests before starting the debugee. This allows
the client to set breakpoints before execution begins.
2025-10-11 11:20:35 +09:00
Nunuhara Cabbage e29739f0be Merge pull request #289 from kichikuou/dap-output
debugger_dap: Fix garbled characters in output events on Windows
2025-10-10 18:42:38 -07:00
kichikuou 1e682bad09 debugger_dap: Fix garbled characters in output events on Windows 2025-10-11 09:49:16 +09:00
Nunuhara Cabbage 0a4981533b Merge pull request #288 from kichikuou/build-fix
Fix build error when debugger is disabled
2025-10-05 07:48:16 -07:00
kichikuou 998ab23dab Fix build error when debugger is disabled
This fixes "call to undeclared function 'screenshot_save'" error when
xsystem4.h is not included by debugger.h.
2025-10-05 18:54:14 +09:00
Nunuhara Cabbage dc8342cbab Merge pull request #287 from kichikuou/android-fullscreen
Android: Do not use SDL_WINDOW_FULLSCREEN
2025-10-04 22:30:48 -07:00
kichikuou 8d9eb931f6 Redraw screen on SDL_APP_DIDENTERFOREGROUND
Without this, the screen remains blank after resuming the app on
Android.
2025-10-04 16:06:36 +09:00
kichikuou 1621378ba1 Android: Create window with SDL_WINDOW_RESIZABLE
This reverts commit b7ab1ed476
("Android: Enforce landscape fullscreen mode").

To work around https://github.com/libsdl-org/SDL/issues/8995 where the
system bar does not disappear after resuming the app, create the window
in non-fullscreen mode. Also, since SDL hints can be configured in
AndroidManifest.xml, there is no need to set SDL_HINT_ORIENTATIONS here.
2025-10-04 15:35:30 +09:00
Nunuhara Cabbage d3cb6b4001 Fix segfault in dd1_save_walk_data
Fix null pointer dereference when input array is not allocated and walk
data isn't found.
1.0.0
2025-09-28 18:52:05 -07:00
Nunuhara Cabbage 2198bf5970 Implement support for screenshots on Windows 2025-09-28 15:28:33 -07:00
Nunuhara Cabbage 0a152f0e34 Fix MonsterInfo parsing bug on Windows
For reasons which I can't explain, the string "タイプ = ループ" doesn't
work correctly as a format for sscanf on mingw.

Instead, we match the exact string including whitespace.
2025-09-28 14:30:17 -07:00
Nunuhara Cabbage 2a3b636bb0 Fix windows build instructions
make, nasm and diffutils are FFmpeg build dependencies.
2025-09-28 11:52:02 -07:00
Nunuhara Cabbage 1506d085db Merge pull request #284 from kichikuou/debugger
debugger: Display values of reference variables
2025-09-28 08:06:39 -07:00
kichikuou 729957b842 debugger: Display values of reference variables
Previously, the debugger displayed `ref int` variables like this:

    ref_int: <unsupported-data-type>
    <void>: <unsupported-data-type>

This commit introduces `dbg_variable_to_string()` to dereference these
variables and display their underlying value. Both the command-line and
DAP debugger interfaces have been updated to use this new functionality.
2025-09-28 11:11:24 +09:00
Nunuhara Cabbage 6f661fb370 Add Alt+S keybinding to save screenshot
Not implemented on android or windows (yet). Zenity must be installed
for file picker dialog.
2025-09-27 11:18:55 -07:00
Nunuhara Cabbage 57a73cd924 Add F11 keybinding to toggle fullscreen 2025-09-26 17:50:21 -07:00
Nunuhara Cabbage 6424efa6ab Merge pull request #283 from kichikuou/pascha2
Various fixes for Pastel Chime Continue
2025-09-26 17:44:22 -07:00
kichikuou dc4a6f1dfa game_compatibility.md: Mark Pascha C++ as supported 2025-09-27 09:02:51 +09:00
kichikuou b53c511b4a game_compatibility.md: Mark Pastel Chime Continue as supported 2025-09-26 10:24:15 +09:00
kichikuou 0c75f21985 Add stubs for some music related SACT2 functions
This makes Pastel Chime Continue's music mode work, except for the
spectrum analyzer.
2025-09-26 10:24:15 +09:00
kichikuou b4c3818d6b Validate dungeon coordinates in some HLL functions
During dungeon initialization, these functions may be called with
uninitialized variables that hold the coordinates from the previous
dungeon exploration.
2025-09-26 10:24:15 +09:00
kichikuou fe61704b90 PastelChime2.DungeonDataLoad: Remove hardcoded dungeon dimensions
Replaced the hardcoded 40x3x40 dungeon size with dimensions read
dynamically from the `m_dsd` data structure. This allows for loading
dungeons of various sizes.
2025-09-26 10:24:15 +09:00
kichikuou 199c91dd6c DrawField: Do not set lock status on non-existent doors
This change adds a check to ensure that a door is present before
attempting to set its lock status.

This is necessary because the trap that locks doors has a bug and
attempts to lock doors in the wrong direction.
2025-09-26 10:22:58 +09:00
kichikuou 828971ce19 PastelChime2: Do no prune corridor cells with doors
PastelChime2.DLL does not have this logic, but without it it may
generate maps that are impossible to complete.
2025-09-23 14:56:17 +09:00
kichikuou e1b1208438 PastelChime2.DungeonDataLoad: Initialize map after loading 2025-09-23 14:56:17 +09:00
kichikuou b42e59c494 PastelChime2: Do not place dark floor tile directly above exit 2025-09-23 14:56:17 +09:00
Nunuhara Cabbage 0d689ac1c2 Merge pull request #282 from kichikuou/HTTPDownloader
Add stubs for HTTPDownloader
2025-09-22 18:36:12 -07:00
kichikuou aba2a53afe Add stubs for HTTPDownloader
This fixes https://github.com/kichikuou/xsystem4-android/issues/22.

Once the user grants network access permission, Rance Quest will call
HTTPDownloader.Post upon startup, making it impossible to start the
game without this change.
2025-09-23 07:25:18 +09:00
Nunuhara Cabbage 30d599f161 Merge pull request #280 from kichikuou/fix-277
Fix leak of dungeon_renderer
2025-09-21 10:34:45 -07:00
Nunuhara Cabbage 7817592728 Merge pull request #279 from kichikuou/fix-278
Fix flag index calculation in PastelChime2_Field_UpdateDoors
2025-09-21 10:34:00 -07:00
kichikuou 85244a304a Fix leak of dungeon_renderer
This fixes #277.

Now dungeon_load_dungeon() and dungeon_load_texture() can be called
multiple times without causing memory leaks.

This change also simplifies the loading process by removing
dungeon_finalize_loading() helper function, as the map only depends on
ctx->dgn, while the renderer only depends on ctx->dtx.
2025-09-21 11:02:18 +09:00