This fixes https://github.com/kichikuou/xsystem35-sdl2/issues/45.
The behavior when the contents of link table differ between ALD volumes
is different between System 3.8 and System 3.9, and System 3.9 uses the
link table of the first volume. The MangaGamer version of Rance 5D
depends on this behavior.
As far as I know, the only game that depends on the System 3.8 behavior
is Child Assassin (in Alice CD 2.50). Considering the additional
complexity, we do not implement switching to the old behavior.
This removes (old, unmaintained) real CD-ROM support for Linux and
FreeBSD. It may be possible to implement cross-platform CD support using
libcdio (https://www.gnu.org/software/libcdio/), but it would not be
worth the effort given the low avilability of hardware that can play
CD-DA these days.
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.