WebGL GTA1 (GTA1 in your web browser)
Posted: 01 Jan 2012, 10:47
Hi,
I am working on a WebGL implementation of GTA 1 (currently renders all the CMP map files), but having issues getting the colors correctly for tiles fetched from the G24 (24-bit version). I've gone through the DMA CityScape Data Structure documentation, but there is really no information on the G24 format, just briefly mentions that instead of using a palette, it uses instead a palette_index and CLUT data to correctly define the colors for a tile.
If someone is familiar with the format, could they give some insight on how the colors are set for a tile? What is the relation from tile<->palette_index<->clut data?
I am currently using pre-fetched tile sprites made by other tools, but as I want the game to be able to run custom tiles in their original format, I'd want it to be able to directly fetch them from the G24 files.
Thanks!
I am working on a WebGL implementation of GTA 1 (currently renders all the CMP map files), but having issues getting the colors correctly for tiles fetched from the G24 (24-bit version). I've gone through the DMA CityScape Data Structure documentation, but there is really no information on the G24 format, just briefly mentions that instead of using a palette, it uses instead a palette_index and CLUT data to correctly define the colors for a tile.
If someone is familiar with the format, could they give some insight on how the colors are set for a tile? What is the relation from tile<->palette_index<->clut data?
I am currently using pre-fetched tile sprites made by other tools, but as I want the game to be able to run custom tiles in their original format, I'd want it to be able to directly fetch them from the G24 files.
Thanks!