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


C++ File::writeString方法代码示例

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


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

示例1: writeBedheadGroup

void writeBedheadGroup(const BedheadEntry *data, int count) {
	for (int idx = 0; idx < count; ++idx, ++data) {
		outputFile.writeString(data->_name1);
		outputFile.writeString(data->_name2);
		outputFile.writeString(data->_name3);
		outputFile.writeString(data->_name4);
		outputFile.writeLong(data->_startFrame);
		outputFile.writeLong(data->_endFrame);
	}
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例2: writeParrotLobbyLinkUpdaterEntries

void writeParrotLobbyLinkUpdaterEntries() {
	static const int OFFSETS[3] = { 0x5A5B38, 0x5A5320, 0x5A4360 };
	static const int COUNTS[5] = { 7, 5, 6, 9, 1 };
	static const int SKIP[5] = { 36, 36, 40, 36, 0 };
	uint recordOffset = OFFSETS[_version], linkOffset;
	byte vals[8];

	outputFile.seek(dataOffset);

	for (int groupNum = 0; groupNum < 4; ++groupNum) {
		for (int entryNum = 0; entryNum < COUNTS[groupNum];
				++entryNum, recordOffset += 36) {
			inputFile.seek(recordOffset - FILE_DIFF[_version]);
			linkOffset = inputFile.readUint32LE();
			for (int idx = 0; idx < 8; ++idx)
				vals[idx] = inputFile.readUint32LE();

			// Write out the entry
			inputFile.seek(linkOffset - FILE_DIFF[_version]);
			outputFile.writeString(inputFile);
			outputFile.write(vals, 8);
		}

		// Skip space between groups
		recordOffset += SKIP[groupNum];
	}

	uint size = outputFile.size() - dataOffset;
	writeEntryHeader("DATA/PARROT_LOBBY_LINK_UPDATOR", dataOffset, size);
	dataOffset += size;
}
开发者ID:,项目名称:,代码行数:31,代码来源:

示例3: writeScriptIndex

void writeScriptIndex(Common::File &target, RoomScripts *scripts, uint scriptCount) {
	target.writeLong(scriptCount);
	for (uint i = 0; i < scriptCount; i++) {
		target.writeString(scripts[i].room);
		target.writeLong(scripts[i].type);
		target.writeLong(scripts[i].targetOffset);
		target.writeLong(scripts[i].size);
	}
}
开发者ID:gordonacocella,项目名称:residualvm,代码行数:9,代码来源:create_myst3.cpp

示例4: writeEntryHeader

void writeEntryHeader(const char *name, uint offset, uint size) {
	assert(headerOffset < HEADER_SIZE);
	outputFile.seek(headerOffset);
	outputFile.writeLong(offset);
	outputFile.writeLong(size);
	outputFile.writeString(name);

	headerOffset += 8 + strlen(name) + 1;
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例5: writeStringArray

void writeStringArray(const char *name, const char *const *strings, int count) {
	outputFile.seek(dataOffset);

	// Iterate through writing each string
	for (int idx = 0; idx < count; ++idx) {
		outputFile.writeString(strings[idx]);
	}

	uint size = outputFile.size() - dataOffset;
	writeEntryHeader(name, dataOffset, size);
	dataOffset += size;
}
开发者ID:,项目名称:,代码行数:12,代码来源:

示例6: writePhrases

void writePhrases(const char *name, const CommonPhrase *phrases) {
	for (uint idx = 0; phrases->_str; ++idx, ++phrases) {
		outputFile.seek(dataOffset + idx * 4);
		outputFile.writeString(phrases->_str);
		outputFile.writeLong(phrases->_dialogueId);
		outputFile.writeLong(phrases->_roomNum);
		outputFile.writeLong(phrases->_val1);
	}

	uint size = outputFile.size() - dataOffset;
	writeEntryHeader("Phrases/Bellbot", dataOffset, size);
	dataOffset += size;
}
开发者ID:,项目名称:,代码行数:13,代码来源:

示例7: writeNumbers

void writeNumbers() {
	outputFile.seek(dataOffset);

	// Iterate through writing each string
	for (int idx = 0; idx < 76; ++idx) {
		outputFile.writeString(NUMBERS[idx]._text);
		outputFile.writeLong(NUMBERS[idx]._value);
		outputFile.writeLong(NUMBERS[idx]._flags);
	}

	uint size = outputFile.size() - dataOffset;
	writeEntryHeader("TEXT/NUMBERS", dataOffset, size);
	dataOffset += size;
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例8: writeMissiveOMatMessages

void writeMissiveOMatMessages() {
	outputFile.seek(dataOffset);

	for (int idx = 0; idx < 3; ++idx)
		outputFile.writeString(MISSIVEOMAT_MESSAGES[idx]);

	uint size = outputFile.size() - dataOffset;
	writeEntryHeader("TEXT/MISSIVEOMAT/WELCOME", dataOffset, size);
	dataOffset += size;

	static const int MESSAGES[3] = { 0x5A63C0, 0x5A5BA8, 0x5A4A18 };
	writeStringArray("TEXT/MISSIVEOMAT/MESSAGES", MESSAGES[_version], 58);
	static const int FROM[3] = { 0x5A61F0, 0x5A59D8, 0x5A4BE8 };
	writeStringArray("TEXT/MISSIVEOMAT/FROM", FROM[_version], 58);
	static const int TO[3] = { 0x5A62D8, 0x5A5AC0, 0x5A4B00 };
	writeStringArray("TEXT/MISSIVEOMAT/TO", TO[_version], 58);
}
开发者ID:,项目名称:,代码行数:17,代码来源:


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