本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}