mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix loading zoomed sprites from RCT1
This commit is contained in:
parent
a15a3fedf7
commit
d60b0def60
|
@ -209,6 +209,8 @@ bool gfx_load_csg()
|
||||||
// Fix entry data offsets
|
// Fix entry data offsets
|
||||||
for (uint32 i = 0; i < csg.header.num_entries; i++) {
|
for (uint32 i = 0; i < csg.header.num_entries; i++) {
|
||||||
csg.elements[i].offset += (uintptr_t)csg.data;
|
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;
|
success = true;
|
||||||
|
|
Loading…
Reference in New Issue