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


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

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


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

示例1: load

void TTtagMappings::load(const char *name) {
	Common::SeekableReadStream *r = g_vm->_filesManager->getResource(name);

	while (r->pos() < r->size()) {
		uint src = r->readUint32LE();
		uint dest = r->readUint32LE();

		push_back(TTtagMapping(src, dest));
	}

	delete r;
}
开发者ID:Tkachov,项目名称:scummvm,代码行数:12,代码来源:script_support.cpp

示例2:

uint32 GFF4Struct::getListCount(Common::SeekableReadStream &data, const Field &field) const {
	if (!field.isList)
		return 1;

	const uint32 listOffset = data.readUint32LE();
	if (listOffset == 0xFFFFFFFF)
		return 0;

	data.seek(_parent->getDataOffset() + listOffset);

	return data.readUint32LE();
}
开发者ID:strand,项目名称:xoreos,代码行数:12,代码来源:gff4file.cpp

示例3: loadSceneExits

void GameModule::loadSceneExits(Common::SeekableReadStream &s) {
	debug(0, "GameModule::loadSceneExits()");

	s.seek(0x158);
	_sceneExitsCount = s.readUint32LE();
	uint32 offs = s.readUint32LE();
	_sceneExits = new SceneExit[_sceneExitsCount];
	s.seek(offs);
	for (int i = 0; i < _sceneExitsCount; ++i) {
		_sceneExits[i].rect = readRect(s);
		_sceneExits[i].newModuleNum = s.readUint32LE();
	}
}
开发者ID:86400,项目名称:scummvm,代码行数:13,代码来源:gamemodule.cpp

示例4: loadBgObjects

void GameModule::loadBgObjects(Common::SeekableReadStream &s) {
	debug(0, "GameModule::loadBgObjects()");

	s.seek(0x160);
	_bgObjectsCount = s.readUint32LE();
	uint32 offs = s.readUint32LE();
	_bgObjects = new BgObject[_bgObjectsCount];
	s.seek(offs);
	for (int i = 0; i < _bgObjectsCount; ++i) {
		s.read(_bgObjects[i].name, 20);
		_bgObjects[i].rect = readRect(s);
	}
}
开发者ID:86400,项目名称:scummvm,代码行数:13,代码来源:gamemodule.cpp

示例5: loadSceneSounds

void GameModule::loadSceneSounds(Common::SeekableReadStream &s) {
	debug(0, "GameModule::loadSceneSounds()");

	s.seek(0x1A0);
	_sceneSoundsCount = s.readUint32LE();
	uint32 offs = s.readUint32LE();
	_sceneSounds = new SceneSound[_sceneSoundsCount];
	s.seek(offs);
	for (int i = 0; i < _sceneSoundsCount; ++i) {
		_sceneSounds[i].conditions = readConditions(s);
		_sceneSounds[i].soundNum = s.readUint32LE();
	}
}
开发者ID:86400,项目名称:scummvm,代码行数:13,代码来源:gamemodule.cpp

示例6: load

void CBaseStarEntry::load(Common::SeekableReadStream &s) {
	_field0 = s.readByte();
	_field1 = s.readByte();
	_field2 = s.readByte();
	_field3 = s.readByte();
	*((uint32 *)&_value) = s.readUint32LE();		// FIXME
	_val._v1 = s.readUint32LE();
	_val._v2 = s.readUint32LE();
	_val._v3 = s.readUint32LE();

	for (int idx = 0; idx < 5; ++idx)
		_data[idx] = s.readUint32LE();
}
开发者ID:86400,项目名称:scummvm,代码行数:13,代码来源:base_star.cpp

示例7: readArrayDef

void Model::readArrayDef(Common::SeekableReadStream &stream,
                         uint32 &offset, uint32 &count) {

	offset = stream.readUint32LE();

	uint32 usedCount      = stream.readUint32LE();
	uint32 allocatedCount = stream.readUint32LE();

	if (usedCount != allocatedCount)
		warning("Model::readArrayDef(): usedCount != allocatedCount (%d, %d)",
		        usedCount, allocatedCount);

	count = usedCount;
}
开发者ID:Hellzed,项目名称:xoreos,代码行数:14,代码来源:model.cpp

示例8: loadData

void CBaseStar::loadData(Common::SeekableReadStream &s) {
	uint headerId = s.readUint32LE();
	uint count = s.readUint32LE();
	if (headerId != 100 || count == 0)
		error("Invalid star data");

	// Initialize the data array
	clear();
	_data.resize(count);

	// Iterate through reading the data for each entry
	for (uint idx = 0; idx < count; ++idx)
		_data[idx].load(s);
}
开发者ID:86400,项目名称:scummvm,代码行数:14,代码来源:base_star.cpp

示例9: readVarResTable

void BIFFile::readVarResTable(Common::SeekableReadStream &bif, uint32 offset) {
	bif.seek(offset);

	for (IResourceList::iterator res = _iResources.begin(); res != _iResources.end(); ++res) {
		bif.skip(4); // ID

		if (_version == kVersion11)
			bif.skip(4); // Flags

		res->offset = bif.readUint32LE();
		res->size   = bif.readUint32LE();
		res->type   = (FileType) bif.readUint32LE();
	}
}
开发者ID:ImperatorPrime,项目名称:xoreos,代码行数:14,代码来源:biffile.cpp

示例10: loadCharData

bool StaticResource::loadCharData(Common::SeekableReadStream &stream, void *&ptr, int &size) {
	size = stream.size() / 130;
	LoLCharacter *charData = new LoLCharacter[size];

	for (int i = 0; i < size; i++) {
		LoLCharacter *t = &charData[i];

		t->flags = stream.readUint16LE();
		stream.read(t->name, 11);
		t->raceClassSex = stream.readByte();
		t->id = stream.readSint16LE();
		t->curFaceFrame = stream.readByte();
		t->tempFaceFrame = stream.readByte();
		t->screamSfx = stream.readByte();
		stream.readUint32LE();
		for (int ii = 0; ii < 8; ii++)
			t->itemsMight[ii] = stream.readUint16LE();
		for (int ii = 0; ii < 8; ii++)
			t->protectionAgainstItems[ii] = stream.readUint16LE();
		t->itemProtection = stream.readUint16LE();
		t->hitPointsCur = stream.readSint16LE();
		t->hitPointsMax = stream.readUint16LE();
		t->magicPointsCur = stream.readSint16LE();
		t->magicPointsMax = stream.readUint16LE();
		t->field_41 = stream.readByte();
		t->damageSuffered = stream.readUint16LE();
		t->weaponHit = stream.readUint16LE();
		t->totalMightModifier = stream.readUint16LE();
		t->totalProtectionModifier = stream.readUint16LE();
		t->might = stream.readUint16LE();
		t->protection = stream.readUint16LE();
		t->nextAnimUpdateCountdown = stream.readSint16LE();
		for (int ii = 0; ii < 11; ii++)
			t->items[ii] = stream.readUint16LE();
		for (int ii = 0; ii < 3; ii++)
			t->skillLevels[ii] = stream.readByte();
		for (int ii = 0; ii < 3; ii++)
			t->skillModifiers[ii] = stream.readByte();
		for (int ii = 0; ii < 3; ii++)
			t->experiencePts[ii] = stream.readUint32LE();
		for (int ii = 0; ii < 5; ii++)
			t->characterUpdateEvents[ii] = stream.readByte();
		for (int ii = 0; ii < 5; ii++)
			t->characterUpdateDelay[ii] = stream.readByte();
	};

	ptr = charData;
	return true;
}
开发者ID:Coworker,项目名称:scummvm,代码行数:49,代码来源:staticres_lol.cpp

示例11: readResList

void KEYFile::readResList(Common::SeekableReadStream &key, uint32 offset) {
	key.seek(offset);

	for (ResourceList::iterator res = _resources.begin(); res != _resources.end(); ++res) {
		res->name = Common::readStringFixed(key, Common::kEncodingASCII, 16);
		res->type = (FileType) key.readUint16LE();

		uint32 id = key.readUint32LE();

		// The new flags field holds the bifIndex now. The rest contains fixed
		// resource info.
		if (_version == kVersion11) {
			uint32 flags = key.readUint32LE();
			res->bifIndex = (flags & 0xFFF00000) >> 20;
		} else
开发者ID:idkwim,项目名称:xoreos-tools,代码行数:15,代码来源:keyfile.cpp

示例12: loadSceneObjectDefs

void GameModule::loadSceneObjectDefs(Common::SeekableReadStream &s) {
	debug(0, "GameModule::loadSceneObjectDefs()");

	s.seek(0x170);
	_sceneObjectDefsCount = s.readUint32LE();
	uint32 offs = s.readUint32LE();
	_sceneObjectDefs = new SceneObjectDef[_sceneObjectDefsCount];
	s.seek(offs);
	for (int i = 0; i < _sceneObjectDefsCount; ++i) {
		s.read(_sceneObjectDefs[i].name, 20);
		_sceneObjectDefs[i].walkSpeed = s.readUint32LE();
		for (int j = 0; j < 16; ++j)
			_sceneObjectDefs[i].animIndices[j] = s.readUint32LE();
	}
}
开发者ID:86400,项目名称:scummvm,代码行数:15,代码来源:gamemodule.cpp

示例13: loadFromStream

bool Mob::loadFromStream(Common::SeekableReadStream &stream) {
	int32 pos = stream.pos();

	uint16 visible = stream.readUint16LE();

	if (visible == 0xFFFF)
		return false;

	_visible = visible;
	_type = stream.readUint16LE();
	_rect.left = stream.readUint16LE();
	_rect.top = stream.readUint16LE();
	_rect.right = stream.readUint16LE();
	_rect.bottom = stream.readUint16LE();

	_mask = stream.readUint16LE();

	_examPosition.x = stream.readUint16LE();
	_examPosition.y = stream.readUint16LE();
	_examDirection = (Direction)stream.readUint16LE();

	_usePosition.x = stream.readByte();
	_usePosition.y = stream.readByte();
	_useDirection = (Direction)stream.readUint16LE();

	uint32 nameOffset = stream.readUint32LE();
	uint32 examTextOffset = stream.readUint32LE();

	byte c;
	stream.seek(nameOffset);
	_name.clear();
	while ((c = stream.readByte()))
		_name += c;

	stream.seek(examTextOffset);
	_examText.clear();
	c = stream.readByte();
	if (c) {
		_examText += c;
		do {
			c = stream.readByte();
			_examText += c;
		} while (c != 255);
	}
	stream.seek(pos + 32);

	return true;
}
开发者ID:AlbanBedel,项目名称:scummvm,代码行数:48,代码来源:mob.cpp

示例14: readString

void LocString::readString(Language language, Common::SeekableReadStream &stream) {
	uint32 length = stream.readUint32LE();

	// TODO: Different encodings for different languages, probably
	_strings[mapLanguageToStorage(language)].readFixedLatin9(stream, length, true);
	_languages[mapLanguageToStorage(language)] = language;
}
开发者ID:EffWun,项目名称:xoreos-tools,代码行数:7,代码来源:locstring.cpp

示例15: getDictionary

void HERFFile::getDictionary(std::list<uint32> &hashes, std::list<Common::UString> &names) const {
	hashes.clear();
	names.clear();

	if (_dictIndex == 0xFFFFFFFF)
		return;

	Common::SeekableReadStream *dict = getResource(_dictIndex);

	dict->skip(8); // unknown

	while (dict->pos() < dict->size()) {
		uint32 hash = dict->readUint32LE();
		if (hash == 0)
			break;

		hashes.push_back(hash);
		names.push_back("");

		names.back().readFixedASCII(*dict, 128);
		names.back().tolower();
	}

	delete dict;
}
开发者ID:bazhenovc,项目名称:xoreos,代码行数:25,代码来源:herffile.cpp


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