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


C++ saveStateClose函数代码示例

本文整理汇总了C++中saveStateClose函数的典型用法代码示例。如果您正苦于以下问题:C++ saveStateClose函数的具体用法?C++ saveStateClose怎么用?C++ saveStateClose使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: loadState

static void loadState(RomMapperKonami5* rm)
{
    SaveState* state = saveStateOpenForRead("mapperKonami5");
    char tag[16];
    int i;

    for (i = 0; i < 4; i++) {
        sprintf(tag, "romMapper%d", i);
        rm->romMapper[i] = saveStateGet(state, tag, 0);
    }
    
    rm->sccEnable = saveStateGet(state, "sccEnable", 0);

    saveStateClose(state);

    sccLoadState(rm->scc);

    for (i = 0; i < 4; i++) {   
        slotMapPage(rm->slot, rm->sslot, rm->startPage + i, rm->romData + rm->romMapper[i] * 0x2000, 1, 0);
    }
    
    if (rm->sccEnable) {
        slotMapPage(rm->slot, rm->sslot, rm->startPage + 2, rm->romData + rm->romMapper[2] * 0x2000, 0, 0);
    }
    else {
        slotMapPage(rm->slot, rm->sslot, rm->startPage + 2, rm->romData + rm->romMapper[2] * 0x2000, 1, 0);
    }
}
开发者ID:Chegwin,项目名称:GBA4iOS-2.0-Beta-4,代码行数:28,代码来源:romMapperKonami5.c

示例2: tapeSaveState

void tapeSaveState() {
    SaveState* state = saveStateOpenForWrite("tape");

    saveStateSet(state, "ramImagePos",  ramImagePos);

    saveStateClose(state);
}
开发者ID:kkklatu,项目名称:blueMSX-libretro,代码行数:7,代码来源:Casette.c

示例3: wd2793SaveState

void wd2793SaveState(WD2793* wd)
{
    SaveState* state = saveStateOpenForWrite("wd2793");

    saveStateSet(state, "step",            wd->step);
    saveStateSet(state, "curStep",         wd->curStep);
    saveStateSet(state, "stepTime",        wd->stepTime);
    saveStateSet(state, "regStatus",       wd->regStatus);
    saveStateSet(state, "regCommand",      wd->regCommand);
    saveStateSet(state, "regSector",       wd->regSector);
    saveStateSet(state, "regTrack",        wd->regTrack);
    saveStateSet(state, "regData",         wd->regData);
    saveStateSet(state, "immediateInt",    wd->immediateInt);
    saveStateSet(state, "intRequest",      wd->intRequest);
    saveStateSet(state, "dataRequest",     wd->dataRequest);
    saveStateSet(state, "dataReady",       wd->dataReady);
    saveStateSet(state, "stepDirection",   wd->stepDirection);
    saveStateSet(state, "headLoaded",      wd->headLoaded);
    saveStateSet(state, "dataRequsetTime", wd->dataRequsetTime);
    saveStateSet(state, "drive",           wd->drive);
    saveStateSet(state, "sectorOffset",    wd->sectorOffset);
    saveStateSet(state, "dataAvailable",   wd->dataAvailable);
    saveStateSet(state, "diskTrack",       wd->diskTrack);
    saveStateSet(state, "diskTracks[0]",   wd->diskTracks[0]);
    saveStateSet(state, "diskTracks[1]",   wd->diskTracks[1]);
    saveStateSet(state, "diskTracks[2]",   wd->diskTracks[2]);
    saveStateSet(state, "diskTracks[3]",   wd->diskTracks[3]);
    saveStateSet(state, "diskSide",        wd->diskSide);
    saveStateSet(state, "diskDensity",     wd->diskDensity);

    saveStateSetBuffer(state, "sectorBuf", wd->sectorBuf, 512);

    saveStateClose(state);
}
开发者ID:imclab,项目名称:CocoaMSX,代码行数:34,代码来源:WD2793.c

示例4: y8950LoadState

void y8950LoadState(Y8950* y8950)
{
    SaveState* state = saveStateOpenForRead("msxaudio1");

    y8950->address       = (UInt8)saveStateGet(state, "address",       0);
    y8950->timerValue1   =        saveStateGet(state, "timerValue1",   0);
    y8950->timeout1      =        saveStateGet(state, "timeout1",      0);
    y8950->timerRunning1 =        saveStateGet(state, "timerRunning1", 0);
    y8950->timerValue2   =        saveStateGet(state, "timerValue2",   0);
    y8950->timerRunning2 =        saveStateGet(state, "timerRunning2", 0);
    y8950->timeout2      =        saveStateGet(state, "timeout2",      0);

    outd      = saveStateGet(state, "outd",      0);
    ams       = saveStateGet(state, "ams",       0);
    vib       = saveStateGet(state, "vib",       0);
    feedback2 = saveStateGet(state, "feedback2", 0);

    saveStateClose(state);

    Y8950LoadState(y8950->opl);
    YM_DELTAT_ADPCM_LoadState(y8950->opl->deltat);

    if (y8950->timerRunning1) {
        boardTimerAdd(y8950->timer1, y8950->timeout1);
    }

    if (y8950->timerRunning2) {
        boardTimerAdd(y8950->timer2, y8950->timeout2);
    }
}
开发者ID:imclab,项目名称:CocoaMSX,代码行数:30,代码来源:Y8950.c

示例5: ym2151LoadState

void ym2151LoadState(YM2151* ym2151)
{
    SaveState* state = saveStateOpenForRead("ym2151");

    ym2151->address       = (UInt8)saveStateGet(state, "address",       0);
    ym2151->latch         = (UInt8)saveStateGet(state, "latch",         0);
    ym2151->timerValue1   =        saveStateGet(state, "timerValue1",   0);
    ym2151->timerRunning1 =        saveStateGet(state, "timerRunning1", 0);
    ym2151->timeout1      =        saveStateGet(state, "timeout1",      0);
    ym2151->timerValue2   =        saveStateGet(state, "timerValue2",   0);
    ym2151->timerRunning2 =        saveStateGet(state, "timerRunning2", 0);
    ym2151->timeout2      =        saveStateGet(state, "timeout2",      0);
    ym2151->irqVector     = (UInt8)saveStateGet(state, "irqVector",     0);

    saveStateClose(state);

    YM2151LoadState(ym2151->opl);

    if (ym2151->timerRunning1) {
        boardTimerAdd(ym2151->timer1, ym2151->timeout1);
    }

    if (ym2151->timerRunning2) {
        boardTimerAdd(ym2151->timer2, ym2151->timeout2);
    }
}
开发者ID:meesokim,项目名称:bluemsx-wii,代码行数:26,代码来源:ym2151.c

示例6: wd2793LoadState

void wd2793LoadState(WD2793* wd)
{
    SaveState* state = saveStateOpenForRead("wd2793");

    wd->step            =         saveStateGet(state, "step",            0);
    wd->curStep         =         saveStateGet(state, "curStep",         0);
    wd->stepTime        =         saveStateGet(state, "stepTime",        0);
    wd->regStatus       = (UInt8) saveStateGet(state, "regStatus",       0);
    wd->regCommand      = (UInt8) saveStateGet(state, "regCommand",      0);
    wd->regSector       = (UInt8) saveStateGet(state, "regSector",       0);
    wd->regTrack        = (UInt8) saveStateGet(state, "regTrack",        0);
    wd->regData         = (UInt8) saveStateGet(state, "regData",         0);
    wd->immediateInt    =         saveStateGet(state, "immediateInt",    0);
    wd->intRequest      =         saveStateGet(state, "intRequest",      0);
    wd->dataRequest     =         saveStateGet(state, "dataRequest",     0);
    wd->dataReady       =         saveStateGet(state, "dataReady",       0);
    wd->stepDirection   =         saveStateGet(state, "stepDirection",   0);
    wd->headLoaded      =         saveStateGet(state, "headLoaded",      0);
    wd->dataRequsetTime =         saveStateGet(state, "dataRequsetTime", 0);
    wd->drive           =         saveStateGet(state, "drive",           0);
    wd->sectorOffset    =         saveStateGet(state, "sectorOffset",    0);
    wd->dataAvailable   =         saveStateGet(state, "dataAvailable",   0);
    wd->diskTrack       = (UInt8) saveStateGet(state, "diskTrack",       0);
    wd->diskTracks[0]   = (UInt8) saveStateGet(state, "diskTracks0",     0);
    wd->diskTracks[1]   = (UInt8) saveStateGet(state, "diskTracks1",     0);
    wd->diskTracks[2]   = (UInt8) saveStateGet(state, "diskTracks2",     0);
    wd->diskTracks[3]   = (UInt8) saveStateGet(state, "diskTracks3",     0);
    wd->diskSide        =         saveStateGet(state, "diskSide",        0);
    wd->diskDensity     =         saveStateGet(state, "diskDensity",     0);

    saveStateGetBuffer(state, "sectorBuf", wd->sectorBuf, sizeof(wd->sectorBuf));

    saveStateClose(state);
}
开发者ID:imclab,项目名称:CocoaMSX,代码行数:34,代码来源:WD2793.c

示例7: wd33c93SaveState

void  wd33c93SaveState(WD33C93* wd33c93)
{
    SaveState* state = saveStateOpenForWrite("wd33c93");
    int i;

    saveStateSet(state, "myId",         wd33c93->myId);
    saveStateSet(state, "targetId",     wd33c93->targetId);
    saveStateSet(state, "latch",        wd33c93->latch);
    saveStateSet(state, "phase",        wd33c93->phase);
    saveStateSet(state, "counter",      wd33c93->counter);
    saveStateSet(state, "blockCounter", wd33c93->blockCounter);
    saveStateSet(state, "tc",           wd33c93->tc);
    saveStateSet(state, "maxDev",       wd33c93->maxDev);
    saveStateSet(state, "pBuf",         wd33c93->pBuf - wd33c93->buffer);
    //saveStateGet(state, "timeout",    wd33c93->timeout);
    //saveStateGet(state, "timerRunning", wd33c93->timerRunning);

    saveStateSetBuffer(state, "regs",   wd33c93->regs,   sizeof(wd33c93->regs));
    saveStateSetBuffer(state, "buffer", wd33c93->buffer, BUFFER_SIZE);

    saveStateClose(state);

    for (i = 0; i < wd33c93->maxDev; ++i) {
        scsiDeviceSaveState(wd33c93->dev[i]);
    }
}
开发者ID:imclab,项目名称:CocoaMSX,代码行数:26,代码来源:wd33c93.c

示例8: saveState

static void saveState(RomMapperSCCplus* rm)
{
    SaveState* state = saveStateOpenForWrite("mapperSCCplus");
    char tag[16];
    int i;

    for (i = 0; i < 4; i++) {
        sprintf(tag, "romMapper%d", i);
        saveStateSet(state, tag, rm->romMapper[i]);
        
        sprintf(tag, "isRamSegment%d", i);
        saveStateSet(state, tag, rm->isRamSegment[i]);
        
        sprintf(tag, "isMapped%d", i);
        saveStateSet(state, tag,     rm->isMapped[i]);
    }
    
    saveStateSet(state, "modeRegister", rm->modeRegister);
    saveStateSet(state, "sccMode",      rm->sccMode);

    saveStateSetBuffer(state, "romData", rm->romData, sizeof(rm->romData));

    saveStateClose(state);

    sccSaveState(rm->scc);
}
开发者ID:Chegwin,项目名称:GBA4iOS-2.0-Beta-4,代码行数:26,代码来源:romMapperSCCplus.c

示例9: moonsoundLoadState

void moonsoundLoadState(Moonsound* moonsound)
{
    SaveState* state = saveStateOpenForRead("moonsound");

    moonsound->timerValue1    =        saveStateGet(state, "timerValue1",    0);
    moonsound->timeout1       =        saveStateGet(state, "timeout1",       0);
    moonsound->timerStarted1  =        saveStateGet(state, "timerStarted1",  0);
    moonsound->timerRef1      = (UInt8)saveStateGet(state, "timerRef1",      0);
    moonsound->timerValue2    =        saveStateGet(state, "timerValue2",    0);
    moonsound->timeout2       =        saveStateGet(state, "timeout2",       0);
    moonsound->timerStarted2  =        saveStateGet(state, "timerStarted2",  0);
    moonsound->timerRef2      = (UInt8)saveStateGet(state, "timerRef2",      0);
    moonsound->opl3latch =        saveStateGet(state, "opl3latch", 0);
    moonsound->opl4latch = (UInt8)saveStateGet(state, "opl4latch", 0);

    saveStateClose(state);

    moonsound->ymf262->loadState();
    moonsound->ymf278->loadState();
    
    if (moonsound->timerStarted1) {
        boardTimerAdd(moonsound->timer1, moonsound->timeout1);
    }

    if (moonsound->timerStarted2) {
        boardTimerAdd(moonsound->timer2, moonsound->timeout2);
    }
}
开发者ID:CocoaMSX,项目名称:CocoaMSX,代码行数:28,代码来源:Moonsound.cpp

示例10: loadState

static void loadState(RomMapperOpcodeSaveRam* rm)
{
    SaveState* state = saveStateOpenForRead("mapperOpcodeSaveRam");
    
    saveStateGetBuffer(state, "saveRam", rm->saveRam, 0x8000);

    saveStateClose(state);
}
开发者ID:Chegwin,项目名称:GBA4iOS-2.0-Beta-4,代码行数:8,代码来源:romMapperOpcodeSaveRam.c

示例11: loadState

static void loadState(RomMapperKonamiKeyboardMaster* rm)
{
    SaveState* state = saveStateOpenForRead("mapperKonamiKbdMaster");

    saveStateClose(state);
    
    vlm5030LoadState(rm->vlm5030);
}
开发者ID:CocoaMSX,项目名称:CocoaMSX,代码行数:8,代码来源:romMapperKonamiKeyboardMaster.c

示例12: saveState

static void saveState(RomMapperCvMegaCart* rm)
{
    SaveState* state = saveStateOpenForWrite("mapperCvMegaCart");

    saveStateSet(state, "romMapper", rm->romMapper);

    saveStateClose(state);
}
开发者ID:imclab,项目名称:CocoaMSX,代码行数:8,代码来源:romMapperCvMegaCart.c

示例13: loadState

static void loadState(RomMapperSvi328Col80* svi328col80)
{
    SaveState* state = saveStateOpenForRead("Svi80Col");

    svi328col80->memBankCtrl = (UInt8)saveStateGet(state, "memBankCtrl", 0);

    saveStateClose(state);
}
开发者ID:CocoaMSX,项目名称:CocoaMSX,代码行数:8,代码来源:romMapperSvi80Col.c

示例14: loadState

static void loadState(Microsol* rm)
{
    SaveState* state = saveStateOpenForRead("mapperMicrosol");

    saveStateClose(state);

    wd2793LoadState(rm->fdc);
}
开发者ID:meesokim,项目名称:bluemsx-wii,代码行数:8,代码来源:romMapperMicrosol.c

示例15: saveState

static void saveState(RomMapperSvi328Col80* svi328col80)
{
    SaveState* state = saveStateOpenForWrite("Svi80Col");

    saveStateSet(state, "memBankCtrl", svi328col80->memBankCtrl);
    
    saveStateClose(state);
}
开发者ID:CocoaMSX,项目名称:CocoaMSX,代码行数:8,代码来源:romMapperSvi80Col.c


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