using System;
using System.Runtime.InteropServices;

namespace SharpQuake
{
	[StructLayout(LayoutKind.Sequential, Pack = 1)]
	internal class ddef_t
	{
		public void SwapBytes()
		{
			this.type = (ushort)common.LittleShort((short)this.type);
			this.ofs = (ushort)common.LittleShort((short)this.ofs);
			this.s_name = common.LittleLong(this.s_name);
		}

		public ushort type;

		public ushort ofs;

		public int s_name;

		public static int SizeInBytes = Marshal.SizeOf(typeof(ddef_t));
	}
}
