This implements "xsystem35.palette" custom request and
"xsystem35.paletteChanged" custom event.
The "xsystem35.palette" request retrieves the color values of the AGS
palette.
interface PaletteRequest extends Request {
command: 'xsystem35.palette';
}
interface PaletteResponse extends Response {
body: {
/**
* A number that increases each time the palette changes.
*/
version: number;
/**
* 256 element array containing color values in 0xRRGGBB format.
*/
palette: number[];
};
}
The "xsystem35.paletteChanged" event indicates that the AGS palette has
changed.
interface PaletteChangedEvent extends Event {
event: 'xsystem35.paletteChanged';
body: {
/**
* A number that increases each time the palette changes.
*/
version: number;
};
}
DAP clients can know if the received value is up to date by comparing
the `version` values of paletteChanged and PaletteResponse.
Now we use the same stack structure as System3.9. In order to maintain
the compatibility of save files, it is converted to/from the old layout
when saving/loading.
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).
- 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
- `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.
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.