/// <summary> /// Creates a appearance hash /// </summary> /// <param name="Seed"></param> /// <returns></returns> protected virtual uint GetAppearanceHash(uint Seed) { // calculate hash hash.Reset(Seed); hash.Step((uint)(RenderInfo.Dimension.X)); hash.Step((uint)(RenderInfo.Dimension.Y)); hash.Step((uint)(HotspotIndex)); return(hash.Finish()); }
protected override uint GetAppearanceHash(uint Seed) { // calculate hash Murmur3 hash = new Murmur3(Seed); hash.Step((uint)(RenderInfo.Dimension.X)); hash.Step((uint)(RenderInfo.Dimension.Y)); hash.Step((uint)(HotspotIndex)); // additional to generic values: add flags hash.Step(dataSource.Flags.Value); return(hash.Finish()); }
/// <summary> /// Creates a 32bit hash for the appearance of the projectile. /// </summary> /// <returns></returns> protected virtual uint GetAppearanceHash() { hash.Reset(); hash.Step((uint)overlayFileRID); hash.Step((uint)flags); hash.Step((uint)colorTranslation); if (resource != null) { hash.Step((uint)ViewerFrameIndex); } return(hash.Finish()); }
/// <summary> /// Creates a 32bit hash for the appearance of the object. /// </summary> /// <returns></returns> protected virtual uint GetAppearanceHash() { hash.Reset(); hash.Step((uint)overlayFileRID); //hash.Step((uint)flags.Flags); hash.Step((uint)colorTranslation); if (resource != null) { hash.Step((uint)ViewerFrameIndex); } foreach (SubOverlay obj in subOverlays) { hash.Step((uint)obj.GetAppearanceHash(false)); } return(hash.Finish()); }