本文整理汇总了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);
}
}
示例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;
}
示例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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}