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


C++ OutSaveFile::writeUint16BE方法代码示例

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


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

示例1: saveAnimDataTable

void saveAnimDataTable(Common::OutSaveFile &out) {
    out.writeUint16BE(NUM_MAX_ANIMDATA); // Entry count
    out.writeUint16BE(0x1E); // Entry size

    for (int i = 0; i < NUM_MAX_ANIMDATA; i++) {
        g_cine->_animDataTable[i].save(out);
    }
}
开发者ID:MathiasBartl,项目名称:scummvm,代码行数:8,代码来源:saveload.cpp

示例2: saveScreenParams

void saveScreenParams(Common::OutSaveFile &out) {
    // Screen parameters, unhandled
    out.writeUint16BE(0);
    out.writeUint16BE(0);
    out.writeUint16BE(0);
    out.writeUint16BE(0);
    out.writeUint16BE(0);
    out.writeUint16BE(0);
}
开发者ID:MathiasBartl,项目名称:scummvm,代码行数:9,代码来源:saveload.cpp

示例3: saveObjectScripts

void saveObjectScripts(Common::OutSaveFile &out) {
    ScriptList::const_iterator it;
    out.writeUint16BE(g_cine->_objectScripts.size());
    for (it = g_cine->_objectScripts.begin(); it != g_cine->_objectScripts.end(); ++it) {
        (*it)->save(out);
    }
}
开发者ID:MathiasBartl,项目名称:scummvm,代码行数:7,代码来源:saveload.cpp

示例4: saveOverlayList

void saveOverlayList(Common::OutSaveFile &out) {
    Common::List<overlay>::const_iterator it;

    out.writeUint16BE(g_cine->_overlayList.size());

    for (it = g_cine->_overlayList.begin(); it != g_cine->_overlayList.end(); ++it) {
        out.writeUint32BE(0); // next
        out.writeUint32BE(0); // previous?
        out.writeUint16BE(it->objIdx);
        out.writeUint16BE(it->type);
        out.writeSint16BE(it->x);
        out.writeSint16BE(it->y);
        out.writeSint16BE(it->width);
        out.writeSint16BE(it->color);
    }
}
开发者ID:MathiasBartl,项目名称:scummvm,代码行数:16,代码来源:saveload.cpp

示例5: saveSeqList

void saveSeqList(Common::OutSaveFile &out) {
    Common::List<SeqListElement>::const_iterator it;
    out.writeUint16BE(g_cine->_seqList.size());

    for (it = g_cine->_seqList.begin(); it != g_cine->_seqList.end(); ++it) {
        out.writeSint16BE(it->var4);
        out.writeUint16BE(it->objIdx);
        out.writeSint16BE(it->var8);
        out.writeSint16BE(it->frame);
        out.writeSint16BE(it->varC);
        out.writeSint16BE(it->varE);
        out.writeSint16BE(it->var10);
        out.writeSint16BE(it->var12);
        out.writeSint16BE(it->var14);
        out.writeSint16BE(it->var16);
        out.writeSint16BE(it->var18);
        out.writeSint16BE(it->var1A);
        out.writeSint16BE(it->var1C);
        out.writeSint16BE(it->var1E);
    }
}
开发者ID:MathiasBartl,项目名称:scummvm,代码行数:21,代码来源:saveload.cpp

示例6: saveObjectTable

void saveObjectTable(Common::OutSaveFile &out) {
    out.writeUint16BE(NUM_MAX_OBJECT); // Entry count
    out.writeUint16BE(0x20); // Entry size

    for (int i = 0; i < NUM_MAX_OBJECT; i++) {
        out.writeUint16BE(g_cine->_objectTable[i].x);
        out.writeUint16BE(g_cine->_objectTable[i].y);
        out.writeUint16BE(g_cine->_objectTable[i].mask);
        out.writeUint16BE(g_cine->_objectTable[i].frame);
        out.writeUint16BE(g_cine->_objectTable[i].costume);
        out.write(g_cine->_objectTable[i].name, 20);
        out.writeUint16BE(g_cine->_objectTable[i].part);
    }
}
开发者ID:MathiasBartl,项目名称:scummvm,代码行数:14,代码来源:saveload.cpp

示例7: saveBgIncrustList

void saveBgIncrustList(Common::OutSaveFile &out) {
    Common::List<BGIncrust>::const_iterator it;
    out.writeUint16BE(g_cine->_bgIncrustList.size());

    for (it = g_cine->_bgIncrustList.begin(); it != g_cine->_bgIncrustList.end(); ++it) {
        out.writeUint32BE(0); // next
        out.writeUint32BE(0); // previous?
        out.writeUint16BE(it->objIdx);
        out.writeUint16BE(it->param);
        out.writeUint16BE(it->x);
        out.writeUint16BE(it->y);
        out.writeUint16BE(it->frame);
        out.writeUint16BE(it->part);
    }
}
开发者ID:MathiasBartl,项目名称:scummvm,代码行数:15,代码来源:saveload.cpp

示例8: makeSaveOS

/**
 * Save an Operation Stealth type savegame. WIP!
 *
 * NOTE: This is going to be very much a work in progress so the Operation Stealth's
 *       savegame formats that are going to be tried are extremely probably not going
 *       to be supported at all after Operation Stealth becomes officially supported.
 *       This means that the savegame format will hopefully change to something nicer
 *       when official support for Operation Stealth begins.
 */
void CineEngine::makeSaveOS(Common::OutSaveFile &out) {
    int i;

    // Make a temporary Operation Stealth savegame format chunk header and save it.
    ChunkHeader header;
    header.id = TEMP_OS_FORMAT_ID;
    header.version = CURRENT_OS_SAVE_VER;
    header.size = 0; // No data is currently put inside the chunk, all the plain data comes right after it.
    writeChunkHeader(out, header);

    // Start outputting the plain savegame data right after the chunk header.
    out.writeUint16BE(currentDisk);
    out.write(currentPartName, 13);
    out.write(currentPrcName, 13);
    out.write(currentRelName, 13);
    out.write(currentMsgName, 13);
    renderer->saveBgNames(out);
    out.write(currentCtName, 13);

    saveObjectTable(out);
    renderer->savePalette(out);
    g_cine->_globalVars.save(out, NUM_MAX_VAR);
    saveZoneData(out);
    saveCommandVariables(out);
    saveCommandBuffer(out);
    saveZoneQuery(out);

    // FIXME: Save a proper name here, saving an empty string currently.
    // 0x2925: Current music name (String, 13 bytes).
    for (i = 0; i < 13; i++) {
        out.writeByte(0);
    }
    // FIXME: Save proper value for this variable, currently writing zero
    // 0x2932: Is music loaded? (Uint16BE, Boolean).
    out.writeUint16BE(0);
    // FIXME: Save proper value for this variable, currently writing zero
    // 0x2934: Is music playing? (Uint16BE, Boolean).
    out.writeUint16BE(0);

    out.writeUint16BE(renderer->_cmdY);
    out.writeUint16BE(0); // Some unknown variable that seems to always be zero
    out.writeUint16BE(allowPlayerInput);
    out.writeUint16BE(playerCommand);
    out.writeUint16BE(commandVar1);
    out.writeUint16BE(isDrawCommandEnabled);
    out.writeUint16BE(var5);
    out.writeUint16BE(var4);
    out.writeUint16BE(var3);
    out.writeUint16BE(var2);
    out.writeUint16BE(commandVar2);
    out.writeUint16BE(renderer->_messageBg);

    // FIXME: Save proper value for this variable, currently writing zero.
    // An unknown variable at 0x295E: adBgVar1 (Uint16BE).
    out.writeUint16BE(0);
    out.writeSint16BE(currentAdditionalBgIdx);
    out.writeSint16BE(currentAdditionalBgIdx2);
    // FIXME: Save proper value for this variable, currently writing zero.
    // 0x2954: additionalBgVScroll (Uint16BE). This probably means renderer->_bgShift.
    out.writeUint16BE(0);
    // FIXME: Save proper value for this variable, currently writing zero.
    // An unknown variable at 0x2956: adBgVar0 (Uint16BE). Maybe this means bgVar0?
    out.writeUint16BE(0);
    out.writeUint16BE(disableSystemMenu);

    saveAnimDataTable(out);
    saveScreenParams(out);
    saveGlobalScripts(out);
    saveObjectScripts(out);
    saveSeqList(out);
    saveOverlayList(out);
    saveBgIncrustList(out);
}
开发者ID:MathiasBartl,项目名称:scummvm,代码行数:82,代码来源:saveload.cpp

示例9: makeSaveFW

void CineEngine::makeSaveFW(Common::OutSaveFile &out) {
    out.writeUint16BE(currentDisk);
    out.write(currentPartName, 13);
    out.write(currentDatName, 13);
    out.writeUint16BE(musicIsPlaying);
    out.write(currentPrcName, 13);
    out.write(currentRelName, 13);
    out.write(currentMsgName, 13);
    renderer->saveBgNames(out);
    out.write(currentCtName, 13);

    saveObjectTable(out);
    renderer->savePalette(out);
    g_cine->_globalVars.save(out, NUM_MAX_VAR);
    saveZoneData(out);
    saveCommandVariables(out);
    saveCommandBuffer(out);

    out.writeUint16BE(renderer->_cmdY);
    out.writeUint16BE(bgVar0);
    out.writeUint16BE(allowPlayerInput);
    out.writeUint16BE(playerCommand);
    out.writeUint16BE(commandVar1);
    out.writeUint16BE(isDrawCommandEnabled);
    out.writeUint16BE(var5);
    out.writeUint16BE(var4);
    out.writeUint16BE(var3);
    out.writeUint16BE(var2);
    out.writeUint16BE(commandVar2);
    out.writeUint16BE(renderer->_messageBg);

    saveAnimDataTable(out);
    saveScreenParams(out);

    saveGlobalScripts(out);
    saveObjectScripts(out);
    saveOverlayList(out);
    saveBgIncrustList(out);
}
开发者ID:MathiasBartl,项目名称:scummvm,代码行数:39,代码来源:saveload.cpp

示例10: saveZoneQuery

void saveZoneQuery(Common::OutSaveFile &out) {
    for (int i = 0; i < 16; i++) {
        out.writeUint16BE(g_cine->_zoneQuery[i]);
    }
}
开发者ID:MathiasBartl,项目名称:scummvm,代码行数:5,代码来源:saveload.cpp

示例11: writeCompleteSaveFile

bool DMEngine::writeCompleteSaveFile(int16 saveSlot, Common::String& saveDescription, int16 saveAndPlayChoice) {
    Common::String savefileName = getSavefileName(saveSlot);
    Common::SaveFileManager *saveFileManager = _system->getSavefileManager();
    Common::OutSaveFile *file = saveFileManager->openForSaving(savefileName);

    if (!file)
        return false;

    writeSaveGameHeader(file, saveDescription);

    file->writeSint32BE(_gameVersion->_saveTargetToWrite);
    file->writeSint32BE(1); // save version
    file->writeSint32BE(_gameVersion->_origSaveFormatToWrite);
    file->writeSint32BE(_gameVersion->_origPlatformToWrite);

    // Was _gameID, useless.
    file->writeSint32BE(0);
    file->writeUint16BE(_dungeonId);

    // write C0_SAVE_PART_GLOBAL_DATA part
    file->writeSint32BE(_gameTime);
    //L1348_s_GlobalData.LastRandomNumber = G0349_ul_LastRandomNumber;
    file->writeUint16BE(_championMan->_partyChampionCount);
    file->writeSint16BE(_dungeonMan->_partyMapX);
    file->writeSint16BE(_dungeonMan->_partyMapY);
    file->writeUint16BE(_dungeonMan->_partyDir);
    file->writeByte(_dungeonMan->_partyMapIndex);
    file->writeSint16BE(_championMan->_leaderIndex);
    file->writeSint16BE(_championMan->_magicCasterChampionIndex);
    file->writeUint16BE(_timeline->_eventCount);
    file->writeUint16BE(_timeline->_firstUnusedEventIndex);
    file->writeUint16BE(_timeline->_eventMaxCount);
    file->writeUint16BE(_groupMan->_currActiveGroupCount);
    file->writeSint32BE(_projexpl->_lastCreatureAttackTime);
    file->writeSint32BE(_projexpl->_lastPartyMovementTime);
    file->writeSint16BE(_disabledMovementTicks);
    file->writeSint16BE(_projectileDisableMovementTicks);
    file->writeSint16BE(_lastProjectileDisabledMovementDirection);
    file->writeUint16BE(_championMan->_leaderHandObject.toUint16());
    file->writeUint16BE(_groupMan->_maxActiveGroupCount);

    // write C1_SAVE_PART_ACTIVE_GROUP part
    _groupMan->saveActiveGroupPart(file);
    // write C2_SAVE_PART_PARTY part
    _championMan->savePartyPart2(file);
    // write C3_SAVE_PART_EVENTS part
    _timeline->saveEventsPart(file);
    // write C4_SAVE_PART_TIMELINE part
    _timeline->saveTimelinePart(file);

    // write sentinel
    file->writeUint32BE(0x6f85e3d3);

    // save _g278_dungeonFileHeader
    DungeonFileHeader &header = _dungeonMan->_dungeonFileHeader;
    file->writeUint16BE(header._ornamentRandomSeed);
    file->writeUint16BE(header._rawMapDataSize);
    file->writeByte(header._mapCount);
    file->writeByte(0); // to match the structure of dungeon.dat, will be discarded
    file->writeUint16BE(header._textDataWordCount);
    file->writeUint16BE(header._partyStartLocation);
    file->writeUint16BE(header._squareFirstThingCount);
    for (uint16 i = 0; i < 16; ++i)
        file->writeUint16BE(header._thingCounts[i]);

    // save _g277_dungeonMaps
    for (uint16 i = 0; i < _dungeonMan->_dungeonFileHeader._mapCount; ++i) {
        Map &map = _dungeonMan->_dungeonMaps[i];

        file->writeUint16BE(map._rawDunDataOffset);
        file->writeUint32BE(0); // to match the structure of dungeon.dat, will be discarded
        file->writeByte(map._offsetMapX);
        file->writeByte(map._offsetMapY);

        uint16 tmp;
        tmp = ((map._height & 0x1F) << 11) | ((map._width & 0x1F) << 6) | (map._level & 0x3F);
        file->writeUint16BE(tmp);

        tmp = ((map._randFloorOrnCount & 0xF) << 12) | ((map._floorOrnCount & 0xF) << 8)
              | ((map._randWallOrnCount & 0xF) << 4) | (map._wallOrnCount & 0xF);
        file->writeUint16BE(tmp);

        tmp = ((map._difficulty & 0xF) << 12) | ((map._creatureTypeCount & 0xF) << 4) | (map._doorOrnCount & 0xF);
        file->writeUint16BE(tmp);

        tmp = ((map._doorSet1 & 0xF) << 12) | ((map._doorSet0 & 0xF) << 8)
              | ((map._wallSet & 0xF) << 4) | (map._floorSet & 0xF);
        file->writeUint16BE(tmp);
    }

    // save _g280_dungeonColumnsCumulativeSquareThingCount
    for (uint16 i = 0; i < _dungeonMan->_dungeonColumCount; ++i)
        file->writeUint16BE(_dungeonMan->_dungeonColumnsCumulativeSquareThingCount[i]);

    // save _g283_squareFirstThings
    for (uint16 i = 0; i < _dungeonMan->_dungeonFileHeader._squareFirstThingCount; ++i)
        file->writeUint16BE(_dungeonMan->_squareFirstThings[i].toUint16());

    // save _g260_dungeonTextData
    for (uint16 i = 0; i < _dungeonMan->_dungeonFileHeader._textDataWordCount; ++i)
//.........这里部分代码省略.........
开发者ID:mikeliturbe,项目名称:scummvm,代码行数:101,代码来源:loadsave.cpp

示例12: saveCommandVariables

void saveCommandVariables(Common::OutSaveFile &out) {
    for (int i = 0; i < 4; i++) {
        out.writeUint16BE(commandVar3[i]);
    }
}
开发者ID:MathiasBartl,项目名称:scummvm,代码行数:5,代码来源:saveload.cpp

示例13: save

void SagaEngine::save(const char *fileName, const char *saveName) {
	Common::OutSaveFile *out;
	char title[TITLESIZE];

	if (!(out = _saveFileMan->openForSaving(fileName))) {
		return;
	}

	_saveHeader.type = MKTAG('S','A','G','A');
	_saveHeader.size = 0;
	_saveHeader.version = CURRENT_SAGA_VER;
	// Note that IHNM has a smaller save title size than ITE
	// We allocate the ITE save title size here, to preserve
	// savegame backwards compatibility
	Common::strlcpy(_saveHeader.name, saveName, SAVE_TITLE_SIZE);

	out->writeUint32BE(_saveHeader.type);
	out->writeUint32LE(_saveHeader.size);
	out->writeUint32LE(_saveHeader.version);
	out->write(_saveHeader.name, sizeof(_saveHeader.name));

	// Original game title
	memset(title, 0, TITLESIZE);
	Common::strlcpy(title, _gameTitle.c_str(), TITLESIZE);
	out->write(title, TITLESIZE);

	// Thumbnail
	// First draw scene without save dialog
	int oldMode = _interface->getMode();
	_interface->setMode(kPanelMain);
	_render->drawScene();

	Graphics::saveThumbnail(*out);

	_interface->setMode(oldMode);

	// Date / time
	TimeDate curTime;
	_system->getTimeAndDate(curTime);

	uint32 saveDate = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF);
	uint16 saveTime = ((curTime.tm_hour & 0xFF) << 8) | ((curTime.tm_min) & 0xFF);
	uint32 playTime = g_engine->getTotalPlayTime() / 1000;

	out->writeUint32BE(saveDate);
	out->writeUint16BE(saveTime);
	out->writeUint32BE(playTime);

	// Surrounding scene
	out->writeSint32LE(_scene->getOutsetSceneNumber());
#ifdef ENABLE_IHNM
	if (getGameId() == GID_IHNM) {
		out->writeSint32LE(_scene->currentChapterNumber());
		out->writeSint32LE(0);	// obsolete, was used for the protagonist
		out->writeSint32LE(_scene->getCurrentMusicTrack());
		out->writeSint32LE(_scene->getCurrentMusicRepeat());
	}
#endif
	// Inset scene
	out->writeSint32LE(_scene->currentSceneNumber());

#ifdef ENABLE_IHNM
	if (getGameId() == GID_IHNM) {
		out->writeUint32LE(_globalFlags);
		for (int i = 0; i < ARRAYSIZE(_ethicsPoints); i++)
			out->writeSint16LE(_ethicsPoints[i]);
	}
#endif

	_interface->saveState(out);

	_actor->saveState(out);

	out->writeSint16LE(_script->_commonBuffer.size());

	out->write(_script->_commonBuffer.getBuffer(), _script->_commonBuffer.size());

	// ISO map x, y coordinates for ITE
	if (getGameId() == GID_ITE) {
		out->writeSint16LE(_isoMap->getMapPosition().x);
		out->writeSint16LE(_isoMap->getMapPosition().y);
	}

	out->finalize();

	if (out->err())
		warning("Can't write file '%s'. (Disk full?)", fileName);

	delete out;

	_interface->resetSaveReminder();
}
开发者ID:AReim1982,项目名称:scummvm,代码行数:92,代码来源:saveload.cpp

示例14: saveGame

bool saveGame(const Common::String &fname) {
	Common::OutSaveFile *fp = g_system->getSavefileManager()->openForSaving(fname);

	if (fp == NULL)
		return false;

	fp->writeString("SLUDSA");
	fp->writeByte(0);
	fp->writeByte(0);
	fp->writeByte(MAJOR_VERSION);
	fp->writeByte(MINOR_VERSION);

	if (!g_sludge->_gfxMan->saveThumbnail(fp))
		return false;

	fp->write(&fileTime, sizeof(FILETIME));

	// DON'T ADD ANYTHING NEW BEFORE THIS POINT!

	fp->writeByte(allowAnyFilename);
	fp->writeByte(captureAllKeys);
	fp->writeByte(true);
	g_sludge->_txtMan->saveFont(fp);

	// Save backdrop
	fp->writeUint16BE(g_sludge->_gfxMan->getCamX());
	fp->writeUint16BE(g_sludge->_gfxMan->getCamY());
	fp->writeFloatLE(g_sludge->_gfxMan->getCamZoom());

	fp->writeByte(brightnessLevel);
	g_sludge->_gfxMan->saveHSI(fp);

	// Save event handlers
	g_sludge->_evtMan->saveHandlers(fp);

	// Save regions
	saveRegions(fp);

	g_sludge->_cursorMan->saveCursor(fp);

	// Save functions
	LoadedFunction *thisFunction = allRunningFunctions;
	int countFunctions = 0;
	while (thisFunction) {
		countFunctions++;
		thisFunction = thisFunction->next;
	}
	fp->writeUint16BE(countFunctions);

	thisFunction = allRunningFunctions;
	while (thisFunction) {
		saveFunction(thisFunction, fp);
		thisFunction = thisFunction->next;
	}

	for (int a = 0; a < numGlobals; a++) {
		saveVariable(&globalVars[a], fp);
	}

	savePeople(fp);

	if (currentFloor->numPolygons) {
		fp->writeByte(1);
		fp->writeUint16BE(currentFloor->originalNum);
	} else {
		fp->writeByte(0);
	}

	g_sludge->_gfxMan->saveZBuffer(fp);
	g_sludge->_gfxMan->saveLightMap(fp);

	fp->writeByte(fadeMode);

	g_sludge->_speechMan->save(fp);
	saveStatusBars(fp);
	g_sludge->_soundMan->saveSounds(fp);

	fp->writeUint16BE(saveEncoding);

	blur_saveSettings(fp);

	g_sludge->_gfxMan->saveColors(fp);

	g_sludge->_gfxMan->saveParallax(fp);
	fp->writeByte(0);

	g_sludge->_languageMan->saveLanguageSetting(fp);

	g_sludge->_gfxMan->saveSnapshot(fp);

	fp->flush();
	fp->finalize();
	delete fp;

	clearStackLib();
	return true;
}
开发者ID:AReim1982,项目名称:scummvm,代码行数:97,代码来源:loadsave.cpp

示例15: saveGameStateIntern

Common::Error EoBCoreEngine::saveGameStateIntern(int slot, const char *saveName, const Graphics::Surface *thumbnail) {
	Common::String saveNameTmp;
	const char *fileName = 0;

	// Special slot id -1 to create final save for party transfer
	if (slot == -1) {
		_savegameFilename = _targetName + Common::String(".fin");
		fileName = _savegameFilename.c_str();
		saveNameTmp = _targetName + Common::String(" final");
		saveNameTmp.toUppercase();
		saveName = saveNameTmp.c_str();
	} else {
		fileName = getSavegameFilename(slot);
	}

	Common::OutSaveFile *out = openSaveForWriting(fileName, saveName, thumbnail);
	if (!out)
		return _saveFileMan->getError();

	completeDoorOperations();
	generateTempData();
	advanceTimers(_restPartyElapsedTime);
	_restPartyElapsedTime = 0;

	for (int i = 0; i < 6; i++)
		timerSpecialCharacterUpdate(0x30 + i);

	for (int i = 0; i < 6; i++) {
		EoBCharacter *c = &_characters[i];

		out->writeByte(c->id);
		out->writeByte(c->flags);
		out->write(c->name, 11);
		out->writeSByte(c->strengthCur);
		out->writeSByte(c->strengthMax);
		out->writeSByte(c->strengthExtCur);
		out->writeSByte(c->strengthExtMax);
		out->writeSByte(c->intelligenceCur);
		out->writeSByte(c->intelligenceMax);
		out->writeSByte(c->wisdomCur);
		out->writeSByte(c->wisdomMax);
		out->writeSByte(c->dexterityCur);
		out->writeSByte(c->dexterityMax);
		out->writeSByte(c->constitutionCur);
		out->writeSByte(c->constitutionMax);
		out->writeSByte(c->charismaCur);
		out->writeSByte(c->charismaMax);
		out->writeSint16BE(c->hitPointsCur);
		out->writeSint16BE(c->hitPointsMax);
		out->writeSByte(c->armorClass);
		out->writeByte(c->disabledSlots);
		out->writeByte(c->raceSex);
		out->writeByte(c->cClass);
		out->writeByte(c->alignment);
		out->writeByte(c->portrait);
		out->writeByte(c->food);
		out->write(c->level, 3);
		for (int ii = 0; ii < 3; ii++)
			out->writeUint32BE(c->experience[ii]);
		out->write(c->mageSpells, 80);
		out->write(c->clericSpells, 80);
		out->writeUint32BE(c->mageSpellsAvailableFlags);
		for (int ii = 0; ii < 27; ii++)
			out->writeSint16BE(c->inventory[ii]);
		uint32 ct = _system->getMillis();
		for (int ii = 0; ii < 10; ii++)
			out->writeUint32BE((c->timers[ii] && c->timers[ii] > ct) ? c->timers[ii] - ct : 0);

		out->write(c->events, 10);
		out->write(c->effectsRemainder, 4);
		out->writeUint32BE(c->effectFlags);
		out->writeByte(c->damageTaken);
		out->write(c->slotStatus, 5);
	}

	out->writeByte(_currentLevel);
	out->writeSByte(_currentSub);
	out->writeUint16BE(_currentBlock);
	out->writeUint16BE(_currentDirection);
	out->writeSint16BE(_itemInHand);
	out->writeUint32BE(_hasTempDataFlags);
	out->writeUint32BE(_partyEffectFlags);

	out->writeUint16BE(_updateFlags);
	out->writeUint16BE(_compassDirection);
	out->writeUint16BE(_currentControlMode);
	out->writeUint16BE(_updateCharNum);
	out->writeSByte(_openBookSpellLevel);
	out->writeSByte(_openBookSpellSelectedItem);
	out->writeSByte(_openBookSpellListOffset);
	out->writeByte(_openBookChar);
	out->writeByte(_openBookType);
	out->writeByte(_openBookCharBackup);
	out->writeByte(_openBookTypeBackup);
	out->writeByte(_activeSpellCharId);
	out->writeByte(_activeSpellCharacterPos);
	out->writeByte(_activeSpell);
	out->writeByte(_returnAfterSpellCallback ? 1 : 0);

	_inf->saveState(out);
//.........这里部分代码省略.........
开发者ID:alexnikleo,项目名称:scummvm,代码行数:101,代码来源:saveload_eob.cpp


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