当前位置: 首页>>代码示例>>C#>>正文


C# BlamLib.ReadPointer方法代码示例

本文整理汇总了C#中BlamLib.ReadPointer方法的典型用法代码示例。如果您正苦于以下问题:C# BlamLib.ReadPointer方法的具体用法?C# BlamLib.ReadPointer怎么用?C# BlamLib.ReadPointer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BlamLib的用法示例。


在下文中一共展示了BlamLib.ReadPointer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Read

		public override void Read(BlamLib.IO.EndianReader s)
		{
			CacheFile cache = s.Owner as CacheFile;
			bool isHA10 = cache.EngineVersion == BlamVersion.Halo1_XboxX || cache.EngineVersion == BlamVersion.Halo1_PCX;

			GameDefinition gd = Program.Halo1.Manager;

			GroupTagInt = s.ReadUInt32();
			groupTag = gd.TagGroupFind(TagInterface.TagGroup.FromUInt(GroupTagInt));
			IO.ByteSwap.SwapUDWord(ref GroupTagInt);

			uint group_tag_int = s.ReadUInt32();
			if (group_tag_int != uint.MaxValue)
				groupParent1 = gd.TagGroupFind(TagInterface.TagGroup.FromUInt(group_tag_int));
			else
				groupParent1 = TagInterface.TagGroup.Null;

			group_tag_int = s.ReadUInt32();
			if (group_tag_int != uint.MaxValue)
				groupParent2 = gd.TagGroupFind(TagInterface.TagGroup.FromUInt(group_tag_int));
			else
				groupParent2 = TagInterface.TagGroup.Null;

			datum.Read(s);
			tagNameOffset = s.ReadPointer();
			
			address = s.ReadUInt32(); // external index for pc\ce, if its a bitmap, ptr if its a sound or anything else
			// TODO: HA10 Xbox doesn't use data files (and a PC port probably won't either)
			if (isHA10 || address > s.BaseAddress) offset = (int)(address - s.BaseAddress);
			this.location = (CacheIndex.ItemLocation)s.ReadInt32(); // bool_in_data_file
			
			s.ReadInt32();
		}
开发者ID:CodeAsm,项目名称:open-sauce,代码行数:33,代码来源:CacheFile.cs

示例2: Read

		public override void Read(BlamLib.IO.EndianReader s)
		{
			GameDefinition gd = Program.Stubbs.Manager;

			GroupTagInt = s.ReadUInt32();
			groupTag = gd.TagGroupFind(TagInterface.TagGroup.FromUInt(GroupTagInt));
			Debug.Assert.If(groupTag != null, "{0}", new string(TagInterface.TagGroup.FromUInt(GroupTagInt)));
			IO.ByteSwap.SwapUDWord(ref GroupTagInt);

			uint group_tag_int = s.ReadUInt32();
			if (group_tag_int != uint.MaxValue)
				groupParent1 = gd.TagGroupFind(TagInterface.TagGroup.FromUInt(group_tag_int));
			else
				groupParent1 = TagInterface.TagGroup.Null;

			group_tag_int = s.ReadUInt32();
			if (group_tag_int != uint.MaxValue)
				groupParent2 = gd.TagGroupFind(TagInterface.TagGroup.FromUInt(group_tag_int));
			else
				groupParent2 = TagInterface.TagGroup.Null;

			datum.Read(s);
			tagNameOffset = s.ReadPointer();

			address = s.ReadUInt32();
			offset = (int)(address - s.BaseAddress);

			s.ReadInt32();
			s.ReadInt32();
		}
开发者ID:guardian2433,项目名称:open-sauce,代码行数:30,代码来源:CacheFile.cs


注:本文中的BlamLib.ReadPointer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。