本文整理汇总了C++中MfcArchive::readPascalString方法的典型用法代码示例。如果您正苦于以下问题:C++ MfcArchive::readPascalString方法的具体用法?C++ MfcArchive::readPascalString怎么用?C++ MfcArchive::readPascalString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MfcArchive
的用法示例。
在下文中一共展示了MfcArchive::readPascalString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load
bool GameLoader::load(MfcArchive &file) {
debugC(1, kDebugLoading, "GameLoader::load()");
_gameName = file.readPascalString();
debugC(1, kDebugLoading, "_gameName: %s", _gameName.c_str());
_gameProject = new GameProject();
_gameProject->load(file);
g_fp->_gameProject = _gameProject;
if (g_fp->_gameProjectVersion < 12) {
error("Old gameProjectVersion: %d", g_fp->_gameProjectVersion);
}
_gameName = file.readPascalString();
debugC(1, kDebugLoading, "_gameName: %s", _gameName.c_str());
_inventory.load(file);
_interactionController->load(file);
debugC(1, kDebugLoading, "sceneTag count: %d", _gameProject->_sceneTagList->size());
_sc2array.resize(_gameProject->_sceneTagList->size());
int i = 0;
for (SceneTagList::const_iterator it = _gameProject->_sceneTagList->begin(); it != _gameProject->_sceneTagList->end(); ++it, i++) {
char tmp[12];
snprintf(tmp, 11, "%04d.sc2", it->_sceneId);
debugC(1, kDebugLoading, "sc: %s", tmp);
_sc2array[i].loadFile((const char *)tmp);
}
_preloadItems.load(file);
_field_FA = file.readUint16LE();
_field_F8 = file.readUint16LE();
debugC(1, kDebugLoading, "_field_FA: %d\n_field_F8: %d", _field_FA, _field_F8);
_gameVar = (GameVar *)file.readClass();
return true;
}
示例2: load
bool GameProject::load(MfcArchive &file) {
debug(5, "GameProject::load()");
_field_4 = 0;
_headerFilename = 0;
_field_10 = 12;
g_fp->_gameProjectVersion = file.readUint32LE();
g_fp->_pictureScale = file.readUint16LE();
g_fp->_scrollSpeed = file.readUint32LE();
_headerFilename = file.readPascalString();
debug(1, "_gameProjectVersion = %d", g_fp->_gameProjectVersion);
debug(1, "_pictureScale = %d", g_fp->_pictureScale);
debug(1, "_scrollSpeed = %d", g_fp->_scrollSpeed);
debug(1, "_headerFilename = %s", _headerFilename);
_sceneTagList = new SceneTagList();
_sceneTagList->load(file);
if (g_fp->_gameProjectVersion >= 3)
_field_4 = file.readUint32LE();
if (g_fp->_gameProjectVersion >= 5) {
file.readUint32LE();
file.readUint32LE();
}
return true;
}
示例3: load
bool GameVar::load(MfcArchive &file) {
_varName = file.readPascalString();
_varType = file.readUint32LE();
debugCN(6, kDebugLoading, "[%03d] ", file.getLevel());
for (int i = 0; i < file.getLevel(); i++)
debugCN(6, kDebugLoading, " ");
debugCN(6, kDebugLoading, "<%s>: ", transCyrillic(_varName));
switch (_varType) {
case 0:
_value.intValue = file.readUint32LE();
debugC(6, kDebugLoading, "d --> %d", _value.intValue);
break;
case 1:
_value.intValue = file.readUint32LE(); // FIXME
debugC(6, kDebugLoading, "f --> %f", _value.floatValue);
break;
case 2: {
Common::String str = file.readPascalString();
_value.stringValue = (char *)calloc(str.size() + 1, 1);
Common::strlcpy(_value.stringValue, str.c_str(), str.size() + 1);
debugC(6, kDebugLoading, "s --> %s", _value.stringValue);
}
break;
default:
error("Unknown var type: %d (0x%x)", _varType, _varType);
}
file.incLevel();
_parentVarObj = file.readClass<GameVar>();
_prevVarObj = file.readClass<GameVar>();
_nextVarObj = file.readClass<GameVar>();
_field_14 = file.readClass<GameVar>();
_subVars = file.readClass<GameVar>();
file.decLevel();
return true;
}
示例4: load
bool ObjstateCommand::load(MfcArchive &file) {
debug(5, "ObjStateCommand::load()");
_objtype = kObjTypeObjstateCommand;
_cmd.load(file);
_value = file.readUint32LE();
_objCommandName = file.readPascalString();
return true;
}
示例5: load
bool MemoryObject::load(MfcArchive &file) {
debugC(5, kDebugLoading, "MemoryObject::load()");
_memfilename = file.readPascalString();
while (_memfilename.contains('\\')) {
_memfilename.deleteChar(0);
}
if (g_fp->_currArchive) {
_mfield_14 = 0;
_libHandle = g_fp->_currArchive;
}
return true;
}
示例6: load
bool GameObject::load(MfcArchive &file) {
debug(5, "GameObject::load()");
_okeyCode = 0;
_flags = 0;
_field_20 = 0;
_id = file.readUint16LE();
_objectName = file.readPascalString();
_ox = file.readUint32LE();
_oy = file.readUint32LE();
_priority = file.readUint16LE();
if (g_fp->_gameProjectVersion >= 11) {
_field_8 = file.readUint32LE();
}
return true;
}
示例7: load
bool Interaction::load(MfcArchive &file) {
debug(5, "Interaction::load()");
_objectId1 = file.readUint16LE();
_objectId2 = file.readUint16LE();
_staticsId1 = file.readUint16LE();
_staticsId2 = file.readUint16LE();
_objectId3 = file.readUint16LE();
_objectState2 = file.readUint32LE();
_objectState1 = file.readUint32LE();
_xOffs = file.readUint32LE();
_yOffs = file.readUint32LE();
_sceneId = file.readUint32LE();
_flags = file.readUint32LE();
_actionName = file.readPascalString();
_messageQueue = (MessageQueue *)file.readClass();
return true;
}
示例8: load
bool Sound::load(MfcArchive &file, NGIArchive *archive) {
debug(5, "Sound::load()");
MemoryObject::load(file);
_id = file.readUint32LE();
_description = file.readPascalString();
assert(g_fp->_gameProjectVersion >= 6);
_objectId = file.readUint16LE();
if (archive && archive->hasFile(_memfilename)) {
Common::SeekableReadStream *s = archive->createReadStreamForMember(_memfilename);
_soundData = (byte *)calloc(s->size(), 1);
s->read(_soundData, s->size());
delete s;
}
return true;
}