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


C++ MfcArchive::readUint16LE方法代码示例

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


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

示例1: InventoryItem

bool Inventory2::loadPartial(MfcArchive &file) { // Inventory2_SerializePartially
	int numInvs = file.readUint32LE();

	for (int i = 0; i < numInvs; i++) {
		InventoryItem *t = new InventoryItem();
		t->itemId = file.readUint16LE();
		t->count = file.readUint16LE();
		_inventoryItems.push_back(t);
	}

	return true;
}
开发者ID:MaddTheSane,项目名称:scummvm,代码行数:12,代码来源:inventory.cpp

示例2: load

bool ExCommand::load(MfcArchive &file) {
	debug(5, "ExCommand::load()");

	_parentId = file.readUint16LE();
	_messageKind = file.readUint32LE();
	_x = file.readUint32LE();
	_y = file.readUint32LE();
	_field_14 = file.readUint32LE();
	_sceneClickX = file.readUint32LE();
	_sceneClickY = file.readUint32LE();
	_field_20 = file.readUint32LE();
	_field_24 = file.readUint32LE();
	_keyCode = file.readUint32LE();
	_field_2C = file.readUint32LE();
	_field_30 = file.readUint32LE();
	_field_34 = file.readUint32LE();

	_messageNum = file.readUint32LE();

	_field_3C = 0;

	if (g_fullpipe->_gameProjectVersion >= 12) {
		_excFlags = file.readUint32LE();
		_parId = file.readUint32LE();
	}

	return true;
}
开发者ID:jaeyeonkim,项目名称:scummvm-kor,代码行数:28,代码来源:messages.cpp

示例3: load

bool ExCommand::load(MfcArchive &file) {
	debugC(5, kDebugLoading, "ExCommand::load()");

	_parentId = file.readUint16LE();
	_messageKind = file.readUint32LE();
	_x = file.readSint32LE();
	_y = file.readSint32LE();
	_field_14 = file.readUint32LE();
	_sceneClickX = file.readUint32LE();
	_sceneClickY = file.readUint32LE();
	_field_20 = file.readUint32LE();
	_field_24 = file.readUint32LE();
	_param = file.readUint32LE();
	_field_2C = file.readUint32LE();
	_field_30 = file.readUint32LE();
	_field_34 = file.readUint32LE();

	_messageNum = file.readUint32LE();

	_field_3C = 0;

	if (g_fp->_gameProjectVersion >= 12) {
		_excFlags = file.readUint32LE();
		_parId = file.readUint32LE();
	}

	_objtype = kObjTypeExCommand;

	return true;
}
开发者ID:lousyphreak,项目名称:scummvm,代码行数:30,代码来源:messages.cpp

示例4: load

bool PictureObject::load(MfcArchive &file, bool bigPicture) {
	debug(5, "PictureObject::load()");
	GameObject::load(file);

	if (bigPicture)
		_picture = new BigPicture();
	else
		_picture = new Picture();

	_picture->load(file);

	_pictureObject2List = new Common::Array<GameObject *>;

	int count = file.readUint16LE();

	if (count > 0) {
		GameObject *o = new GameObject();

		o->load(file);
		_pictureObject2List->push_back(o);
	}

	_ox2 = _ox;
	_oy2 = _oy;

#if 0
	_picture->displayPicture();
#endif

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

示例5: 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;
}
开发者ID:33d,项目名称:scummvm,代码行数:32,代码来源:stateloader.cpp

示例6: debugC

bool Sc2::load(MfcArchive &file) {
    debugC(5, kDebugLoading, "Sc2::load()");

    _sceneId = file.readUint16LE();

    _motionController = (MotionController *)file.readClass();

    _count1 = file.readUint32LE();
    debugC(4, kDebugLoading, "count1: %d", _count1);
    if (_count1 > 0) {
        _data1 = (int32 *)malloc(_count1 * sizeof(int32));

        for (int i = 0; i < _count1; i++) {
            _data1[i] = file.readUint32LE();
        }
    } else {
        _data1 = 0;
    }

    _defPicAniInfosCount = file.readUint32LE();
    debugC(4, kDebugLoading, "defPicAniInfos: %d", _defPicAniInfosCount);
    if (_defPicAniInfosCount > 0) {
        _defPicAniInfos = (PicAniInfo **)malloc(_defPicAniInfosCount * sizeof(PicAniInfo *));

        for (int i = 0; i < _defPicAniInfosCount; i++) {
            _defPicAniInfos[i] = new PicAniInfo();

            _defPicAniInfos[i]->load(file);
        }
    } else {
        _defPicAniInfos = 0;
    }

    _picAniInfos = 0;
    _picAniInfosCount = 0;

    _entranceDataCount = file.readUint32LE();
    debugC(4, kDebugLoading, "_entranceData: %d", _entranceDataCount);

    if (_entranceDataCount > 0) {
        _entranceData = (EntranceInfo **)malloc(_entranceDataCount * sizeof(EntranceInfo *));

        for (int i = 0; i < _entranceDataCount; i++) {
            _entranceData[i] = new EntranceInfo();
            _entranceData[i]->load(file);
        }
    } else {
        _entranceData = 0;
    }

    if (file.size() - file.pos() > 0)
        error("Sc2::load(): (%d bytes left)", file.size() - file.pos());

    return true;
}
开发者ID:,项目名称:,代码行数:55,代码来源:

示例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;
}
开发者ID:jaeyeonkim,项目名称:scummvm-kor,代码行数:20,代码来源:interaction.cpp

示例8: 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;
}
开发者ID:,项目名称:,代码行数:49,代码来源:

示例9: 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;
}
开发者ID:NickPepper,项目名称:scummvm,代码行数:24,代码来源:sound.cpp

示例10: load

bool Inventory::load(MfcArchive &file) {
	debug(5, "Inventory::load()");

	_sceneId = file.readUint16LE();
	int numInvs = file.readUint32LE();

	for (int i = 0; i < numInvs; i++) {
		InventoryPoolItem *t = new InventoryPoolItem();
		t->id = file.readUint16LE();
		t->pictureObjectNormal = file.readUint16LE();
		t->pictureObjectId1 = file.readUint16LE();
		t->pictureObjectHover = file.readUint16LE();
		t->pictureObjectSelected = file.readUint16LE();
		t->flags = file.readUint32LE();
		t->field_C = 0;
		t->field_A = -536;
		_itemsPool.push_back(t);
	}

	return true;
}
开发者ID:MaddTheSane,项目名称:scummvm,代码行数:21,代码来源:inventory.cpp


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