Commit Graph
998 Commits
Author SHA1 Message Date
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
kichikuou de2db1af93 Implement DrawMovie, DrawMovie2 and PlayMovie HLLs
These HLLs play .mpg movie files (later games use .alm file extension,
but the format is the same, i.e. MPEG-PS) that contain MPEG1 video and
MP2 audio streams.

pl_mpeg.h is the PL_MPEG library (https://github.com/phoboslab/pl_mpeg)
imported from commit 5aeef4d07593be1960a0e4c7fe204809cfae30bd.

This adds a few mixer functions (mixer_stream_*) for playing custom
audio streams under the master mixer.
2023-01-06 12:12:07 +09:00
Nunuhara Cabbage b6f9999a56 Merge pull request #96 from kichikuou/repl-on-mbutton
Enter debugger REPL on middle-button click
alpha-3.1
2023-01-02 16:42:16 -08:00
Nunuhara Cabbage 20b60467f2 Merge pull request #95 from kichikuou/windows-fix
Windows: Fix read_save_file
2023-01-02 16:39:34 -08:00
kichikuou 64a92a2ffa Enter debugger REPL on middle-button click
This is effective only if --debug command line flag is specified.
2023-01-02 21:10:58 +09:00
kichikuou 620fecb244 Windows: Fix read_save_file
This fixes an issue where saved files could not be read on Windows.

On Windows if a file is opened in text mode, ftell() at EOF returns
the file size in bytes, but fread() tries to read the specified number
of characters (after removing carriage returns), resulting in an EOF
error.

To avoid this problem, open save files in binary mode.
2023-01-02 21:00:11 +09:00
Nunuhara Cabbage ca982221f7 Add Windows installation instructions to README
Can now be installed into game directory as sub-directory.
alpha-3
2023-01-01 20:16:33 -08:00
Nunuhara Cabbage 75d8a8b69d Improve usage error reporting
Print usage information when there is an error in the command line
arguments. Also, wait for keypress before exiting on Windows so that the
user can read the error message.
2023-01-01 19:28:59 -08:00
Nunuhara Cabbage 5a5954811f Update libsys4 2023-01-01 13:21:00 -08:00
Nunuhara Cabbage d5b1b155e9 Merge pull request #94 from kichikuou/gles-default
Use OpenGL ES by default
2023-01-01 12:54:51 -08:00
Nunuhara Cabbage 3796521285 Merge pull request #93 from kichikuou/gles
Fix shader compilation errors in OpenGL ES
2023-01-01 12:52:00 -08:00
kichikuou ec5a2c054c Use OpenGL ES by default
This replaces `use_gles` boolean build option with `opengles` feature
option. If OpenGL ES3 is available, it is preferred over desktop OpenGL.
This can be overridden by `-Dopengles=disabled` meson flag.
2023-01-01 13:25:45 +09:00
kichikuou 82407a1d59 Fix shader compilation errors in OpenGL ES 2023-01-01 11:50:03 +09:00
Nunuhara Cabbage e21f06331e Merge pull request #92 from kichikuou/reign
Improve ReignEngine, update game compatibility table
2022-12-28 17:37:45 -08:00
kichikuou d3902470c2 Update game compatibility table
Toushin Toshi 3 is now supported.
2022-12-28 13:51:49 +09:00
kichikuou 68eff9a122 ReignEngine: Fix out-of-bounds access in calc_motion_frame
Happens when frame range in MonsterInfo.txt is wrong.
2022-12-28 13:18:41 +09:00
kichikuou 1edf95bcde ReignEngine: Fix height detection
This fixes an issue where height detection fails due to gaps in
suspension bridge planks.

If the depth map has no value for the given point, return the average
of 4 neighbors.
2022-12-28 13:18:41 +09:00
kichikuou 6e63b4a5e9 ReignEngine: Do not draw particle effect if current_frame == end_frame 2022-12-28 13:18:41 +09:00
kichikuou 9465ee1c63 ReignEngine: Cache parsed motions
Motions are cached in `struct model`.
2022-12-28 13:18:41 +09:00