Ejemplo n.º 1
0
        private void WriteTunicColor()
        {
            Color t = _settings.TunicColor;

            byte[] color = { t.R, t.G, t.B };

            var otherTunics = ResourceUtils.GetAddresses(Values.AddrsDirectory + "tunic-forms");

            TunicUtils.UpdateFormTunics(otherTunics, _settings.TunicColor);

            var playerModel    = DeterminePlayerModel();
            var characterIndex = (int)playerModel;
            var locations      = ResourceUtils.GetAddresses($"{Values.AddrsDirectory}tunic-{characterIndex}");
            var objectIndex    = playerModel == Character.Kafei ? 0x1C : 0x11;
            var objectData     = ObjUtils.GetObjectData(objectIndex);

            for (int j = 0; j < locations.Count; j++)
            {
                ReadWriteUtils.WriteFileAddr(locations[j], color, objectData);
            }
            ObjUtils.InsertObj(objectData, objectIndex);
        }