Commit Graph
1249 Commits
Author SHA1 Message Date
kichikuou 5d271deec0 ChipmunkSpriteEngine: Remove duplicated HLL_EXPORT entries 2025-05-18 11:34:08 +09:00
kichikuou 2ede7e6bb1 StoatSpriteEngine: Clear cached font_size struct in SP_SetTextSpriteType
This fixes a bug where the wrong font was used on the Rance Quest status
screen.

Commit 6c2a55c reset `font_size` on size changes, but the same is needed
for face changes.
2025-05-18 11:23:28 +09:00
kichikuou e6d069b757 SystemService.GetGameFolderPath should return SJIS string 2025-05-18 11:23:27 +09:00
kichikuou d6abcc2f92 Plumb GoatGUIEngine.AddWholeMotionVibrationSize 2025-05-18 11:23:27 +09:00
kichikuou de0646e430 Implement ChipmunkSpriteEngine.SP_{Suspend,Resume,IsSuspend}
Their exact meaning is unknown; currently it is just a read/write
boolean flag.
2025-05-18 11:23:27 +09:00
Nunuhara Cabbage c04fd2280d Merge pull request #233 from kichikuou/sprite-transform
Rance Quest: Implement ChipmunkSpriteEngine.SP_SetSpriteTransform*
2025-05-17 18:13:35 -07:00
kichikuou 71c58e85ae LIST_REMOVE regardless of whether free() is defined 2025-05-18 07:27:32 +09:00
kichikuou 61650308b7 Implement ChipmunkSpriteEngine.SP_SetSpriteTransform*
Used for the treasure chest opening effect in Rance Quest.

Implemented using draw_plugin. The render() method of draw_plugin is no
longer dedicated to custom sprites, but can be used for any sprites to
override the default sprite rendering function.
2025-05-17 14:28:45 +09:00
kichikuou bb26326929 draw_plugin: Add free() method
It is called when the plugin is unbound from a sprite, or when the
sprite to which the plugin is bound is released.

This prevents memory leaks when sprites are destroyed without the plugin
being released, and simplifies lifetime management of the DrawDungeon
plugin.
2025-05-16 09:13:10 +09:00
kichikuou f50c9f6d77 gfx: Add gfx_render_quadrilateral()
It draws a quadrilateral with arbitrary vertex and texture coordinates.

This is used to properly implement DrawGraph.DrawDeformedSpriteBilinear,
and will be used to implement ChipmunkSpriteEngine.
SP_SetSpriteTransformPos in a subsequent patch.
2025-05-16 09:13:06 +09:00
Nunuhara Cabbage ea081e0eb7 Merge pull request #231 from kichikuou/debugger-dap
debugger_dap: Source-level debugging
2025-05-12 17:50:08 -07:00
kichikuou e8ecad598a debugger_dap: Support SteppingGranularity
Debuggers that operate at the instruction level can execute instruction-
level step even when xsystem4 has loaded debug information, by adding
`granularity: "instruction"` to the step request.
2025-05-10 16:17:54 +09:00
kichikuou cb551e8f06 debugger_dap: Source-level debugging
- Add support for setBreakpoints request
- Add source locations to stackTrace response
- Source-level stepIn/stepOut/next executions

All of these only work if debug information is available. Otherwise they
work at the instruction level as before.
2025-05-10 15:31:04 +09:00
Nunuhara Cabbage 002bca4e24 Merge pull request #230 from kichikuou/a_sort
A_SORT, A_SORT_MEM: Use stable sorting
2025-05-09 22:56:33 -07:00
kichikuou 0bbd9171b5 A_SORT, A_SORT_MEM: Use stable sorting
This fixes the weird ordering of the quest list in Rance Quest.
2025-05-04 12:44:27 +09:00
Nunuhara Cabbage 7dfc9926be Merge pull request #229 from kichikuou/z-tie-break
SACTDX/Stoat/Chipmunk: render sprites in correct order for same Z
2025-05-03 13:04:09 -07:00
kichikuou 1dd10ecc45 SACTDX/Stoat/Chipmunk: render sprites in correct order for same Z
In SACT2, if two sprites have the same Z value, they are rendered in
increasing order of their sprite numbers. This behavior is documented in
the SDK manual.

However, in later versions of the sprite engine (SACTDX,
StoatSpriteEngine, ChipmunkSpriteEngine), sprites are drawn in the order
they were created.

This fixes an issue in Rance Quest Magnum which relies on this behavior.
2025-05-03 11:13:03 +09:00
Nunuhara Cabbage ba11900350 Merge pull request #228 from kichikuou/assets
Use case-insensitive match for asset file names
2025-04-29 17:33:53 -07:00
kichikuou 508839ed4c Use case-insensitive match for asset file names
This fixes #227.

Rance 1 Digest Edition includes `Rance1.ain` and `RANCE1BA.ald`.
2025-04-28 16:47:47 +09:00
Nunuhara Cabbage 55f826db36 Merge pull request #225 from kichikuou/trial
SystemService: Add two functions
2025-04-13 07:11:09 -07:00
kichikuou 882354c692 SystemService: Add two functions
Used in the trial versions of Rance 01 and Dorapeko.
2025-04-12 13:25:13 +09:00
Nunuhara Cabbage 071d7d2137 Merge pull request #224 from kichikuou/cmake
cmake: Use find_package() for zlib, SDL and freetype
2025-04-08 19:16:01 -07:00
kichikuou eddac54fa0 cmake: Use find_package() for zlib, SDL and freetype
It is the user's responsibility to ensure that these are found.
2025-04-07 13:20:42 +09:00
Nunuhara Cabbage 2e1059cbac Merge pull request #222 from kichikuou/daiteikoku
Daiteikoku support
2025-04-01 18:12:57 -07:00
kichikuou f9177b89b1 game_compatibility.md: Mark Daiteikoku as supported 2025-04-01 14:18:44 +09:00
kichikuou 7bae2cdf8a DrawGraph.CopyRotZoom2Bilinear should copy src alpha 2025-04-01 11:53:25 +09:00
kichikuou 769bdca725 Implement DrawGraph.CopyReverseLRWithAMap
Used in Daiteikoku.
2025-04-01 11:47:21 +09:00
kichikuou 6517303e2a Implement FileOperation.{ExistFile,GetFileSize}
This unblocks the "User Admiral" feature of Daiteikoku.
2025-04-01 10:41:56 +09:00
Nunuhara Cabbage 0e388c74c0 Merge pull request #221 from kichikuou/effect60
Implement effect number 60
2025-03-22 23:46:02 -07:00
kichikuou 7ff5ec89e7 Implement effect number 60
Used in Rance Quest.
2025-03-23 08:22:16 +09:00
Nunuhara Cabbage 33403cbd3d Merge pull request #220 from kichikuou/circular-log-buffer
AnteaterADVEngine: Limit log size to 1000 pages
2025-03-17 20:43:50 -07:00
kichikuou 40fe2068e7 AnteaterADVEngine: Limit log size to 1000 pages
If the log exceeds 1000 pages, the oldest pages are discarded. This
behavior is in line with AnteaterADVEngine.dll of Daiteikoku.

This prevents the log buffer from growing indefinitely, slowing down
saves and loads.
2025-03-17 21:06:10 +09:00
Nunuhara Cabbage 40914a7cef Merge pull request #219 from kichikuou/hoken
StoatSpriteEngine: multisprite_update() should not use sprite_set_show()
2025-03-15 07:18:04 -07:00
kichikuou 0946900e02 game_compatibility: Mark "Boku Dake no Hokenshitsu" as supported 2025-03-15 08:19:48 +09:00
kichikuou 56d9b607b2 StoatSpriteEngine: multisprite_update() should not use sprite_set_show()
sprite_set_show() is also used by MultiSprite_SetAllShowMessageFrame,
causing interference.

Now multisprite_update() clears the sprite's texture when there's no CG,
rather than hiding it.

Fixes #218.
2025-03-15 08:15:02 +09:00
Nunuhara Cabbage 155c801804 Update libsys4 2025-03-09 17:31:16 -07:00
Nunuhara Cabbage 4942e41fb8 Merge pull request #217 from kichikuou/drawgraph
Daiteikoku: Implement DrawGraph.DrawDeformedSpriteBilinear
2025-03-03 07:53:39 -08:00
kichikuou ac8a37f67b Daiteikoku: Implement DrawGraph.DrawDeformedSpriteBilinear
This function draws a quad with arbitrary vertex and texture
coordinates, but since it is actually only used to copy a rectangular
area, this can be implemented using gfx_copy_stretch().

This also adds HLL_TODO_EXPORTs for the DrawGraph functions defined but
unused in Daiteikoku.
2025-02-26 13:28:10 +09:00
Nunuhara Cabbage 331563a165 Merge pull request #216 from kichikuou/daiteikoku-text
Fix text rendering issues in Daiteikoku
2025-02-24 15:43:46 -08:00
Nunuhara Cabbage c30510e688 Merge pull request #215 from kichikuou/vsync
SystemService: Persist "wait vsync" setting to disk
2025-02-24 15:43:23 -08:00
kichikuou 81c0c494b0 parts: Draw per-character glyphs directly to the screen
Before this, character glyphs were copied to an intermediate texture
(text->common.texture) using gfx_copy_with_alpha_map(). In Daiteikoku,
some text sprites have a character spacing of -4, causing the copy to
cut off the right edge of the previously drawn character.

This fixes the problem by having parts_render_text() blend per-glyph
textures directly onto the target without using an intermediate texture.
2025-02-24 10:07:48 +09:00
kichikuou e9bec3c2fe Use text_style_width() to calculate CharSprite width
So that edge width is taken into account.
2025-02-24 10:07:47 +09:00
kichikuou 298e9bddf5 Fix text rendering issue on the save screen of Daiteikoku
This fixes the same bug that commit c4e17c6 fixed, for sprites created
by ChipmunkSpriteEngine.SP_SetTextSprite. This uses text_style_width()
instead of gfx_size_char() so that edge width is taken into account.
2025-02-24 10:07:47 +09:00
kichikuou bf3c4feb9d SystemService: Persist "wait vsync" setting to disk
This setting has a significant impact on system load, so users may want
xsystem4 to remember their preference.

This implementation uses a JSON format, while the AliceSoft's
implementation saves it to a binary file (WindowSetting.sav).

This only records the wait_vsync setting, since the other fields in
window_settings are currently no-op.
2025-02-23 11:02:27 +09:00
Nunuhara Cabbage 6a36fc8f53 Merge pull request #214 from kichikuou/DrawEffect
Implement DrawEffect HLL
2024-12-29 20:36:06 -08:00
Nunuhara Cabbage 45876a9921 Merge pull request #213 from kichikuou/rsm
Use RSM save format by default
2024-12-29 20:35:30 -08:00
kichikuou 2461c1e52d Implement DrawEffect HLL
Used in Ultra Mahou Shoujo Manana vol.5.

Although the HLL interface allows partial screen effects, it is actually
used only for full screen effects.
2024-12-29 14:06:42 +09:00
kichikuou 41c7830558 Use RSM save format by default
Before this, the resume save format defaulted to JSON, which could not
be loaded by System40.exe and save/load was sometimes too slow even on
desktop environments.

In xsystem4-android the RSM format has been the default for 9 months and
no problems have been reported. Let's make this the default on all
platforms.
2024-12-28 18:23:14 +09:00
Nunuhara Cabbage 009bafae40 Merge pull request #212 from kichikuou/debugger_dap
debugger_dap: minor fixes
2024-11-18 20:47:42 -08:00
Nunuhara Cabbage e891e74bcf Merge pull request #211 from kichikuou/android-fix
Android: Update SDL2 to 2.30.9
2024-11-18 20:47:19 -08:00