Commit Graph
1432 Commits
Author SHA1 Message Date
kichikuou a5d488564a Implement PartsEngine.SetPartsAlphaClipperPartsNumber
This allows a specified part to be used as an alpha map (clipper) during
rendering. A dedicated vertex shader (parts.v.glsl) is introduced to
calculate clipping coordinates using an inverse transformation matrix.

Refactored parts_render_text() to use parts_render_texture() so that
alpha clipping is applied to text. This also enables color modifications
for text, while rotation and scaling remain unsupported, matching the
original PartsEngine behavior.

Incremented the parts save version since alpha_clipper_parts_no is now
persisted.
2026-03-01 07:47:40 +09:00
kichikuou 205e0a3ed0 Implement PartsEngine.ExistsFlashFile
Used in Pastel Chime 3.
2026-03-01 07:31:50 +09:00
kichikuou b758a04760 PartsEngine.SetPartsCG: Accept <save> path
This fixes an issue where thumbnails do not display on the save screen
in Pastel Chime 3.

If `cg_name` starting with "<save>" is passed, the function loads the CG
from the save directory.

Note that unlike GoatGUIEngine.SetPartsCG() in Rance Quest, `cg_name`
does not include "SaveData\\".
2026-03-01 07:31:50 +09:00
kichikuou 9c962e3467 Implement PartsEngine.AddGrayFilterToPartsConstructionProcess
It applies a grayscale filter to a specified area of the parts.
2026-03-01 07:31:36 +09:00
Nunuhara Cabbage 02129edc10 Merge pull request #304 from kichikuou/pascha3-hll
Implement HLLs for Pastel Chime 3
2026-02-28 08:17:58 -08:00
kichikuou 5ac79311b9 Implement P3SquareSprite HLL
This library is used to visualize unit movement area in the isometric
map.
2026-02-24 08:38:45 +09:00
kichikuou 75cfc9f18d Implement P3MapSprite HLL
This library is for rendering the isometric map grid in Pastel Chime 3.
It manages a background texture and an isometric grid texture. The grid
is generated from a sprite tile and an array representing tile
visibility. It provides functions to create, delete, and copy/blend
these textures onto destination sprites.
2026-02-24 08:38:45 +09:00
kichikuou eaa7f3d8d0 Implement MADLoader HLL
This HLL provides functionality for loading, managing, and rendering
animations stored in the MAD file format. A MAD file consists of a
header followed by a series of QNT image frames.
2026-02-24 08:38:45 +09:00
Nunuhara Cabbage 0d7ef9b577 Merge pull request #303 from brombrom-hani/system-service-rance-9
SystemService: Function in rance 9
2026-02-23 06:16:22 -08:00
Nunuhara Cabbage 4a7fc4d12a Merge pull request #302 from kichikuou/group-save
Treat invalid global group name as empty group
2026-02-23 06:16:06 -08:00
BromBrom-Hani e662955a1d SystemService: Function in rance 9 2026-02-21 18:37:34 +01:00
kichikuou a3c23387f4 Treat invalid global group name as empty group
Pastel Chime 3 executes system.GroupSave() with a group name of
"共有データ", but that group name does not exist in the OBJG section of
AIN.

Pascha3.exe does not treat such system.GroupSave() calls as failures,
instead behaving as if saving an empty variable group.
2026-02-21 11:02:39 +09:00
Nunuhara Cabbage f23125cb77 Merge pull request #301 from kichikuou/sort-strarray
Fix use-after-free in custom string array sort
2026-02-16 20:35:02 -08:00
kichikuou 30ac11e74b Fix use-after-free in custom string array sort
Custom comparison functions for string arrays receive their arguments by
value. Create a copy of the strings before pushing them to the stack to
prevent them from being prematurely freed after the function call.
2026-02-16 08:49:33 +09:00
Nunuhara Cabbage f40132497c Merge pull request #300 from kichikuou/pascha3
Initial HLL work for Pastel Chime 3
2026-02-14 17:47:16 -08:00
kichikuou 7540712de1 Add stub for PartsEngine.SetPartsAlphaClipperPartsNumber
For Pastel Chime 3.
2026-02-15 09:35:24 +09:00
kichikuou 6a75bc5a6b flash: reset playback state in PE_BackPartsFlashBeginFrame
This fixes a bug in Pastel Chime 3 where message progression would hang
because the Flash animation failed to resume playback after being reset.
2026-02-15 09:12:03 +09:00
kichikuou a1a809faef VSFile: Support relative paths from the game directory
Relative paths are used in Pastel Chime 3.
2026-02-14 12:41:04 +09:00
kichikuou 3929de81f1 Add stubs for AFAFactory hll 2026-02-14 12:41:01 +09:00
kichikuou 65ccb29423 Add ValueEncryption HLL
This appears to be an anti-cheat mechanism. To make save files
compatible, it should do the same calculation as the original,
but for now we just return the values as they are.
2026-02-14 12:36:58 +09:00
Nunuhara Cabbage 9f3af7b256 Merge pull request #299 from kichikuou/fnl
fnl: Fix glyph width handling
2026-02-07 08:23:45 -08:00
Nunuhara Cabbage 249bc06f53 Merge pull request #298 from kichikuou/xfree_aligned
Fix crash on Windows introduced in commit ed2239f
2026-02-07 08:22:18 -08:00
kichikuou 621eb49be8 fnl: Fix glyph width handling
This fixes the row stride calcuration for the second font of Pastel
Chime 3.
2026-02-06 16:47:15 +09:00
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