AGS: Make VRAM 8 bits per pixel

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.
This commit is contained in:
kichikuou
2025-01-17 10:58:46 +09:00
parent 7f0bae6f74
commit 33418f8cb5
12 changed files with 40 additions and 96 deletions
+1 -1
View File
@@ -141,7 +141,7 @@ void AGS::load_vsp(uint8* data, int page, int transparent)
c[6] = ((b0 >> 1) & 1) | ((b1 ) & 2) | ((b2 << 1) & 4) | ((b3 << 2) & 8);
c[7] = ((b0 ) & 1) | ((b1 << 1) & 2) | ((b2 << 2) & 4) | ((b3 << 3) & 8);
uint32* dest;
uint8_t* dest;
// Gakuen Senki uses exact sx values rather than 8x.
if (game_id.is(GameId::GAKUEN))
dest = &vram[dest_screen][y + sy][(x * 8) + sx];