kichikuou
828cb047ba
Remove the ability to output debug log to a file
...
Before this, debug logs with level 5 and above were written to
`./xsystem35.log`. Now all logs are written to stderr.
2021-10-31 21:53:38 +09:00
kichikuou
bc06099e01
Show message box on fatal error
...
Now sys_error() shows error message using a SDL message box, so that
user can see the message on Windows / Android.
2021-10-26 21:41:34 +09:00
kichikuou
6c87a9155b
Compatibility fix: varGetNumof command
...
It returns the number of variables in System39.ain.
2021-10-24 21:53:04 +09:00
kichikuou
8e4070e91e
Make sysVarAttribute local in variable.c
2021-10-24 16:28:02 +09:00
kichikuou
78cc181271
Refactor variable access code
2021-10-24 14:55:09 +09:00
kichikuou
0e3ea590c6
Fix SEGV on shutdown
2021-10-24 10:47:23 +09:00
kichikuou
066295df2f
Windows: Open folder chooser only if current folder has no ALD files
2021-10-23 09:18:13 +09:00
kichikuou
40a4d8b2f6
debugger_dap: Support variables and setVariable requests
2021-10-23 08:12:13 +09:00
kichikuou
0793b57e3c
Debugger: Add finish (step out) command
2021-10-22 11:10:56 +09:00
kichikuou
089520ec55
Add support for Debug Adapter Protocol
...
If -debug_dap flag is given, xsystem35 speaks the Debug Adapter Protocol
(https://microsoft.github.io/debug-adapter-protocol/ ) via stdin/stdout.
This enables xsystem35 to work as a backend of VS Code's Debugger (and
possibly other debuggers that support DAP).
2021-10-17 21:05:24 +09:00
kichikuou
4bea33d852
Disable debugger on Android and Emscripten
2021-10-09 11:00:23 +09:00
kichikuou
6930acd3b1
Debugger: Empty input repeats last command
2021-10-03 16:01:06 +09:00
kichikuou
f9a3ef8606
Debugger: Add "list" command
2021-10-03 16:01:06 +09:00
kichikuou
841deb6f81
Debugger: Add "help" command
2021-10-03 16:01:06 +09:00
kichikuou
d713e1470e
Make SACT work with emscripten
...
- Add some functions to ASYNCIFY_ADD
A function that calls an asynchronous function via a function pointer
must be added to ASYNCIFY_ADD, even if it had a direct call to
another asynchronous function, so that the indirect call itself is
instrumented.
- Add dummy emscripten_sleep() call to send_agsevent
Because adding a function to ASYNCIFY_ADD does not make its callers
instrumented transitively.
2021-09-25 22:54:57 +09:00
kichikuou
6268cb6a9b
Add musbgm implementation for emscripten
2021-09-25 22:54:57 +09:00
kichikuou
f8b7adf3d0
Debugger: Fix crash by breakpoint on message literal
2021-08-15 18:19:37 +09:00
kichikuou
3e46c54ce6
VSP: allocate extraction buffer on heap
...
This fixes stack overflow in MacOS release build.
2021-08-15 18:19:16 +09:00
kichikuou
0925ee86e0
Move xsys35rc.sample to repository root directory
...
And describe the PortMidi option.
2021-08-14 17:19:06 +09:00
kichikuou
7a77470a19
Split debugger into two parts
...
The core (debugger.c) and CUI part (debugger_cui.c).
2021-08-01 22:16:21 +09:00
kichikuou
068a2910b5
Fix texthook in Unicode mode
2021-08-01 13:52:14 +09:00
kichikuou
6ef699e87d
Clean up scenario.h dependencies
...
- nact.h and xsystem35.h no longer include scenario.h
- Removed `sys_*` aliases in nact.h
- sys_getString() and sys_getConstString() are moved to
scenario.c as sl_getString() and sl_getConstString()
- DEBUG_COMMAND macros are now defined in scenario.h
2021-07-31 15:18:02 +09:00
kichikuou
d6dd7d34b7
Refactor scenario.{h,c}
2021-07-31 13:56:47 +09:00
kichikuou
a4f0e18d70
Windows: Allocate a console for debugger
...
Since xsystem35 is built as a GUI executable, we have to create a
console explicitly.
2021-07-31 09:56:43 +09:00
kichikuou
80bd68214b
Debugger: Allow interrupts inside sleep functions
...
This makes it possible to enter a REPL in the middle of command
execution (for example, while waiting for input in the A command).
2021-07-25 21:26:05 +09:00
kichikuou
4143cfc83b
Debugger: Add string command
...
It prints contents of string variables.
2021-07-24 17:52:40 +09:00
kichikuou
541cd22e56
Debugger: Support more ways to specify breakpoint locations
...
- `break function` sets a breakpoint to the entry of `function`, which
is either a global function or a local function in current page.
- `break number` sets a breakpoint to the specified line in current
file.
2021-07-24 17:47:26 +09:00
kichikuou
d82175c9f5
Debugger: Add quit command
2021-07-24 17:27:13 +09:00
kichikuou
21e43b5cc7
Debugger: Support FUNC debug information
...
It is used to print function names in backtrace.
2021-07-24 17:27:10 +09:00
BEN ENGLISCH
5283a0aa5d
Left/right select first/last menu items
2021-07-21 08:32:03 +09:00
BEN ENGLISCH
91d30c9b13
Fix mouse warping by translating coords
2021-07-21 08:32:03 +09:00
BEN ENGLISCH
f66ebff002
Add integerscale option
2021-07-21 08:32:03 +09:00
BEN ENGLISCH
98e1355461
Fix midi_pause()
2021-07-21 08:32:03 +09:00
BEN ENGLISCH
1e2ea9821c
Add PortMidi MIDI implementation
2021-07-19 09:09:23 +09:00
kichikuou
e5fab0f198
Add source-level debugger
...
If -debug option is specified, xsystem35 enables built-in debugger. It
optionally loads debug information from *SA.ALD.symbols file (generated
by xsys35c), and drops into a debugger REPL.
Currently the debugger supports:
- Simple breakpoints
- Backtrace
- Single-step execution (step into / step over)
- Printing variables
Also, when the debugger is enabled SIGINT breaks execution and enters a
REPL.
2021-07-18 22:55:22 +09:00
kichikuou
2e2fbbaa1b
Refactor main loop
2021-07-17 22:12:16 +09:00
kichikuou
fb44e5b1e3
Add a hack to improve Rance4 map navigation
...
Fixes #23 .
This is quite hacky but I couldn't find any cleaner solutions.
2021-07-16 14:35:00 +09:00
kichikuou
26c9f663ca
Update emscripten to 2.0.25
2021-07-14 17:46:29 +09:00
kichikuou
d5a7040b54
Fix SU command
...
This fixes a bug in various games where waiting for sound effects to
finish was not working.
`SU var1, var2:` should set var1 to 1 if sound is playing. Before this
fix, it was set to the return value of mus_pcm_get_playposition(), which
is usually 0 (OK).
2021-07-13 21:29:58 +09:00
kichikuou
ca09dc7413
Treat font load failure as a fatal error
2021-06-19 16:29:47 +09:00
kichikuou
cc60fdfb7d
Android: Allow specifying custom fonts in .xsys35rc
...
Now custom font files specified in .xsys35rc (as relative paths from the
ZIP root) can be loaded correctly.
This fixes #20 for Android.
2021-06-03 18:58:29 +09:00
kichikuou
fdcc3de352
Add a hack to trick LHG command error check in Diabolique
...
This fixes the issue where "HDD is full or CD is not inserted" error
message is displayed in Diabolique.
2021-05-09 15:00:16 +09:00
kichikuou
a159e7cb24
Show error instead of SEGV when System39.ini is missing
...
See #18 .
2021-03-08 09:38:46 +09:00
kichikuou
7ca3f2527e
GTK: Stop loading custom resource file
2021-01-31 13:03:33 +09:00
kichikuou
f6221a04ba
GTK: Migrate off of deprecated functions
2021-01-31 13:02:14 +09:00
kichikuou
7069343e57
GTK: Crash fix
...
It seems SDL2 must be initialized before initializing GTK.
2021-01-31 13:00:48 +09:00
kichikuou
9be7b0ab68
Migrate from GTK 2 to GTK 3
2021-01-31 12:59:05 +09:00
kichikuou
8779763615
GTK: Do not use deprecated symbols
2021-01-31 12:58:21 +09:00
kichikuou
869e2e34dd
emscripten: Enable DLL modules
...
And remove the ENABLE_MODULES build option.
2021-01-24 14:50:06 +09:00
kichikuou
04c3e22339
Remove setRect() and setOffset() macros
2021-01-23 23:07:12 +09:00