本文整理汇总了C++中common::OutSaveFile::writeFloatLE方法的典型用法代码示例。如果您正苦于以下问题:C++ OutSaveFile::writeFloatLE方法的具体用法?C++ OutSaveFile::writeFloatLE怎么用?C++ OutSaveFile::writeFloatLE使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common::OutSaveFile
的用法示例。
在下文中一共展示了OutSaveFile::writeFloatLE方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}