kichikuou
a274aaee57
GameId: Remove '_ENG' variants from Game enum
...
Use GameId::language field if necessary.
2025-01-03 08:52:30 +09:00
kichikuou
7f7ff91439
GameId: Replace CRC32 with enum
...
This makes it possible to define games that do not have a CRC32.
2025-01-03 08:52:27 +09:00
kichikuou
1a53c50c75
Rework NACT command tracing
...
- Now tracing is not a build-time config but a runtime option (`-trace`)
- One command per line, so that traces are not mixed with other outputs
- Send traces to DAP client
- Fix garbled characters in non-SJIS environments
2025-01-02 16:53:01 +09:00
kichikuou
6800258113
NACT: Add warnings for unimplemented Y commands
2025-01-02 10:54:21 +09:00
kichikuou
ddc790b268
Add error message when game files not found
2024-12-31 22:05:04 +09:00
kichikuou
64b3e2a284
dabugger: Add support for custom DAP messages for palette changes
...
This implements "xsystem35.palette" custom request and
"xsystem35.paletteChanged" custom event, introduced in
kichikuou/xsystem35-sdl2@4b15f45 .
2024-12-28 14:09:57 +09:00
kichikuou
909140f3bc
Add support for Debug Adapter Protocol
2024-12-28 14:09:56 +09:00
kichikuou
8883bd5d68
Add command line debugger
2024-12-28 14:09:53 +09:00
kichikuou
d6e3cb8415
Scenario: Label / page calls share a single call stack
...
This allows the debugger to present a linear backtrace.
It's still possible to return from the other call type.
2024-12-27 16:08:58 +09:00
kichikuou
a13719d84c
AGS: Fix a bug in GAIJI.DAT loading code
...
There was a bug in the JIS to Shift_JIS conversion code, causing out-of-
range access to the gaiji array. Since the conversion was not necessary
in the first place, the indexes to the array are now calculated directly
from JIS code points.
2024-12-27 14:47:20 +09:00
kichikuou
2498669da3
NACT: Refactor data structure for menu
2024-12-24 13:46:47 +09:00
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
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
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
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
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
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
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
723e5cef05
Fix crash when font not found
...
Now NACT::fatal() immediately exits the process.
2024-04-06 08:31:37 +09:00
kichikuou
16b9abe64f
Emscripten: Introduce xsystem35.shell.onExit()
...
It notifies the shell of the exit event and allows it to change the exit
code.
2023-10-02 20:45:47 +09:00
kichikuou
ad23d428cc
Y 255,0 should return the value of RND to the system
2023-09-27 16:50:25 +09:00
kichikuou
759a5eab5d
Emscripten: Restart game instead of exiting
...
The same behavior as xsystem35.
2023-09-27 16:48:16 +09:00
kichikuou
30ca8b714b
Reorganize flags for exit and restart
...
Pure refactoring, no user-visible changes.
2023-09-27 16:41:05 +09:00
kichikuou
04873d875a
emscripten: Add simulate_right_button()
2023-05-04 11:25:09 +09:00
kichikuou
7b7394e5fe
Fix use-of-uninitialized-value for text_font_maxsize
...
This fixes https://github.com/kichikuou/system3-sdl2/issues/25 .
2023-04-15 09:29:18 +09:00
kichikuou
c3556c5213
Replace sprintf_s with snprintf
2023-04-15 09:16:14 +09:00