mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-27 16:54:52 +01:00
Finish loading water JSON objects
This commit is contained in:
@@ -863,20 +863,9 @@ rct_size16 FASTCALL gfx_get_sprite_size(uint32 image_id)
|
||||
|
||||
size_t g1_calculate_data_size(const rct_g1_element * g1)
|
||||
{
|
||||
if (g1->flags & G1_FLAG_RLE_COMPRESSION)
|
||||
if (g1->flags & G1_FLAG_PALETTE)
|
||||
{
|
||||
uint16 * offsets = (uint16 *)g1->offset;
|
||||
uint8 * ptr = g1->offset + offsets[g1->height - 1];
|
||||
bool endOfLine = false;
|
||||
do
|
||||
{
|
||||
uint8 chunk0 = *ptr++;
|
||||
ptr++; // offset
|
||||
uint8 chunkSize = chunk0 & 0x7F;
|
||||
ptr += chunkSize;
|
||||
endOfLine = (chunk0 & 0x80) != 0;
|
||||
} while (!endOfLine);
|
||||
return ptr - g1->offset;
|
||||
return g1->width * 3;
|
||||
}
|
||||
else if (g1->flags & G1_FLAG_RLE_COMPRESSION)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user