pvsneslib icon indicating copy to clipboard operation
pvsneslib copied to clipboard

gfx4snes: Add LZ77 compression to mode 7 images

Open malayli opened this issue 7 months ago • 2 comments

Lz77 compression is not handled for mode 7 images in gfx4snes.

I think that compression is skipped for mode 7 image because of this piece of code:

if ((gfx4snes_args.tilepacked) || (gfx4snes_args.mapscreenmode==7))
{
	tiles_savepacked (gfx4snes_args.filebase, tiles_snes,nbtiles, gfx4snes_args.tileblank, gfx4snes_args.quietmode);
}
else
{
	tiles_save (gfx4snes_args.filebase, tiles_snes,nbtiles, gfx4snes_args.palettecolors, gfx4snes_args.tileblank, gfx4snes_args.tilelzpacked,gfx4snes_args.quietmode);

}

https://github.com/alekmaul/pvsneslib/blob/develop/tools/gfx4snes/src/gfx4snes.c#L172-L180

I also think that you should create and implement this function to uncompress mode 7 image:

void bgInitMapTileSet7Lz(...);

Can you handle it?

malayli avatar Mar 02 '25 09:03 malayli