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.
In TT2, keyboard/gamepad navigation is implemented by moving the mouse
cursor using IZ command. It did not work in browsers where mouse cursor
could not be moved or when mouse movement was disabled from the menu.
Now IZ command updates the internal mouse coordinates even when the
cursor cannot be moved.
So that you can move around the window while the game is paused.
Now DAP messages read from stdin are once posted to the SDL message
queue, and then inserted into the debugger command queue in the main
thread.
System3.x uses the following bit expansion when converting RGB565 to
RGB888:
RRRRR GGGGGG BBBBB => RRRRRRRR GGGGGGGG BBBBBBBB
12345 123456 12345 12345123 12345612 12345123
However, SDL's blit functions use a slightly different mapping, so
sometimes expanded color did not match the color key specified in the CX
command.
To avoid this, convert to RGB888 by ourselves when drawing 16-bit CGs.
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.
These commands accept 0-127 as valid window numbers, which were 1-128
before this change.
To maintain savedata compatibility, window positions are saved in the
order 1,...,127,0.
The length limit of string variables was removed a long time ago, but it
was recorded in save files.
Now the first argument of MZ0 is completely ignored (as in System3.9).
The maxlen field in the save file is set to a constant so that older
versions of xsystem35 can load it.
* UC0 should restore values pushed by US/TPx
* UC1 should stop when the stack top is a page call
* UC1/2 should restore status pushes by TPx
* UC1/2 should not consume the count for non-call stack frames
* Add support for UC3 command