Commit Graph
916 Commits
Author SHA1 Message Date
Nunuhara Cabbage cc199dcf4e Add notes directory 2023-04-05 19:28:30 -07:00
Nunuhara Cabbage baae8f5237 Document Windows FFmpeg build, etc.
Statically link FFmpeg on Windows. This requires building a slimmed-down
version of FFmpeg from source. The build process is documented in the
README.

Also add ffmpeg dependency to the nix flake.
alpha-4.1
2023-04-02 19:34:45 -07:00
Nunuhara Cabbage 8437a87b54 Merge pull request #111 from kichikuou/ffmpeg
Add FFmpeg movie backend
2023-04-02 12:31:29 -07:00
kichikuou b11a173b67 Add FFmpeg movie backend
This allows playback of videos in encodings other than MPEG-1, e.g. VC-1
used in the English version of Rance VI.

The FFmpeg dependency is optional. If it's not available, the PL_MPEG
backend will be used.
2023-04-01 13:59:55 +09:00
Nunuhara Cabbage 0e18f69cbf build: require meson >= 0.59 and cglm >= 0.8.3
get_option('<option>').allowed() requires meson >= 0.59.

glm_quat_nlerp requres cglm >= 0.8.3.
2023-03-28 22:41:49 -07:00
Nunuhara Cabbage c3f9d93917 Link statically on Windows
Try to link statically as much as possible on Windows, to reduce the
number of DLLs that have to be shipped with Windows builds.

Also document the build process on Windows.
alpha-4
2023-03-29 03:09:20 -07:00
Nunuhara Cabbage ac411754a0 Merge pull request #109 from kichikuou/sact
Change the second parameter of `sact_SP_SetShow` from bool to int
2023-03-27 06:26:08 -07:00
kichikuou 45ebaa2c7f Set debug printing function for sprites initialized with CGs 2023-03-27 20:13:27 +09:00
kichikuou a923b0ce23 Change the second parameter of sact_SP_SetShow from bool to int
In SACT2 it's declared as int, so any integer can be passed. A Sengoku
Rance mod actually passes 2, but some compilers generate code that
interprets it as false.
2023-03-27 20:13:27 +09:00
Nunuhara Cabbage 1be2cffd22 Merge pull request #108 from kichikuou/msgskip
Use System4-compatible MsgSkip file format
2023-03-25 23:20:02 -07:00
kichikuou 50af8bd3ff Use System4-compatible MsgSkip file format 2023-03-24 20:05:17 +09:00
Nunuhara Cabbage 32ef29ee20 Merge pull request #107 from kichikuou/savefile
Use global/group save file format compatible with System4
2023-03-20 22:24:59 -07:00
kichikuou 8620be452e Ignore non-existent structure fields when loading from gsave
This matches System4's behavior.
2023-03-19 22:18:28 +09:00
kichikuou cc79f9caee Use global/group save file format compatible with System4
After this, xsystem4 uses the global/group save format used by the
original System4, instead of the JSON format. Existing JSON save files
can still be loaded.

This makes save files interoperable between System4 and xsystem4 in some
games, including Sengoku Rance and Toushin Toshi III.
2023-03-19 11:42:20 +09:00
Nunuhara Cabbage 6a2eae7274 Merge pull request #106 from kichikuou/sact
sact_SP_TextDraw: Early return if sprite size is zero
2023-03-18 16:47:02 -07:00
kichikuou 66002f7ceb sact_SP_TextDraw: Early return if sprite size is zero
Otherwise it ERROR()s in gfx_set_framebuffer() due to an incomplete
framebuffer.

This happens when trying to display text without specifying a message
window in SACT2. AliceSoft's implementation ignores this.
2023-03-17 22:11:41 +09:00
Nunuhara Cabbage d1b18f39dd Add flake.nix 2023-03-09 19:37:42 -08:00
Nunuhara Cabbage dbd1e54c46 Merge branch 'master' of github.com:nunuhara/xsystem4 2023-03-07 18:21:21 -08:00
Nunuhara Cabbage 3c0ee51714 Merge pull request #105 from kichikuou/drawdungeon
Add stub for DrawDungeon14.SetRasterScroll
2023-03-06 17:00:06 -08:00
kichikuou d4f7ab06cf Add stub for DrawDungeon14.SetRasterScroll
This function is used for the underwater effect in GALZOO. It should be
implemented as a post-processing effect, but in the meantime let's stub
it out to avoid runtime error.
2023-03-06 20:03:03 +09:00
Nunuhara Cabbage 66d8def3f8 Merge pull request #104 from kichikuou/sleep
Add vm_sleep()
2023-02-28 16:29:05 -08:00
Nunuhara Cabbage 8f29146c28 Merge pull request #103 from kichikuou/win
Use UTF8-aware dirname/basename functions
2023-02-28 16:28:08 -08:00
kichikuou e53dc6ad0e Add vm_sleep()
The nanosleep() function in mingw-w64 often sleeps for more than the
specified time. This causes a problem in Rance 6 combat scene, where
the damage popup is noticeably slow.

This adds vm_sleep() that calls SDL_Delay() which uses high-resolution
timer on Windows.
2023-02-25 21:57:34 +09:00
kichikuou 90a96eb8bb Use UTF8-aware dirname/basename functions
Command line paths containing non-ASCII characters now work on Windows.
2023-02-25 21:05:53 +09:00
Nunuhara Cabbage 3ff2c33d3c Fix crash due to gap in mixer list
Fix a crash that occurs during startup of Oyako Rankan due to a gap in
the "VolumeValancer" list in AliceStart.ini
2023-02-12 19:49:28 -08:00
Nunuhara Cabbage 2237bb814c Implement various HLL functions for Rance Quest
Most of the functionality of gfx_render_texture (draw method, blend
rate) is moved into sprite_render, since this was the only place using
it.
The draw method and blend rate are now stored in sact_sprite objects
instead of textures.
sact_sprite now has two renderers: the old SACT2 renderer (with blend
rate as the only shader parameter) and the new ChipmunkSpriteEngine
renderer, which supports multiply/add colors and the "surface area"
feature from PartsEngine.

Rance Quest now runs up to the first Flash-related function call
(Flash?!?!).
2023-02-12 15:59:36 -08:00
Nunuhara Cabbage 6b62e1db23 Fix CG loading functions for Rance Quest
Rance Quest uses strings for CG names, but the strings contain numbers
which should be converted to integers for lookup.
2023-02-11 16:36:05 -08:00
Nunuhara Cabbage 267bb8c99a Update libsys4 alpha-3.3 2023-02-07 21:01:42 -08:00
Nunuhara Cabbage d2ff9833de Merge pull request #101 from kichikuou/fopen
Fix file name encoding issues in movie.c and Toushin3Loader.c
2023-01-16 11:11:53 -08:00
kichikuou 91e4478a29 Fix file name encoding issues in movie.c and Toushin3Loader.c 2023-01-16 21:54:55 +09:00
Nunuhara Cabbage 842d712a31 Fix bug in S_MOD
The 3rd argument to the instruction indicates the type of the second
argument. If there are multiple specifiers in the format string, the
first specifier matching the given type is substituted (NOT the first
specifier encountered when processing the format string).
2023-01-10 18:47:03 -08:00
Nunuhara Cabbage 2dbc322db8 Fix text layout bug in SengokuRanceFont
Fix text layout bug when message setting isn't "No Wait".
2023-01-09 17:26:22 -08:00
Nunuhara Cabbage d913ee38a3 Merge pull request #100 from kichikuou/effect
Allow frames to drop in sact_Effect()
2023-01-09 17:14:54 -08:00
kichikuou 5649236c7c Allow frames to drop in sact_Effect()
Some effects (e.g. EFFECT_BLUR_CROSSFADE) are slow on low-end Android
devices. This adds frame rate control so that they won't take too long.
2023-01-09 14:50:45 +09:00
Nunuhara Cabbage a55893bf2f debugger: improve print command
Now handles arbitrarily complex member/subscript expressions, with
pretty-printing and a configurable recursion depth.
alpha-3.2
2023-01-08 17:13:33 -08:00
Nunuhara Cabbage d8f936f1df Implement SystemService.GetGameFolderPath 2023-01-08 11:34:06 -08:00
Nunuhara Cabbage d2539b978e GoatGUIEngine.GetPartsCGName 2023-01-08 11:32:02 -08:00
Nunuhara Cabbage 92bbcb4866 Fix bug in afa_load_archive 2023-01-08 11:30:52 -08:00
Nunuhara Cabbage 96df171157 debugger: clean up help command list
Make the command list printed by the 'help' command easier to read.
2023-01-07 15:28:31 -08:00
Nunuhara Cabbage 9fd0415ec6 debugger: add finish command
Add finish (fin) command which resumes execution until returning from
the current function.
2023-01-07 13:44:08 -08:00
Nunuhara Cabbage 31930c5e97 Use gamedir_path in system.ExistsFile
Fixes an issue where the Sengoku Rance opening movie wouldn't play
if the game was started outside the game directory.
2023-01-07 13:09:49 -08:00
Nunuhara Cabbage def987ad5f debugger: print stack and disassembly side-by-side
This makes the screen position of the disassembly more stable when
stepping through code.
2023-01-07 12:58:09 -08:00
Nunuhara Cabbage a4bb1a815a debugger: show hll function names in disassembly 2023-01-07 10:45:10 -08:00
Nunuhara Cabbage 71f3450037 Only define windows_error_handler on Windows 2023-01-07 10:35:48 -08:00
Nunuhara Cabbage f7c9d9326d debugger: add single-stepping commands
Add 'step' (s) and 'next' (n) commands for single-stepping bytecode.
'step' is the 'step into' type which descends into function calls,
wheras 'next' is the 'step over' type which continues until the next
instruction within the current function.
2023-01-07 09:54:15 -08:00
Nunuhara Cabbage 8b4df9b9a4 Merge pull request #99 from kichikuou/movie
Add error checking for movie format
2023-01-07 08:29:18 -08:00
kichikuou d4d292434c Add error checking for movie format
AliceSoft only uses MPEG-PS, but PlayMovie.dll is included in System4
SDK and can play any format supported by DirectShow. This fixes crash in
movie_load() when given file is not a MPEG-PS.
2023-01-07 18:26:09 +09:00
Nunuhara Cabbage f598a7276b Merge pull request #98 from kichikuou/movie
Implement DrawMovie, DrawMovie2 and PlayMovie HLLs
2023-01-06 18:02:02 -08:00
kichikuou 2f75253080 Add DrawMovie2.{SetInnerVolume,UpdateVolume}
For Rance 02.
2023-01-06 15:21:53 +09:00
kichikuou b0477deca1 Handle events in system.Peek()
Otherwise Sengoku Rance becomes unresponsive during movie playback.
2023-01-06 12:12:10 +09:00