Exemple #1
0
    }                                // name length = 15

    public static AutomapInfo Serdes(int _, AutomapInfo existing, ISerializer s)
    {
        if (s == null)
        {
            throw new ArgumentNullException(nameof(s));
        }
        var info = existing ?? new AutomapInfo();

        info.X        = s.UInt8(nameof(X), info.X);                       // 0
        info.Y        = s.UInt8(nameof(Y), info.Y);                       // 1
        info.Unk2     = s.UInt8(nameof(Unk2), info.Unk2);                 // 2
        info.MarkerId = s.UInt8(nameof(MarkerId), info.MarkerId);         // 3
        info.Name     = s.FixedLengthString(nameof(Name), info.Name, 15); // 4
        return(info);
    }
Exemple #2
0
 static MapObject BuildMarker(int tileWidth, int tileHeight, AutomapInfo marker, byte tile, ref int nextId) =>