本文整理汇总了C++中PointerWrap::Do方法的典型用法代码示例。如果您正苦于以下问题:C++ PointerWrap::Do方法的具体用法?C++ PointerWrap::Do怎么用?C++ PointerWrap::Do使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PointerWrap
的用法示例。
在下文中一共展示了PointerWrap::Do方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: __KernelTimeDoState
void __KernelTimeDoState(PointerWrap &p)
{
p.Do(start_time);
p.DoMarker("sceKernelTime");
}
示例2: DoState
void GameListItem::DoState(PointerWrap& p)
{
p.Do(m_valid);
p.Do(m_file_name);
p.Do(m_file_size);
p.Do(m_volume_size);
p.Do(m_names);
p.Do(m_descriptions);
p.Do(m_company);
p.Do(m_game_id);
p.Do(m_title_id);
p.Do(m_region);
p.Do(m_country);
p.Do(m_platform);
p.Do(m_blob_type);
p.Do(m_revision);
p.Do(m_disc_number);
m_volume_banner.DoState(p);
m_emu_state.DoState(p);
p.Do(m_custom_name);
if (p.GetMode() == PointerWrap::MODE_READ)
{
SetWxBannerFromRaw(m_volume_banner);
}
}
示例3: __DisplayDoState
void __DisplayDoState(PointerWrap &p) {
auto s = p.Section("sceDisplay", 1, 3);
if (!s)
return;
p.Do(framebuf);
p.Do(latchedFramebuf);
p.Do(framebufIsLatched);
p.Do(frameStartTicks);
p.Do(vCount);
if (s <= 2) {
double oldHCountBase;
p.Do(oldHCountBase);
hCountBase = (int) oldHCountBase;
} else {
p.Do(hCountBase);
}
p.Do(isVblank);
p.Do(hasSetMode);
p.Do(mode);
p.Do(resumeMode);
p.Do(holdMode);
p.Do(width);
p.Do(height);
WaitVBlankInfo wvi(0);
p.Do(vblankWaitingThreads, wvi);
p.Do(vblankPausedWaits);
p.Do(enterVblankEvent);
CoreTiming::RestoreRegisterEvent(enterVblankEvent, "EnterVBlank", &hleEnterVblank);
p.Do(leaveVblankEvent);
CoreTiming::RestoreRegisterEvent(leaveVblankEvent, "LeaveVBlank", &hleLeaveVblank);
p.Do(afterFlipEvent);
CoreTiming::RestoreRegisterEvent(afterFlipEvent, "AfterFlip", &hleAfterFlip);
p.Do(gstate);
p.Do(gstate_c);
#ifndef _XBOX
if (s < 2) {
// This shouldn't have been savestated anyway, but it was.
// It's unlikely to overlap with the first value in gpuStats.
p.ExpectVoid(&gl_extensions.gpuVendor, sizeof(gl_extensions.gpuVendor));
}
#endif
p.Do(gpuStats);
gpu->DoState(p);
ReapplyGfxState();
if (p.mode == p.MODE_READ) {
if (hasSetMode) {
gpu->InitClear();
}
gpu->SetDisplayFramebuffer(framebuf.topaddr, framebuf.pspFramebufLinesize, framebuf.pspFramebufFormat);
}
}
示例4: DoState
virtual void DoState(PointerWrap &p)
{
p.Do(nm);
p.Do(memoryBlockAddr);
p.DoMarker("Module");
}
示例5:
void GameListItem::EmuState::DoState(PointerWrap& p)
{
p.Do(rating);
p.Do(issues);
}
示例6: DoState
void DoState(PointerWrap &p)
{
p.Do(request_queue);
p.Do(reply_queue);
p.Do(last_reply_time);
for (const auto& entry : g_DeviceMap)
{
if (entry.second->IsHardware())
{
entry.second->DoState(p);
}
}
if (p.GetMode() == PointerWrap::MODE_READ)
{
for (u32 i=0; i<IPC_MAX_FDS; i++)
{
u32 exists = 0;
p.Do(exists);
if (exists)
{
u32 isHw = 0;
p.Do(isHw);
if (isHw)
{
u32 hwId = 0;
p.Do(hwId);
g_FdMap[i] = AccessDeviceByID(hwId);
}
else
{
g_FdMap[i] = std::make_shared<CWII_IPC_HLE_Device_FileIO>(i, "");
g_FdMap[i]->DoState(p);
}
}
else
{
g_FdMap[i].reset();
}
}
for (u32 i=0; i<ES_MAX_COUNT; i++)
{
p.Do(es_inuse[i]);
u32 handleID = es_handles[i]->GetDeviceID();
p.Do(handleID);
es_handles[i] = AccessDeviceByID(handleID);
}
}
else
{
for (auto& dev : g_FdMap)
{
u32 exists = dev ? 1 : 0;
p.Do(exists);
if (exists)
{
u32 isHw = dev->IsHardware() ? 1 : 0;
p.Do(isHw);
if (isHw)
{
u32 hwId = dev->GetDeviceID();
p.Do(hwId);
}
else
{
dev->DoState(p);
}
}
}
for (u32 i=0; i<ES_MAX_COUNT; i++)
{
p.Do(es_inuse[i]);
u32 handleID = es_handles[i]->GetDeviceID();
p.Do(handleID);
}
}
}
示例7: DoState
void ISOFileSystem::DoState(PointerWrap &p)
{
auto s = p.Section("ISOFileSystem", 1, 2);
if (!s)
return;
int n = (int) entries.size();
p.Do(n);
if (p.mode == p.MODE_READ)
{
entries.clear();
for (int i = 0; i < n; ++i)
{
u32 fd = 0;
OpenFileEntry of;
p.Do(fd);
p.Do(of.seekPos);
p.Do(of.isRawSector);
p.Do(of.isBlockSectorMode);
p.Do(of.sectorStart);
p.Do(of.openSize);
bool hasFile = false;
p.Do(hasFile);
if (hasFile) {
std::string path;
p.Do(path);
of.file = GetFromPath(path);
} else {
of.file = NULL;
}
entries[fd] = of;
}
}
else
{
for (EntryMap::iterator it = entries.begin(), end = entries.end(); it != end; ++it)
{
OpenFileEntry &of = it->second;
p.Do(it->first);
p.Do(of.seekPos);
p.Do(of.isRawSector);
p.Do(of.isBlockSectorMode);
p.Do(of.sectorStart);
p.Do(of.openSize);
bool hasFile = of.file != NULL;
p.Do(hasFile);
if (hasFile) {
std::string path = "";
path = EntryFullPath(of.file);
p.Do(path);
}
}
}
if (s >= 2) {
p.Do(lastReadBlock_);
} else {
lastReadBlock_ = 0;
}
}
示例8: __KernelSemaDoState
void __KernelSemaDoState(PointerWrap &p)
{
p.Do(semaWaitTimer);
CoreTiming::RestoreRegisterEvent(semaWaitTimer, "SemaphoreTimeout", __KernelSemaTimeout);
p.DoMarker("sceKernelSema");
}
示例9: __KernelDoState
void __KernelDoState(PointerWrap &p)
{
{
auto s = p.Section("Kernel", 1, 2);
if (!s)
return;
p.Do(kernelRunning);
kernelObjects.DoState(p);
if (s >= 2)
p.Do(registeredExitCbId);
}
{
auto s = p.Section("Kernel Modules", 1);
if (!s)
return;
__InterruptsDoState(p);
// Memory needs to be after kernel objects, which may free kernel memory.
__KernelMemoryDoState(p);
__KernelThreadingDoState(p);
__KernelAlarmDoState(p);
__KernelVTimerDoState(p);
__KernelEventFlagDoState(p);
__KernelMbxDoState(p);
__KernelModuleDoState(p);
__KernelMsgPipeDoState(p);
__KernelMutexDoState(p);
__KernelSemaDoState(p);
__KernelTimeDoState(p);
}
{
auto s = p.Section("HLE Modules", 1);
if (!s)
return;
__AtracDoState(p);
__AudioDoState(p);
__CccDoState(p);
__CtrlDoState(p);
__DisplayDoState(p);
__FontDoState(p);
__GeDoState(p);
__ImposeDoState(p);
__IoDoState(p);
__JpegDoState(p);
__Mp3DoState(p);
__MpegDoState(p);
__NetDoState(p);
__NetAdhocDoState(p);
__PowerDoState(p);
__PsmfDoState(p);
__PsmfPlayerDoState(p);
__RtcDoState(p);
__SasDoState(p);
__SslDoState(p);
__UmdDoState(p);
__UtilityDoState(p);
__UsbDoState(p);
__VaudioDoState(p);
__HeapDoState(p);
__PPGeDoState(p);
__CheatDoState(p);
__sceAudiocodecDoState(p);
__VideoPmpDoState(p);
__AACDoState(p);
}
{
auto s = p.Section("Kernel Cleanup", 1);
if (!s)
return;
__InterruptsDoStateLate(p);
__KernelThreadingDoStateLate(p);
Reporting::DoState(p);
}
}
示例10: DoAXState
void AXUCode::DoAXState(PointerWrap& p)
{
p.Do(m_cmdlist);
p.Do(m_cmdlist_size);
p.Do(m_samples_left);
p.Do(m_samples_right);
p.Do(m_samples_surround);
p.Do(m_samples_auxA_left);
p.Do(m_samples_auxA_right);
p.Do(m_samples_auxA_surround);
p.Do(m_samples_auxB_left);
p.Do(m_samples_auxB_right);
p.Do(m_samples_auxB_surround);
}
示例11: DoState
void MemoryCard::DoState(PointerWrap &p)
{
p.Do(card_index);
p.Do(memory_card_size);
p.DoArray(&m_memcard_data[0], memory_card_size);
}
示例12: DoState
void PsmfPlayer::DoState(PointerWrap &p) {
p.Do(videoCodec);
p.Do(videoStreamNum);
p.Do(audioCodec);
p.Do(audioStreamNum);
p.Do(playMode);
p.Do(playSpeed);
p.Do(displayBuffer);
p.Do(displayBufferSize);
p.Do(playbackThreadPriority);
p.Do(psmfMaxAheadTimestamp);
p.Do(psmfPlayerLastTimestamp);
p.DoMarker("PsmfPlayer");
}
示例13: DoState
void VirtualDiscFileSystem::DoState(PointerWrap &p)
{
int fileListSize = fileList.size();
int entryCount = entries.size();
p.Do(fileListSize);
p.Do(entryCount);
p.Do(currentBlockIndex);
if (p.mode == p.MODE_READ)
{
fileList.clear();
entries.clear();
for (int i = 0; i < fileListSize; i++)
{
FileListEntry entry;
p.Do(entry.fileName);
p.Do(entry.firstBlock);
p.Do(entry.totalSize);
fileList.push_back(entry);
}
for (int i = 0; i < entryCount; i++)
{
u32 fd;
OpenFileEntry of;
p.Do(fd);
p.Do(of.fileIndex);
p.Do(of.type);
p.Do(of.curOffset);
p.Do(of.startOffset);
p.Do(of.size);
// open file
if (of.type != VFILETYPE_ISO)
{
bool success = of.hFile.Open(basePath,fileList[of.fileIndex].fileName,FILEACCESS_READ);
if (!success)
{
ERROR_LOG(FILESYS, "Failed to create file handle for %s.",fileList[of.fileIndex].fileName.c_str());
} else {
if (of.type == VFILETYPE_LBN)
{
of.hFile.Seek(of.curOffset+of.startOffset,FILEMOVE_BEGIN);
} else {
of.hFile.Seek(of.curOffset,FILEMOVE_BEGIN);
}
}
}
entries[fd] = of;
}
} else {
for (int i = 0; i < fileListSize; i++)
{
p.Do(fileList[i].fileName);
p.Do(fileList[i].firstBlock);
p.Do(fileList[i].totalSize);
}
for (EntryMap::iterator it = entries.begin(), end = entries.end(); it != end; ++it)
{
OpenFileEntry &of = it->second;
p.Do(it->first);
p.Do(of.fileIndex);
p.Do(of.type);
p.Do(of.curOffset);
p.Do(of.startOffset);
p.Do(of.size);
}
}
p.DoMarker("VirtualDiscFileSystem");
}
示例14: DoState
void VirtualDiscFileSystem::DoState(PointerWrap &p)
{
auto s = p.Section("VirtualDiscFileSystem", 1);
if (!s)
return;
int fileListSize = (int)fileList.size();
int entryCount = (int)entries.size();
p.Do(fileListSize);
p.Do(entryCount);
p.Do(currentBlockIndex);
FileListEntry dummy = {""};
fileList.resize(fileListSize, dummy);
for (int i = 0; i < fileListSize; i++)
{
p.Do(fileList[i].fileName);
p.Do(fileList[i].firstBlock);
p.Do(fileList[i].totalSize);
}
if (p.mode == p.MODE_READ)
{
entries.clear();
for (int i = 0; i < entryCount; i++)
{
u32 fd = 0;
OpenFileEntry of;
p.Do(fd);
p.Do(of.fileIndex);
p.Do(of.type);
p.Do(of.curOffset);
p.Do(of.startOffset);
p.Do(of.size);
// open file
if (of.type != VFILETYPE_ISO) {
if (fileList[of.fileIndex].handler != NULL) {
of.handler = fileList[of.fileIndex].handler;
}
bool success = of.Open(basePath, fileList[of.fileIndex].fileName, FILEACCESS_READ);
if (!success) {
ERROR_LOG(FILESYS, "Failed to create file handle for %s.", fileList[of.fileIndex].fileName.c_str());
} else {
if (of.type == VFILETYPE_LBN) {
of.Seek(of.curOffset + of.startOffset, FILEMOVE_BEGIN);
} else {
of.Seek(of.curOffset, FILEMOVE_BEGIN);
}
}
}
entries[fd] = of;
}
} else {
for (EntryMap::iterator it = entries.begin(), end = entries.end(); it != end; ++it)
{
OpenFileEntry &of = it->second;
p.Do(it->first);
p.Do(of.fileIndex);
p.Do(of.type);
p.Do(of.curOffset);
p.Do(of.startOffset);
p.Do(of.size);
}
}
// We don't savestate handlers (loaded on fs load), but if they change, it may not load properly.
}
示例15: DoState
void PsmfPlayer::DoState(PointerWrap &p) {
p.Do(videoCodec);
p.Do(videoStreamNum);
p.Do(audioCodec);
p.Do(audioStreamNum);
p.Do(playMode);
p.Do(playSpeed);
p.Do(displayBuffer);
p.Do(displayBufferSize);
p.Do(playbackThreadPriority);
p.Do(psmfMaxAheadTimestamp);
p.Do(psmfPlayerLastTimestamp);
p.DoClass(mediaengine);
p.Do(filehandle);
p.Do(fileoffset);
p.Do(readSize);
p.Do(streamSize);
p.Do(status);
p.Do(psmfPlayerAvcAu);
p.DoMarker("PsmfPlayer");
}