本文整理汇总了C++中PointerWrap::DoArray方法的典型用法代码示例。如果您正苦于以下问题:C++ PointerWrap::DoArray方法的具体用法?C++ PointerWrap::DoArray怎么用?C++ PointerWrap::DoArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PointerWrap
的用法示例。
在下文中一共展示了PointerWrap::DoArray方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoState
void DoState(PointerWrap &p) {
auto s = p.Section("MpegContext", 1);
if (!s)
return;
p.DoArray(mpegheader, 2048);
p.Do(defaultFrameWidth);
p.Do(videoFrameCount);
p.Do(audioFrameCount);
p.Do(endOfAudioReached);
p.Do(endOfVideoReached);
p.Do(videoPixelMode);
p.Do(mpegMagic);
p.Do(mpegVersion);
p.Do(mpegRawVersion);
p.Do(mpegOffset);
p.Do(mpegStreamSize);
p.Do(mpegFirstTimestamp);
p.Do(mpegLastTimestamp);
p.Do(mpegFirstDate);
p.Do(mpegLastDate);
p.Do(mpegRingbufferAddr);
p.DoArray(esBuffers, NUM_ES_BUFFERS);
p.Do(avc);
p.Do(avcRegistered);
p.Do(atracRegistered);
p.Do(pcmRegistered);
p.Do(dataRegistered);
p.Do(ignoreAtrac);
p.Do(ignorePcm);
p.Do(ignoreAvc);
p.Do(isAnalyzed);
p.Do<u32, StreamInfo>(streamMap);
p.DoClass(mediaengine);
}
示例2: DoState
void DoState(PointerWrap &p)
{
auto s = p.Section("Memory", 1, 2);
if (!s)
return;
if (s < 2) {
if (!g_RemasterMode)
g_MemorySize = RAM_NORMAL_SIZE;
g_PSPModel = PSP_MODEL_FAT;
} else {
u32 oldMemorySize = g_MemorySize;
p.Do(g_PSPModel);
p.DoMarker("PSPModel");
if (!g_RemasterMode) {
g_MemorySize = g_PSPModel == PSP_MODEL_FAT ? RAM_NORMAL_SIZE : RAM_DOUBLE_SIZE;
if (oldMemorySize < g_MemorySize) {
Shutdown();
Init();
}
}
}
p.DoArray(GetPointer(PSP_GetKernelMemoryBase()), g_MemorySize);
p.DoMarker("RAM");
p.DoArray(m_pVRAM, VRAM_SIZE);
p.DoMarker("VRAM");
p.DoArray(m_pScratchPad, SCRATCHPAD_SIZE);
p.DoMarker("ScratchPad");
}
示例3: DoState
void SavedataParam::DoState(PointerWrap &p)
{
auto s = p.Section("SavedataParam", 1);
if (!s)
return;
// pspParam is handled in PSPSaveDialog.
p.Do(selectedSave);
p.Do(saveDataListCount);
p.Do(saveNameListDataCount);
if (p.mode == p.MODE_READ)
{
if (saveDataList != NULL)
delete [] saveDataList;
if (saveDataListCount != 0)
{
saveDataList = new SaveFileInfo[saveDataListCount];
p.DoArray(saveDataList, saveDataListCount);
}
else
saveDataList = NULL;
}
else
p.DoArray(saveDataList, saveDataListCount);
}
示例4: DoState
void DoState(PointerWrap &p)
{
p.DoArray(m_pRAM, RAM_SIZE);
p.DoMarker("RAM");
p.DoArray(m_pVRAM, VRAM_SIZE);
p.DoMarker("VRAM");
p.DoArray(m_pScratchPad, SCRATCHPAD_SIZE);
p.DoMarker("ScratchPad");
}
示例5: DoState
void DSPLLE::DoState(PointerWrap &p)
{
bool isHLE = false;
p.Do(isHLE);
if (isHLE != false && p.GetMode() == PointerWrap::MODE_READ)
{
Core::DisplayMessage("State is incompatible with current DSP engine. Aborting load state.", 3000);
p.SetMode(PointerWrap::MODE_VERIFY);
return;
}
p.Do(g_dsp.r);
p.Do(g_dsp.pc);
#if PROFILE
p.Do(g_dsp.err_pc);
#endif
p.Do(g_dsp.cr);
p.Do(g_dsp.reg_stack_ptr);
p.Do(g_dsp.exceptions);
p.Do(g_dsp.external_interrupt_waiting);
for (int i = 0; i < 4; i++)
{
p.Do(g_dsp.reg_stack[i]);
}
p.Do(g_dsp.step_counter);
p.Do(g_dsp.ifx_regs);
p.Do(g_dsp.mbox[0]);
p.Do(g_dsp.mbox[1]);
UnWriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false);
p.DoArray(g_dsp.iram, DSP_IRAM_SIZE);
WriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false);
if (p.GetMode() == PointerWrap::MODE_READ)
DSPHost::CodeLoaded((const u8*)g_dsp.iram, DSP_IRAM_BYTE_SIZE);
p.DoArray(g_dsp.dram, DSP_DRAM_SIZE);
p.Do(cyclesLeft);
p.Do(init_hax);
p.Do(m_cycle_count);
bool prevInitMixer = m_InitMixer;
p.Do(m_InitMixer);
if (prevInitMixer != m_InitMixer && p.GetMode() == PointerWrap::MODE_READ)
{
if (m_InitMixer)
{
InitMixer();
AudioCommon::PauseAndLock(true);
}
else
{
AudioCommon::PauseAndLock(false);
soundStream->Stop();
delete soundStream;
soundStream = nullptr;
}
}
}
示例6: DoState
void PixelShaderManager::DoState(PointerWrap &p)
{
p.DoArray(s_tev_color);
p.DoArray(s_tev_konst_color);
if (p.GetMode() == PointerWrap::MODE_READ)
{
// Reload current state from global GPU state
// NOTE: This requires that all GPU memory has been loaded already.
Dirty();
}
}
示例7: DoState
void SWVertexLoader::DoState(PointerWrap &p)
{
p.DoArray(m_AttributeLoaders, sizeof m_AttributeLoaders);
p.Do(m_VertexSize);
p.Do(*m_CurrentVat);
p.Do(m_positionLoader);
p.Do(m_normalLoader);
p.DoArray(m_colorLoader, sizeof m_colorLoader);
p.Do(m_NumAttributeLoaders);
m_SetupUnit->DoState(p);
p.Do(m_TexGenSpecialCase);
}
示例8: DoState
void DoState(PointerWrap &p)
{
auto s = p.Section("Memory", 1);
if (!s)
return;
p.DoArray(m_pRAM, g_MemorySize);
p.DoMarker("RAM");
p.DoArray(m_pVRAM, VRAM_SIZE);
p.DoMarker("VRAM");
p.DoArray(m_pScratchPad, SCRATCHPAD_SIZE);
p.DoMarker("ScratchPad");
}
示例9: DoState
void DoState(PointerWrap &p)
{
bool wii = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
p.DoArray(m_pRAM, RAM_SIZE);
p.DoArray(m_pL1Cache, L1_CACHE_SIZE);
p.DoMarker("Memory RAM");
if (bFakeVMEM)
p.DoArray(m_pFakeVMEM, FAKEVMEM_SIZE);
p.DoMarker("Memory FakeVMEM");
if (wii)
p.DoArray(m_pEXRAM, EXRAM_SIZE);
p.DoMarker("Memory EXRAM");
}
示例10: DoCPState
void DoCPState(PointerWrap& p)
{
p.DoArray(g_main_cp_state.array_bases);
p.DoArray(g_main_cp_state.array_strides);
p.Do(g_main_cp_state.matrix_index_a);
p.Do(g_main_cp_state.matrix_index_b);
p.Do(g_main_cp_state.vtx_desc.Hex);
p.DoArray(g_main_cp_state.vtx_attr);
p.DoMarker("CP Memory");
if (p.mode == PointerWrap::MODE_READ)
{
g_main_cp_state.bases_dirty = true;
}
}
示例11: DoState
void DoState(PointerWrap &p)
{
p.DoArray(m_pRAM, g_MemorySize);
p.DoMarker("RAM");
p.DoArray(m_pVRAM, VRAM_SIZE);
p.DoMarker("VRAM");
p.DoArray(m_pScratchPad, SCRATCHPAD_SIZE);
p.DoMarker("ScratchPad");
p.Do(g_RemasterMode); // TODO: Need to test more if this and MemoryMask need to be saved in the state
p.DoMarker("RemasterMode");
p.Do(g_MemoryMask);
p.DoMarker("MemoryMask");
p.Do(g_DoubleTextureCoordinates); // TODO: Is there a more appropriate place for this?
p.DoMarker("DoubleTextureCoordinates");
}
示例12: DoState
void MediaEngine::DoState(PointerWrap &p){
auto s = p.Section("MediaEngine", 1);
if (!s)
return;
p.Do(m_videoStream);
p.Do(m_audioStream);
p.DoArray(m_mpegheader, sizeof(m_mpegheader));
p.Do(m_ringbuffersize);
u32 hasloadStream = m_pdata != NULL;
p.Do(hasloadStream);
if (hasloadStream && p.mode == p.MODE_READ)
loadStream(m_mpegheader, 2048, m_ringbuffersize);
#ifdef USE_FFMPEG
u32 hasopencontext = m_pFormatCtx != NULL;
#else
u32 hasopencontext = false;
#endif
p.Do(hasopencontext);
if (hasopencontext && p.mode == p.MODE_READ)
openContext();
if (m_pdata)
m_pdata->DoState(p);
if (m_demux)
m_demux->DoState(p);
p.Do(m_videopts);
p.Do(m_audiopts);
p.Do(m_isVideoEnd);
p.Do(m_noAudioData);
}
示例13: DoState
void MediaEngine::DoState(PointerWrap &p) {
p.Do(m_videoStream);
p.Do(m_audioStream);
p.DoArray(m_mpegheader, sizeof(m_mpegheader));
p.Do(m_ringbuffersize);
u32 hasloadStream = m_pdata != NULL;
p.Do(hasloadStream);
if (hasloadStream && p.mode == p.MODE_READ)
loadStream(m_mpegheader, 2048, m_ringbuffersize);
u32 hasopencontext = m_pFormatCtx != NULL;
p.Do(hasopencontext);
if (hasopencontext && p.mode == p.MODE_READ)
openContext();
if (m_pdata)
m_pdata->DoState(p);
if (m_demux)
m_demux->DoState(p);
p.Do(m_videopts);
p.Do(m_audiopts);
p.Do(m_isVideoEnd);
p.Do(m_noAudioData);
p.DoMarker("MediaEngine");
}
示例14: Fifo_DoState
void Fifo_DoState(PointerWrap &p)
{
p.DoArray(videoBuffer, FIFO_SIZE);
p.Do(size);
p.DoPointer(g_pVideoData, videoBuffer);
p.Do(g_bSkipCurrentFrame);
}
示例15: __sceAudiocodecDoState
void __sceAudiocodecDoState(PointerWrap &p){
auto s = p.Section("AudioList", 0, 2);
if (!s) {
oldStateLoaded = true;
return;
}
int count = (int)audioList.size();
p.Do(count);
if (count > 0) {
if (p.mode == PointerWrap::MODE_READ) {
clearDecoders();
// loadstate if audioList is nonempty
auto codec_ = new int[count];
auto ctxPtr_ = new u32[count];
p.DoArray(codec_, s >= 2 ? count : (int)ARRAY_SIZE(codec_));
p.DoArray(ctxPtr_, s >= 2 ? count : (int)ARRAY_SIZE(ctxPtr_));
for (int i = 0; i < count; i++) {
auto decoder = new SimpleAudio(codec_[i]);
decoder->SetCtxPtr(ctxPtr_[i]);
audioList[ctxPtr_[i]] = decoder;
}
delete[] codec_;
delete[] ctxPtr_;
}
else
{
// savestate if audioList is nonempty
// Some of this is only necessary in Write but won't really hurt Measure.
auto codec_ = new int[count];
auto ctxPtr_ = new u32[count];
int i = 0;
for (auto it = audioList.begin(), end = audioList.end(); it != end; it++) {
const SimpleAudio *decoder = it->second;
codec_[i] = decoder->GetAudioType();
ctxPtr_[i] = decoder->GetCtxPtr();
i++;
}
p.DoArray(codec_, count);
p.DoArray(ctxPtr_, count);
delete[] codec_;
delete[] ctxPtr_;
}
}
}