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


C++ ReadStream::readUint32LE方法代码示例

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


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

示例1: read

bool SaveHeader::read(Common::ReadStream &stream) {
	// Read the header and verify the global IDs
	if (stream.readUint32BE() != kID1)
		return false;
	if (stream.readUint32BE() != kID2)
		return false;

	_type = stream.readUint32BE();
	_version = stream.readUint32LE();
	_size = stream.readUint32LE();

	return !stream.err();
}
开发者ID:St0rmcrow,项目名称:scummvm,代码行数:13,代码来源:savefile.cpp

示例2: verify

bool SaveHeader::verify(Common::ReadStream &stream) const {
	// Compare the header with the stream's content

	if (stream.readUint32BE() != kID1)
		return false;
	if (stream.readUint32BE() != kID2)
		return false;
	if (stream.readUint32BE() != _type)
		return false;
	if (stream.readUint32LE() != _version)
		return false;
	if (stream.readUint32LE() != _size)
		return false;

	return !stream.err();
}
开发者ID:St0rmcrow,项目名称:scummvm,代码行数:16,代码来源:savefile.cpp

示例3: readString

XARCMember::XARCMember(const XARCArchive *xarc, Common::ReadStream &stream, uint32 offset) {
	_xarc = xarc;

	// Read the information about this archive member
	_name = readString(stream);
	_offset = offset;
	_length = stream.readUint32LE();
	debugC(20, kDebugArchive, "Stark::XARC Member: \"%s\" starts at offset=%d and has length=%d", _name.c_str(), _offset, _length);

	// Unknown value. English: 0, others: 1
	uint32 unknown = stream.readUint32LE();
	debugC(kDebugUnknown, "Stark::XARC Member: \"%s\" has unknown=%d", _name.c_str(), unknown);
	if (unknown != 0 && unknown != 1) {
		warning("Stark::XARC Member: \"%s\" has unknown=%d with unknown meaning", _name.c_str(), unknown);
	}
}
开发者ID:Snejp,项目名称:tlj-residual,代码行数:16,代码来源:archive.cpp

示例4: verifyReadSize

bool SaveHeader::verifyReadSize(Common::ReadStream &stream) {
	// Compare the header with the stream's content, expect for the size

	if (stream.readUint32BE() != kID1)
		return false;
	if (stream.readUint32BE() != kID2)
		return false;
	if (stream.readUint32BE() != _type)
		return false;
	if (stream.readUint32LE() != _version)
		return false;

	// Read the size out of the stream instead
	_size = stream.readUint32LE();

	return !stream.err();
}
开发者ID:St0rmcrow,项目名称:scummvm,代码行数:17,代码来源:savefile.cpp

示例5: readBTree

/*-----------------------------------------------------------------------
 * BtPage
 *-----------------------------------------------------------------------*/
void BtPage::readBTree(Common::ReadStream &s) {
	_header._count = s.readUint16LE();
	_header._down = s.readUint16LE();

	if (_header._down == kBtValNone) {
		// Leaf list
		for (int i = 0; i < kBtLeafCount; ++i) {
			s.read(_leaf[i]._key, kBtKeySize);
			_leaf[i]._pos = s.readUint32LE();
			_leaf[i]._size = s.readUint16LE();
		}
	} else {
		// Root index
		for (int i = 0; i < kBtInnerCount; ++i) {
			s.read(_inner[i]._key, kBtKeySize);
			_inner[i]._down = s.readUint16LE();
		}
	}
}
开发者ID:AReim1982,项目名称:scummvm,代码行数:22,代码来源:fileio.cpp

示例6: operator

	void operator()(Uint32& i) const {
		i = _s->readUint32LE();
	}
开发者ID:EffWun,项目名称:xoreos,代码行数:3,代码来源:wokfile.cpp


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