Fix loading zoomed sprites from RCT1

This commit is contained in:
Michael Steenbeek 2017-01-21 22:48:12 +01:00 committed by Ted John
parent a15a3fedf7
commit d60b0def60
1 changed files with 2 additions and 0 deletions

View File

@ -209,6 +209,8 @@ bool gfx_load_csg()
// Fix entry data offsets
for (uint32 i = 0; i < csg.header.num_entries; i++) {
csg.elements[i].offset += (uintptr_t)csg.data;
// RCT1 used zoomed offsets that counted from the beginning of the file, rather than from the current sprite.
csg.elements[i].zoomed_offset = i - (SPR_CSG_BEGIN + csg.elements[i].zoomed_offset);
}
success = true;