ace/Source/ACE.DatLoader/Entity/TextureMapChange.cs
Mag-nus 33985196fb
Make Dat SubPalette and TextureMapChanges properties public (#2094)
This allows other tools to instantiate these objects and set new values.

This is used by OptimShis Palette decoder and my retail character importer.

I was always on the fence about these dat properties being public. The risk is that a developer could modify a property in ACE. That property would then persist to the cached at object, and would be re-used until ACE was restarted.

This happens because dat objects are cached, and that same instance is returned on subsequent requests.

However, if we are ever to have 3rd party Dat editor tools, these properties will need to be public anyway.
2019-07-11 09:15:44 -05:00

19 lines
572 B
C#

using System.IO;
namespace ACE.DatLoader.Entity
{
// TODO: refactor to merge with existing TextureMapOverride object
public class TextureMapChange : IUnpackable
{
public byte PartIndex { get; set; }
public uint OldTexture { get; set; }
public uint NewTexture { get; set; }
public void Unpack(BinaryReader reader)
{
PartIndex = reader.ReadByte();
OldTexture = reader.ReadAsDataIDOfKnownType(0x05000000);
NewTexture = reader.ReadAsDataIDOfKnownType(0x05000000);
}
}
}