This fixes https://github.com/kichikuou/system3-sdl2/issues/34.
Some PMS in Rance 4.1/4.2 fan English translation have one less row of
pixel data than image height.
When such data is encountered, decoding stops. The image rows decoded
up to that point are transferred to VRAM.
* The parameter is the number of times to loop, e.g. Y103,2: will play
the sound twice. This still does not work on Windows because
PlaySound() does not support specifying the loop count.
* Get AMSE data size from its header. This fixes audio glitch at the end
of sounds.
Before this, the virtual VRAM was 32 bits per pixel, with each pixel
holding an 8-bit index color or 0x80RRGGBB. The latter was for Ayumi-
chan Monogatari Jisshaban, which has been unsupported since system3-sdl2
was forked from System3 for Win32.
This change removes the 0x80RRGGBB format and makes the virtual VRAM 8
bits per pixel.
System1 commands have very different meanings from game to game
(especially the Y and Z commands), so this moves game-specific logic to
separate derived classes (e.g., NACT_LittleVampire, NACT_GakuenSenki)
for better modularization.
AG00.DAT on the hint disk must be renamed to GG00.DAT to avoid conflicts
with AG00.DAT of the main game. This is the setup used in the Ryu1's
porting kit (http://www.ryu1.jp/alice/r2port.html).
- Invalid game id -> sys_error() in GameId::GameId()
- Unknown crc32 -> SDL_ShowSimpleMessageBox() in GameId::GameId()
- Cannot open ADISK.DAT -> sys_error() in NACT::NACT()
- 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
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.