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


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

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


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

示例1:

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

  s.integer(mmio.data_offset);
  s.integer(mmio.audio_offset);
  s.integer(mmio.audio_loop_offset);

  s.integer(mmio.audio_track);
  s.integer(mmio.audio_volume);

  s.integer(mmio.data_busy);
  s.integer(mmio.audio_busy);
  s.integer(mmio.audio_repeat);
  s.integer(mmio.audio_play);
  s.integer(mmio.audio_error);

  if(datafile.open()) datafile.close();
  if(datafile.open(string(cartridge.basename(), ".msu"), file::mode::read)) {
    datafile.seek(mmio.data_offset);
  }

  if(audiofile.open()) audiofile.close();
  if(audiofile.open(string(cartridge.basename(), "-", mmio.audio_track, ".pcm"), file::mode::read)) {
    audiofile.seek(mmio.audio_offset);
  }
}
开发者ID:Arnethegreat,项目名称:bsnes-plus,代码行数:26,代码来源:serialization.cpp

示例2: serialize

 void serialize(serializer &s) {
   s.integer(basecounter);
   s.integer(heapsize);
   for(unsigned n = 0; n < heapcapacity; n++) {
     s.integer(heap[n].counter);
     s.integer(heap[n].event);
   }
 }
开发者ID:CatalystG,项目名称:mednafen-libretro,代码行数:8,代码来源:priorityqueue.hpp

示例3: 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

示例4:

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

  s.integer(mmio.data_offset);
  s.integer(mmio.audio_offset);
  s.integer(mmio.audio_loop_offset);

  s.integer(mmio.audio_track);
  s.integer(mmio.audio_volume);

  s.integer(mmio.data_busy);
  s.integer(mmio.audio_busy);
  s.integer(mmio.audio_repeat);
  s.integer(mmio.audio_play);

  if(datafile.open()) datafile.close();
  if(datafile.open({interface->path(0), "msu1.rom"}, file::mode::read)) {
    datafile.seek(mmio.data_offset);
  }

  if(audiofile.open()) audiofile.close();
  if(audiofile.open({interface->path(0), "track-", mmio.audio_track, ".pcm"}, file::mode::read)) {
    audiofile.seek(mmio.audio_offset);
  }
}
开发者ID:IcooN,项目名称:OpenEmu,代码行数:25,代码来源:serialization.cpp

示例5: 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

示例6: 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

示例7: serialize

void PPU::serialize(serializer &s) {
  PPUcounter::serialize(s);

  s.integer(status.render_output);
  s.integer(status.frame_executed);
  s.integer(status.frames_updated);
  s.integer(status.frames_rendered);
  s.integer(status.frames_executed);

  s.integer(ppu1_version);
  s.integer(ppu2_version);
}
开发者ID:CatalystG,项目名称:mednafen-libretro,代码行数:12,代码来源:serialization.cpp

示例8: serialize

void System::serialize(serializer &s) {
  s.integer((unsigned&)region);
  s.integer((unsigned&)expansion);

  s.integer(scheduler.clock.cpu_freq);
  s.integer(scheduler.clock.smp_freq);

  s.integer(scheduler.clock.cpucop);
  s.integer(scheduler.clock.cpuppu);
  s.integer(scheduler.clock.cpusmp);
  s.integer(scheduler.clock.smpdsp);
}
开发者ID:BigEd,项目名称:snes-sdk,代码行数:12,代码来源:serialization.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 serialize(serializer &s) {
  Board::serialize(s);

  s.integer(mmu_port);
  s.integer(apu_port);

  s.array(prg_bank);
  s.array(chr_bank);
  s.integer(mirror);
  s.integer(irq_enable);
  s.integer(irq_counter_enable);
  s.integer(irq_counter);

  pulse[0].serialize(s);
  pulse[1].serialize(s);
  pulse[2].serialize(s);
}
开发者ID:and0p,项目名称:bnes-libretro,代码行数:17,代码来源:sunsoft-5b.cpp

示例11: unserialize

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

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

  if(signature != 0x31545342) return false;
  if(version != bsnesSerializerVersion) return false;
//if(crc32 != cartridge.crc32()) return false;
  scheduler.init();

  serialize_all(s);
  return true;
}
开发者ID:BigEd,项目名称:snes-sdk,代码行数:17,代码来源:serialization.cpp

示例12:

void HSU1::serialize(serializer& s) {
  s.integer(txbusy);
  s.integer(rxbusy);
  s.integer(txlatch);

  unsigned size;

  size = txbuffer.size();
  s.integer(size);
  txbuffer.resize(size);
  s.array(txbuffer.data(), txbuffer.size());

  size = rxbuffer.size();
  s.integer(size);
  rxbuffer.resize(size);
  s.array(rxbuffer.data(), rxbuffer.size());
}
开发者ID:Brunnis,项目名称:bsnes-mercury,代码行数:17,代码来源:serialization.cpp

示例13: serialize

void serialize(serializer &s) {
  s.array(prg_bank);
  s.array(chr_bank);
  s.integer(mirror);

  s.integer(irq_latch);
  s.integer(irq_mode);
  s.integer(irq_enable);
  s.integer(irq_acknowledge);

  s.integer(irq_counter);
  s.integer(irq_scalar);
  s.integer(irq_line);
}
开发者ID:IcooN,项目名称:OpenEmu,代码行数:14,代码来源:vrc7.cpp

示例14: serialize

void ArmDSP::serialize(serializer &s) {
  ARM::serialize(s);
  Thread::serialize(s);

  s.array(programRAM, 16 * 1024);

  s.integer(bridge.cputoarm.ready);
  s.integer(bridge.cputoarm.data);
  s.integer(bridge.armtocpu.ready);
  s.integer(bridge.armtocpu.data);
  s.integer(bridge.timer);
  s.integer(bridge.timerlatch);
  s.integer(bridge.reset);
  s.integer(bridge.ready);
  s.integer(bridge.signal);
}
开发者ID:IcooN,项目名称:OpenEmu,代码行数:16,代码来源:serialization.cpp

示例15: serialize

void serialize(serializer &s) {
  s.integer(prg_bank);
  s.integer(irq_mode);
  s.integer(irq_enable);
  s.integer(irq_acknowledge);
  s.integer(irq_latch);
  s.integer(irq_counter.w);
  s.integer(irq_line);
}
开发者ID:IcooN,项目名称:OpenEmu,代码行数:9,代码来源:vrc3.cpp


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