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


C# BlamLib.ReadUInt32方法代码示例

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


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

示例1: Read

			public virtual void Read(BlamLib.IO.EndianReader s)
			{
				uint tag = s.ReadUInt32();// if (tag != GroupTag.ID) throw new Debug.ExceptionLog("blam file entry tag mismatch. {0} {1}", s.FileName, GroupTag.Name);
				if ((BlockSize = s.ReadUInt32()) != SizeOf && SizeOf != uint.MaxValue) throw new Debug.ExceptionLog("blam file entry size mismatch. {0} {1}: {2:X}", s.FileName, GroupTag.Name, BlockSize);
				Unknown1 = s.ReadInt16();
				Unknown2 = s.ReadInt16();
			}
开发者ID:CodeAsm,项目名称:open-sauce,代码行数:7,代码来源:BLF.cs

示例2: Read

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

			#region base address
			Managers.BlamDefinition bdef = Program.GetManager(cache.EngineVersion);

			cache.AddressMask = bdef[cache.EngineVersion].CacheTypes.BaseAddress
				- (uint)cache.Header.OffsetToIndex;
			#endregion

			address = s.ReadUInt32();
			scenario.Read(s);
			s.ReadInt32(); // CRC
			tagCount = s.ReadInt32();
			vertexBufferCount = s.ReadInt32();
			vertexBufferAddress = s.ReadUInt32(); vertexBufferOffset = (int)(vertexBufferAddress - cache.AddressMask);
			indexBufferCount = s.ReadInt32();
			indexBufferAddress = s.ReadUInt32(); indexBufferOffset = (int)(indexBufferAddress - cache.AddressMask);
			if (isPC) s.ReadInt32(); // total vertex and index buffer size
			s.ReadInt32(); // 'tags'

			tagsOffset = s.PositionUnsigned;

			ReadTagInstances(s, cache);

			InitializeBspTags(s, cache);
		}
开发者ID:CodeAsm,项目名称:open-sauce,代码行数:29,代码来源:CacheFile.cs

示例3: Read

			public void Read(BlamLib.IO.EndianReader s)
			{
				VirtualAddress = s.ReadUInt32();
				Size = s.ReadInt32();
			}
开发者ID:CodeAsm,项目名称:open-sauce,代码行数:5,代码来源:CacheFileGen3rd.cs

示例4: Read

			public void Read(BlamLib.IO.EndianReader s)		{ Value = s.ReadUInt32(); }
开发者ID:CodeAsm,项目名称:open-sauce,代码行数:1,代码来源:Util.cs

示例5: ReadBeta

		void ReadBeta(BlamLib.IO.EndianReader s)
		{
			s.ReadUInt32();

			//s.ReadBool();
			//s.ReadBool(); // false if it belongs to a untracked build
			//s.ReadBool();
			//s.ReadBool();
			// Just read the booleans as a fucking int...
			s.ReadInt32();

			// Filetime.dwHighDateTime = s.ReadInt32();
			// Filetime.dwLowDateTime = s.ReadInt32();
			s.ReadInt32(); s.ReadInt32();

			s.ReadInt32(); s.ReadInt32(); s.ReadInt32();

			#region string id
			// retail doesn't include the 128 byte per string id table, so nix the members
			/*stringIdsBufferAlignedOffset = */s.ReadInt32();
			stringIdsCount = s.ReadInt32();

			stringIdsBufferSize = s.ReadInt32();
			stringIdIndicesOffset = s.ReadInt32();
			stringIdsBufferOffset = s.ReadInt32();
			#endregion

			#region filetimes?
			// pretty sure this is a flags field
			// used to tell which of the following 64bit values
			// are used. Damn sure this are FILETIME structures, but
			// hex workshop doesn't like them so I can't be for sure...
			s.ReadInt32();
			Filetime.dwHighDateTime = s.ReadInt32();
			Filetime.dwLowDateTime = s.ReadInt32();
			if (s.ReadInt32() != 0) flags.Add(CacheHeaderFlags.DependsOnMainMenu); s.ReadInt32();
			if (s.ReadInt32() != 0) flags.Add(CacheHeaderFlags.DependsOnShared); s.ReadInt32();
			if (s.ReadInt32() != 0) flags.Add(CacheHeaderFlags.DependsOnCampaign); s.ReadInt32();
			#endregion

			name = s.ReadTagString();
			s.ReadInt32();
			scenarioPath = s.ReadAsciiString(256);
			needsShared = s.ReadInt32() == 1;

			#region tag names
			tagNamesCount = s.ReadInt32();
			tagNamesBufferOffset = s.ReadInt32();
			tagNamesBufferSize = s.ReadInt32();
			tagNameIndicesOffset = s.ReadInt32();
			#endregion

			checksum = s.ReadUInt32(); // 0x2CC
			s.Seek(32, System.IO.SeekOrigin.Current); // these bytes are always the same

			baseAddress = s.ReadUInt32(); // expected base address
			xdkVersion = s.ReadInt32(); // xdk version

			#region memory partitions
			memoryPartitions = new Partition[3];
			memoryPartitions[0].BaseAddress = s.ReadUInt32(); // address
			memoryPartitions[0].Size = s.ReadInt32(); // size
			memoryPartitions[1].BaseAddress = s.ReadUInt32(); // address
			memoryPartitions[1].Size = s.ReadInt32(); // size
			memoryPartitions[2].BaseAddress = s.ReadUInt32(); // address
			memoryPartitions[2].Size = s.ReadInt32(); // size
			#endregion

			s.Seek(256, System.IO.SeekOrigin.Current);

			s.Seek(1004 + sizeof(uint), System.IO.SeekOrigin.Current);


			Managers.BlamDefinition bdef = Program.GetManager(BlamVersion.Halo3_Beta);

			uint base_address = (s.Owner as Blam.CacheFile).AddressMask = bdef[BlamVersion.Halo3_Beta].CacheTypes.BaseAddress - (uint)MemoryBufferOffset;

			offsetToIndex = (int)(tagIndexAddress - base_address);
			CalculatePartitionOffsets();
		}
开发者ID:CodeAsm,项目名称:open-sauce,代码行数:80,代码来源:CacheFile.cs

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