Commit Graph
318 Commits
Author SHA1 Message Date
kichikuou b08b9f80f2 Add some helper functions to GameId 2024-12-24 12:22:10 +09:00
kichikuou bb1573ec6d NACT: Factor out load/save functions 2024-12-24 12:19:13 +09:00
kichikuou 57fad54420 NACT: Make some command functions non-virtual 2024-12-24 12:19:10 +09:00
kichikuou 78da768d92 Version 1.2.1 2024-12-21 16:26:45 +09:00
kichikuou a7d4e32273 Set RND after save / load
`L [1-26]` should set RND to 0 after load, and `Q [1-26]` should set RND
to 1 after save. This behavior is used by the following games:

ayumi_fd, prog_fd, funnybee_cd, funnybee_fd, onlyyou, prog_cd, ayumi_cd,
yakata3_cd, otome, hashirionna2

Especially in hashirionna2, not setting RND breaks the control flow.
2024-12-21 16:14:35 +09:00
kichikuou eae1951646 Intruder: Fix Z2 command
* `Z 2, 0:` clears the graphic screen.
* `Z 2, 1:` restores the screen by loading the background image, but
  with a transparent color so that the preceding G command can be seen.

Fixes #31.
2024-12-21 13:43:50 +09:00
kichikuou daeef22a29 AGS: Introduce Palette type 2024-12-21 09:55:29 +09:00
kichikuou b1c917b89a Refactor NACT::message() to take first command byte 2024-12-20 14:16:55 +09:00
kichikuou 24c6041915 Encoding: Refactor mblen() to accept first byte instead of pointer 2024-12-20 13:59:30 +09:00
kichikuou b000fecf92 Remove unused NACT_Sys[12]::cali2() 2024-12-18 13:51:26 +09:00
kichikuou f356d268df Scenario: Refactor address handling 2024-12-18 13:50:46 +09:00
kichikuou f8acad01d8 Move TexthookMode enum to config.h 2024-12-14 10:22:38 +09:00
kichikuou 989b6a844d System3: L 101-126 returns 255 if save file does not exist
This fixes an issue in Hashiri Onna II where "Data Load" appears in the
start menu even though there is no save. (#32)
2024-12-11 17:00:14 +09:00
kichikuou eab5eb075d Fix out-of-bounds memory access in text rendering
This fixes SEGV in Hashiri Onna II when custom font is used. (#32)
2024-12-11 16:30:42 +09:00
kichikuou 07a049e05e NACT: Initialize members in class declaration 2024-12-11 14:03:58 +09:00
kichikuou 4930154d45 Expose g_nact 2024-12-11 14:03:55 +09:00
kichikuou e791af2a1e Refactor window creation logic 2024-12-11 10:43:32 +09:00
kichikuou 9173742ffb Introduce GameId class 2024-12-11 10:43:28 +09:00
kichikuou 930fdfab4e Fix MSVS build 2024-12-10 22:08:19 +09:00
kichikuou e77a6b8bb5 Rename skip_string to skip_syseng_string for consistency 2024-12-10 09:15:26 +09:00
kichikuou 4ec1a12daa Add Scenario::unknown_command() for error reporting 2024-12-10 09:12:55 +09:00
kichikuou ffa3a364ce NACT: Make cmd_{label,page}_{jump,call} methods non-virtual 2024-12-10 08:42:36 +09:00
kichikuou d10ae21ff4 Move call stacks from NACT to Scenario 2024-12-10 08:35:23 +09:00
kichikuou e79f24d8b9 Replace NACT::fatal() with global sys_error() 2024-12-10 07:54:56 +09:00
kichikuou 5483d1932f Introduce Scenario class 2024-12-09 14:44:37 +09:00
kichikuou 8303f7c770 Refactor FILEIO 2024-12-08 15:06:00 +09:00
kichikuou 48d780add6 Introduce Dri class
It caches the link table.
2024-12-08 13:39:23 +09:00
kichikuou a7c44e2953 Version 1.2.0 2024-12-06 15:28:43 +09:00
kichikuou 8b4b33d538 Emscripten: Use texthook suppression list 2024-12-06 13:15:00 +09:00
kichikuou 0b04f5f334 Add texthook_suppress option
For suppressing text hook on specified scenario pages.
2024-12-06 10:24:36 +09:00
kichikuou 1e7a59f9cd Add texthook option
`-texthook print` prints text to console, and `-texthook copy`
automatically copies text to clipboard (for use with text hooker tools).

On Windows, copy mode can be toggled from the menu bar.
2024-12-04 16:33:50 +09:00
kichikuou 578e0b72bc System2: Fix parsing of V command
The command is still unimplemented though.
2024-12-03 11:17:48 +09:00
kichikuou 8eaaec8e16 Add scenario address to cali parse error messages 2024-12-03 11:08:51 +09:00
kichikuou e330a0dba6 Add warning message about game ID detection 2024-11-26 08:26:57 +09:00
kichikuou 9cc9f117ce Version 1.1.0 2024-08-17 16:46:15 +09:00
kichikuou 4174e0c1bb Refactor DRI 2024-08-17 12:59:36 +09:00
kichikuou 58859deec1 Refactor mako_midi.cpp 2024-08-17 10:15:05 +09:00
kichikuou 480548191f Add -mididevice option 2024-08-17 08:50:22 +09:00
kichikuou be4aec4b02 Rename src/linux to src/generic
And now android uses src/generic/mako.cpp.
2024-08-16 10:38:56 +09:00
kichikuou 41e69d7610 Real-time MIDI playback using RtMidi
Before this, MIDI playback was done by generating an SMF data stream,
which was then played using platform-specific methods (MCI on Windows,
MediaPlayer on Android, SDL_Mixer on other platforms). However, this
approach had an issue where the Y18 command (which reads loop counts and
markers) did not work correctly.

With this change, the MAKOMidi class now uses the RtMidi library to
control MIDI devices in real-time. This approach was used in the
original "System3 for win32", but has now been made cross-platform.

The dependency on RtMidi is optional. If RtMidi is not available at
build time or a MIDI device is unavailable at runtime, FM synthesis will
be used.
2024-08-16 10:11:41 +09:00
kichikuou 3a763412c9 Remove MIDI support on Android
This is in preparation for supporting real-time MIDI playback on other
platforms.
2024-08-15 16:51:32 +09:00
kichikuou f700a717d7 Do not pass negative values to isspace()
MSVCRT debug versions assert that.
2024-08-15 16:50:52 +09:00
kichikuou 4b56057159 emscripten: Use EM_ASYNC_JS 2024-07-31 08:59:15 +09:00
kichikuou c25227426e Version 1.0.2 2024-04-12 16:57:24 +09:00
kichikuou a15f911ca5 Fix to_bool() in config.cpp
Fixes #28.
2024-04-12 16:54:38 +09:00
kichikuou 0b008e32b3 Version 1.0.1 2024-04-07 21:51:09 +09:00
kichikuou 723e5cef05 Fix crash when font not found
Now NACT::fatal() immediately exits the process.
2024-04-06 08:31:37 +09:00
kichikuou 2ae16c8c61 Fix crash in system3.ini parser
Fixes #27.
2024-04-06 08:16:04 +09:00
kichikuou 15b7236230 emscripten: Don't let SDL change document.title 2024-02-16 13:07:09 +09:00
kichikuou 6996482362 Move CMakeLists.txt to project root 2024-01-11 13:28:18 +09:00