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


C++ serializer::array方法代码示例

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


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

示例1:

void ICD2::serialize(serializer& s) {
  Thread::serialize(s);
  GameBoy::system.serialize_all(s);

  for(unsigned n = 0; n < 64; n++) s.array(packet[n].data);
  s.integer(packetsize);

  s.integer(joyp_id);
  s.integer(joyp15lock);
  s.integer(joyp14lock);
  s.integer(pulselock);
  s.integer(strobelock);
  s.integer(packetlock);
  s.array(joyp_packet.data);
  s.integer(packetoffset);
  s.integer(bitdata);
  s.integer(bitoffset);

  s.integer(r6000_ly);
  s.integer(r6000_row);
  s.integer(r6001);
  s.integer(r6003);
  s.integer(r6004);
  s.integer(r6005);
  s.integer(r6006);
  s.integer(r6007);
  s.array(r7000);
  s.integer(r7800);
  s.integer(mlt_req);

  s.array(lcd.buffer);
  s.array(lcd.output);
  s.integer(lcd.row);
}
开发者ID:Brunnis,项目名称:bsnes-mercury,代码行数:34,代码来源:serialization.cpp

示例2: serialize

void sBus::serialize(serializer &s) {
  s.array(memory::wram.data(), memory::wram.size());
  s.array(memory::apuram.data(), memory::apuram.size());
  s.array(memory::vram.data(), memory::vram.size());
  s.array(memory::oam.data(), memory::oam.size());
  s.array(memory::cgram.data(), memory::cgram.size());
}
开发者ID:BadyRaty,项目名称:Mednafen-Core,代码行数:7,代码来源:serialization.cpp

示例3:

void SPC7110::serialize(serializer &s) {
  s.array(ram.data(), ram.size());

  s.integer(r4801);
  s.integer(r4802);
  s.integer(r4803);
  s.integer(r4804);
  s.integer(r4805);
  s.integer(r4806);
  s.integer(r4807);
  s.integer(r4809);
  s.integer(r480a);
  s.integer(r480b);
  s.integer(r480c);

  s.integer(dcu_pending);
  s.integer(dcu_mode);
  s.integer(dcu_addr);
  s.integer(dcu_offset);
  s.array(dcu_tile);
  decompressor->serialize(s);

  s.integer(r4810);
  s.integer(r4811);
  s.integer(r4812);
  s.integer(r4813);
  s.integer(r4814);
  s.integer(r4815);
  s.integer(r4816);
  s.integer(r4817);
  s.integer(r4818);
  s.integer(r481a);

  s.integer(r4820);
  s.integer(r4821);
  s.integer(r4822);
  s.integer(r4823);
  s.integer(r4824);
  s.integer(r4825);
  s.integer(r4826);
  s.integer(r4827);
  s.integer(r4828);
  s.integer(r4829);
  s.integer(r482a);
  s.integer(r482b);
  s.integer(r482c);
  s.integer(r482d);
  s.integer(r482e);
  s.integer(r482f);

  s.integer(mul_pending);
  s.integer(div_pending);

  s.integer(r4830);
  s.integer(r4831);
  s.integer(r4832);
  s.integer(r4833);
  s.integer(r4834);
}
开发者ID:zeromus,项目名称:dasShiny,代码行数:59,代码来源:serialization.cpp

示例4: serialize

void DSP::serialize(serializer& s) {
  Thread::serialize(s);

  s.array(state.regs, 128);
  state.echoHistory[0].serialize(s);
  state.echoHistory[1].serialize(s);
  s.integer(state.echoHistoryOffset);

  s.integer(state.everyOtherSample);
  s.integer(state.kon);
  s.integer(state.noise);
  s.integer(state.counter);
  s.integer(state.echoOffset);
  s.integer(state.echoLength);

  s.integer(state.konBuffer);
  s.integer(state.endxBuffer);
  s.integer(state.envxBuffer);
  s.integer(state.outxBuffer);

  s.integer(state._pmon);
  s.integer(state._non);
  s.integer(state._eon);
  s.integer(state._dir);
  s.integer(state._koff);

  s.integer(state._brrNextAddress);
  s.integer(state._adsr0);
  s.integer(state._brrHeader);
  s.integer(state._brrByte);
  s.integer(state._srcn);
  s.integer(state._esa);
  s.integer(state._echoDisabled);

  s.integer(state._dirAddress);
  s.integer(state._pitch);
  s.integer(state._output);
  s.integer(state._looped);
  s.integer(state._echoPointer);

  s.array(state._mainOut, 2);
  s.array(state._echoOut, 2);
  s.array(state._echoIn, 2);

  for(auto n : range(8)) {
    voice[n].buffer.serialize(s);
    s.integer(voice[n].bufferOffset);
    s.integer(voice[n].gaussianOffset);
    s.integer(voice[n].brrAddress);
    s.integer(voice[n].brrOffset);
    s.integer(voice[n].vbit);
    s.integer(voice[n].vidx);
    s.integer(voice[n].konDelay);
    s.integer(voice[n].envelopeMode);
    s.integer(voice[n].envelope);
    s.integer(voice[n].hiddenEnvelope);
    s.integer(voice[n]._envxOut);
  }
}
开发者ID:Asvel,项目名称:higan-compromise,代码行数:59,代码来源:serialization.cpp

示例5:

void Cx4::serialize(serializer &s) {
  Processor::serialize(s);

  for(auto& n : stack) s.integer(n);
  s.integer(opcode);

  s.integer(regs.halt);
  s.integer(regs.cachePage);
  s.integer(regs.irqPending);
  
  s.integer(regs.rwbusaddr);
  s.integer(regs.rwbustime);
  s.integer(regs.writebus);
  s.integer(regs.writebusdata);

  s.integer(regs.pc);
  s.integer(regs.p);
  s.integer(regs.n);
  s.integer(regs.z);
  s.integer(regs.v);
  s.integer(regs.c);

  s.integer(regs.a);
  s.integer(regs.acch);
  s.integer(regs.accl);
  s.integer(regs.busdata);
  s.integer(regs.romdata);
  s.integer(regs.ramdata);
  s.integer(regs.busaddr);
  s.integer(regs.ramaddr);
  for(auto& n : regs.gpr) s.integer(n);
  s.integer(regs.mdr);

  s.integer(mmio.dma);
  s.integer(mmio.suspend);
  s.integer(mmio.cacheLoading);
  s.integer(mmio.dmaSource);
  s.integer(mmio.dmaLength);
  s.integer(mmio.dmaTarget);
  s.integer(mmio.cachePreload);
  s.integer(mmio.programOffset);
  s.integer(mmio.pageNumber);
  s.integer(mmio.programCounter);
  s.integer(mmio.romSpeed);
  s.integer(mmio.ramSpeed);
  s.integer(mmio.irqDisable);
  s.integer(mmio.r1f52);
  s.integer(mmio.suspendCycles);
  s.array(mmio.vector);
  
  for(auto& page : cache) {
    s.integer(page.lock);
    s.integer(page.pageNumber);
    s.array(page.data);
  }
}
开发者ID:devinacker,项目名称:bsnes-plus,代码行数:56,代码来源:serialization.cpp

示例6: serialize

void PPUcounter::serialize(serializer &s) {
  s.integer(status.interlace);
  s.integer(status.field);
  s.integer(status.vcounter);
  s.integer(status.hcounter);

  s.array(history.field);
  s.array(history.vcounter);
  s.array(history.hcounter);
  s.integer(history.index);
}
开发者ID:BadyRaty,项目名称:Mednafen-Core,代码行数:11,代码来源:serialization.cpp

示例7: serialize

void Cartridge::serialize(serializer &s) {
  if(memory::cartram.size() != 0 && memory::cartram.size() != ~0) {
    s.array(memory::cartram.data(), memory::cartram.size());
  }

  if(memory::cartrtc.size() != 0 && memory::cartrtc.size() != ~0) {
    s.array(memory::cartrtc.data(), memory::cartrtc.size());
  }

  if(memory::bsxram.size() != 0 && memory::bsxram.size() != ~0) {
    s.array(memory::bsxram.data(), memory::bsxram.size());
  }

  if(memory::bsxpram.size() != 0 && memory::bsxpram.size() != ~0) {
    s.array(memory::bsxpram.data(), memory::bsxpram.size());
  }

  if(memory::stAram.size() != 0 && memory::stAram.size() != ~0) {
    s.array(memory::stAram.data(), memory::stAram.size());
  }

  if(memory::stBram.size() != 0 && memory::stBram.size() != ~0) {
    s.array(memory::stBram.data(), memory::stBram.size());
  }

  if(memory::gbram.size() != 0 && memory::gbram.size() != ~0) {
    s.array(memory::gbram.data(), memory::gbram.size());
  }

  if(memory::gbrtc.size() != 0 && memory::gbrtc.size() != ~0) {
    s.array(memory::gbrtc.data(), memory::gbrtc.size());
  }
}
开发者ID:BadyRaty,项目名称:Mednafen-Core,代码行数:33,代码来源:serialization.cpp

示例8: serialize

void SuperScope::serialize(serializer& s) {
  Processor::serialize(s);
  //Save block.
  unsigned char block[Controller::SaveSize] = {0};
  block[0] = latched ? 1 : 0;
  block[1] = counter;
  block[2] = trigger ? 1 : 0;
  block[3] = cursor ? 1 : 0;
  block[4] = turbo ? 1 : 0;
  block[5] = pause ? 1 : 0;
  block[6] = offscreen ? 1 : 0;
  block[7] = (unsigned short)x >> 8;
  block[8] = (unsigned short)x;
  block[9] = (unsigned short)y >> 8;
  block[10] = (unsigned short)y;

  s.array(block, Controller::SaveSize);
  if(s.mode() == nall::serializer::Load) {
    latched = (block[0] != 0);
    counter = block[1];
    trigger = (block[2] != 0);
    cursor = (block[3] != 0);
    turbo = (block[4] != 0);
    pause = (block[5] != 0);
    offscreen = (block[6] != 0);
    x = (short)(((unsigned short)block[7] << 8) | (unsigned short)block[8]);
    y = (short)(((unsigned short)block[9] << 8) | (unsigned short)block[10]);
  }
}
开发者ID:RetroAchievements,项目名称:RASuite,代码行数:29,代码来源:superscope.cpp

示例9: unserialize

bool System::unserialize(serializer& s) {
  unsigned signature, version;
  char hash[64], description[512];

  s.integer(signature);
  s.integer(version);
  s.array(hash);
  s.array(description);

  if(signature != 0x31545342) return false;
  if(version != Info::SerializerVersion) return false;

  power();
  serialize_all(s);
  return true;
}
开发者ID:quequotion,项目名称:higan-qq,代码行数:16,代码来源:serialization.cpp

示例10: serialize

void PPUcounter::serialize(serializer &s) {
  s.integer(status.hcounter);
  s.integer(status.vcounter);
  s.integer(status.lineclocks);
  s.integer(status.prev_lineclocks);
  s.array(status.fieldlines);
  s.integer(status.field);
}
开发者ID:Hedrig,项目名称:bsnes-classic,代码行数:8,代码来源:serialization.cpp

示例11:

void PPU::Sprite::serialize(serializer& s) {
  for(unsigned i = 0; i < 128; i++) {
    s.integer(list[i].x);
    s.integer(list[i].y);
    s.integer(list[i].character);
    s.integer(list[i].nameselect);
    s.integer(list[i].vflip);
    s.integer(list[i].hflip);
    s.integer(list[i].priority);
    s.integer(list[i].palette);
    s.integer(list[i].size);
  }

  s.integer(t.x);
  s.integer(t.y);

  s.integer(t.item_count);
  s.integer(t.tile_count);

  s.integer(t.active);
  for(unsigned n = 0; n < 2; n++) {
    s.array(t.item[n]);
    for(unsigned i = 0; i < 34; i++) {
      s.integer(t.tile[n][i].x);
      s.integer(t.tile[n][i].priority);
      s.integer(t.tile[n][i].palette);
      s.integer(t.tile[n][i].hflip);
      s.integer(t.tile[n][i].d0);
      s.integer(t.tile[n][i].d1);
      s.integer(t.tile[n][i].d2);
      s.integer(t.tile[n][i].d3);
    }
  }

  s.integer(regs.main_enable);
  s.integer(regs.sub_enable);
  s.integer(regs.interlace);

  s.integer(regs.base_size);
  s.integer(regs.nameselect);
  s.integer(regs.tiledata_addr);
  s.integer(regs.first_sprite);

  s.integer(regs.priority0);
  s.integer(regs.priority1);
  s.integer(regs.priority2);
  s.integer(regs.priority3);

  s.integer(regs.time_over);
  s.integer(regs.range_over);

  s.integer(output.main.priority);
  s.integer(output.main.palette);

  s.integer(output.sub.priority);
  s.integer(output.sub.palette);
}
开发者ID:Brunnis,项目名称:bsnes-mercury,代码行数:57,代码来源:serialization.cpp

示例12: serialize

void SMP::serialize(serializer& s) {
  Thread::serialize(s);

  s.array(apuram, 64 * 1024);

  s.integer(opcode_number);
  s.integer(opcode_cycle);

  s.integer(regs.pc);
  s.integer(regs.sp);
  s.integer(regs.a);
  s.integer(regs.x);
  s.integer(regs.y);

  s.integer(regs.p.n);
  s.integer(regs.p.v);
  s.integer(regs.p.p);
  s.integer(regs.p.b);
  s.integer(regs.p.h);
  s.integer(regs.p.i);
  s.integer(regs.p.z);
  s.integer(regs.p.c);

  s.integer(rd);
  s.integer(wr);
  s.integer(dp);
  s.integer(sp);
  s.integer(ya);
  s.integer(bit);

  s.integer(status.iplrom_enable);

  s.integer(status.dsp_addr);

  s.integer(status.ram00f8);
  s.integer(status.ram00f9);

  s.integer(timer0.enable);
  s.integer(timer0.target);
  s.integer(timer0.stage1_ticks);
  s.integer(timer0.stage2_ticks);
  s.integer(timer0.stage3_ticks);

  s.integer(timer1.enable);
  s.integer(timer1.target);
  s.integer(timer1.stage1_ticks);
  s.integer(timer1.stage2_ticks);
  s.integer(timer1.stage3_ticks);

  s.integer(timer2.enable);
  s.integer(timer2.target);

  s.integer(timer2.stage1_ticks);
  s.integer(timer2.stage2_ticks);
  s.integer(timer2.stage3_ticks);
}
开发者ID:Brunnis,项目名称:bsnes-mercury,代码行数:56,代码来源:smp.cpp

示例13: serialize

void serialize(serializer &s) {
  Board::serialize(s);

  s.integer(prg_bank);
  s.integer(chr_bank[0][0]);
  s.integer(chr_bank[0][1]);
  s.integer(chr_bank[1][0]);
  s.integer(chr_bank[1][1]);
  s.integer(mirror);
  s.array(latch);
}
开发者ID:zeromus,项目名称:dasShiny,代码行数:11,代码来源:nes-fxrom.cpp

示例14: serialize

void Gamepad::serialize(serializer& s) {
  Processor::serialize(s);
  //Save block.
  unsigned char block[Controller::SaveSize] = {0};
  block[0] = latched ? 1 : 0;
  block[1] = counter;
  s.array(block, Controller::SaveSize);
  if(s.mode() == nall::serializer::Load) {
    latched = (block[0] != 0);
    counter = block[1];
  }
}
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:12,代码来源:gamepad.cpp

示例15:

void DSP2::serialize(serializer &s) {
  s.integer(status.waiting_for_command);
  s.integer(status.command);
  s.integer(status.in_count);
  s.integer(status.in_index);
  s.integer(status.out_count);
  s.integer(status.out_index);

  s.array(status.parameters);
  s.array(status.output);

  s.integer(status.op05transparent);
  s.integer(status.op05haslen);
  s.integer(status.op05len);
  s.integer(status.op06haslen);
  s.integer(status.op06len);
  s.integer(status.op09word1);
  s.integer(status.op09word2);
  s.integer(status.op0dhaslen);
  s.integer(status.op0doutlen);
  s.integer(status.op0dinlen);
}
开发者ID:BadyRaty,项目名称:Mednafen-Core,代码行数:22,代码来源:serialization.cpp


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