Remove unnecessery read. Add offsets

This commit is contained in:
duncanspumpkin 2017-02-02 18:20:16 +00:00
parent 6a9cddf2d8
commit e1ea820111
2 changed files with 4 additions and 6 deletions

View File

@ -24,9 +24,7 @@ extern "C"
void WaterObject::ReadLegacy(IReadObjectContext * context, IStream * stream)
{
stream->Seek(6, STREAM_SEEK_CURRENT);
_legacyType.palette_index_1 = stream->ReadValue<uint32>();
_legacyType.palette_index_2 = stream->ReadValue<uint32>();
stream->Seek(14, STREAM_SEEK_CURRENT);
_legacyType.flags = stream->ReadValue<uint16>();
GetStringTable()->Read(context, stream, OBJ_STRING_ID_NAME);

View File

@ -27,9 +27,9 @@ enum {
typedef struct rct_water_type {
rct_string_id string_idx; // 0x00
uint32 image_id; // 0x02
uint32 palette_index_1;
uint32 palette_index_2;
uint16 flags;
uint32 palette_index_1; // 0x06
uint32 palette_index_2; // 0x0A
uint16 flags; // 0x0E
} rct_water_type;
assert_struct_size(rct_water_type, 16);
#pragma pack(pop)