let MemoryDatas = null;
let SetMemoryDatas = function () {
    if (MemoryDatas == null) {
        MemoryDatas = [];
        for (let i = 0; i < $Nupu_PSData.MemoryData.length; i++) {
            MemoryDatas.push(new MemoryData($Nupu_PSData.MemoryData[i]));
        }
    }
}
class MemoryData {
    constructor(setData) {
        this._No = setData._No;
        this._Title = setData._Title;
        this._Setu = setData._Setu;
        this._Hint = setData._Hint;
        this._Ptn = [];
        for (let i = 0; i < setData._Ptn.length; i++) {
            this._Ptn.push(setData._Ptn[i]);
        }
        this._DtlCheck = [];
        for (let i = 0; i < setData._DtlCheck.length; i++) {
            this._DtlCheck.push(new PtnData(setData._DtlCheck[i]));
        }
        this.BaseData = setData;
    }
}
class PtnData {
    constructor(setData) {
        this._KamiArr = [];
        for (let i = 0; i <= setData._KamiArr.length - 1; i++) {
            this._KamiArr.push(setData._KamiArr[i]);
        }
        this._ISyoArr = [];
        for (let i = 0; i <= setData._ISyoArr.length - 1; i++) {
            this._ISyoArr.push(setData._ISyoArr[i]);
        }
        this._VirsArr = [];
        for (let i = 0; i <= setData._VirsArr.length - 1; i++) {
            this._VirsArr.push(setData._VirsArr[i]);
        }
        this._Bura = setData._Bura;
        this._Pan = setData._Pan;
    }
}
const CN_MemClick = 52; 
let _Mr選択回想番号 = -1;
let Menu_Memory_Mode = 0; 
let memoryBasePos = new Pos2D(216, 170);
let memoryPageSelect = 0; 
let overMemoryPicArr = [];
Game_Interpreter.prototype.Menu_H_MemoryView = function (fadeInFlg) {
    fadeInFlg = typeof fadeInFlg !== 'undefined' ? fadeInFlg : false;
    SetMemoryDatas(); 
    let setOpacity = 255;
    if (fadeInFlg) {
        setOpacity = 0;
    }
    overMemoryPicArr = [];
    ViewSpriteArr_Reset();
    this.Menu_H_MemoryPageBtnDraw(fadeInFlg);
    for (let i = 0; i < 3; i++) {
        for (let j = 0; j < 7; j++) {
            let PicNo = i * 7 + j;
            overMemoryPicArr.push(PN_MPgBtn + PicNo);
        }
    }
    this.SetSprite(PN_MrBase, Menu_H_UIPath + "Memory/M_MBack", memoryBasePos._x, memoryBasePos._y, setOpacity);
    for (let i = 0; i <= 3 - 1; i++) {
        for (let j = 0; j <= 5 - 1; j++) {
            let picNo = (i * 5 + j);
            let ckMemoryNo = (i * 5 + j) + (memoryPageSelect * 15); 
            let memoryData = $Nupu_PSData.MemoryData[ckMemoryNo];
            let setImgNo = 0;
            if (MemoryViewCk(memoryData._No - 1)) setImgNo = memoryData._No;
            let setPicStr = "M_Image" + setImgNo;
            this.SetSprite(PN_Samune + picNo, Menu_H_UIPath + "Memory/MImage/" + setPicStr,
                memoryBasePos._x + 42 + (161 * j), memoryBasePos._y + 135 + (120 * i), setOpacity, 31, 31);
            overMemoryPicArr.push(PN_Samune + picNo);
        }
    }
    for (let i = 0; i <= ViewSpriteArr.length - 1; i++) {
        this.MoveSprite(ViewSpriteArr[i], true, true, 10, 255, true, true);
    }
};
Game_Interpreter.prototype.Menu_H_MemoryPageBtnDraw = function (fadeInFlg) {
    fadeInFlg = typeof fadeInFlg !== 'undefined' ? fadeInFlg : false;
    let setOpacity = 255;
    if (fadeInFlg) setOpacity = 0;
    let baseX = 254 + 59;
    let baseY = 110 + 21;
    for (let i = 0; i < 2; i++) {
        for (let j = 0; j < 7; j++) {
            let PicNo = i * 7 + j;
            this.SetSpriteC(PN_MPgBtn + PicNo, Menu_H_UIPath + "Memory/M_Page" + (PicNo + 1), baseX + (114 * j), baseY + (58 * i) + 58, setOpacity);
        }
    }
    this.CngSprite(PN_MPgBtn + memoryPageSelect, Menu_H_UIPath + "Memory/M_Page" + (memoryPageSelect + 1) + "b"); 
}
Game_Interpreter.prototype.MemoryUpdate = function () {
    if (_HMem閲覧Flg) return;
    switch (Menu_Memory_Mode) {
        case 0: 
            this.Menu_H_Memory_SelectUpdate();
            break;
        case 1: 
            this.Menu_H_Memory_DetailUpdate();
            break;
    }
};
Game_Interpreter.prototype.Menu_H_Memory_SelectUpdate = function () {
    MenuCngOkFlg = true; 
    for (let i = 0; i <= overMemoryPicArr.length - 1; i++) {
        this.SpriteCngColor(overMemoryPicArr[i]);
    }
    let overPicNo = overPointerSpCkArr(overMemoryPicArr);
    if (overPicNo != -1) {
        if (overPicNo == PN_MPgBtn + 13) return;
        this.SpriteCngColor(overPicNo, [100, 100, 100, 0]);
        if (overPicNo >= PN_MPgBtn && overPicNo <= PN_MPgBtn + 20) {
            if (TouchInput.isTriggered()) {
                if (menuAutoCloseFlame > 0) {
                    menuAutoCloseFlame = 1;
                    return;
                }
                SoundManager.playOk(); 
                let _SetCkNo = overPicNo - PN_MPgBtn;
                if (memoryPageSelect != _SetCkNo) {
                    memoryPageSelect = _SetCkNo;
                    this.Menu_H_MemoryView(true);
                }
            }
        } else {
            let ckPicNO = overPicNo - PN_Samune;
            let smXNo = Math.floor(ckPicNO / 5);
            let smYNo = ckPicNO - (smXNo * 5);
            let selectNo = ckPicNO + (memoryPageSelect * 15);
            _CkArrNo = $Nupu_PSData.MemoryData[selectNo]._No; 
            let textStr = "";
            let ViewMemoryData = GetMemoryData(_CkArrNo);
            if (MemoryViewCk(_CkArrNo - 1)) {
                textStr = ViewMemoryData._Title; 
            } else {
                textStr = ViewMemoryData._Hint; 
            }
            if ($gameTemp.isPlaytest()) {
                this.SpriteStr(PN_MsBack - 1, "Debug：" + ViewMemoryData._Title, 18, 850, 10, 255);
            }
            let smPostion = new Pos2D(memoryBasePos._x + 115 + (161 * smYNo), memoryBasePos._y + 110 + (120 * smXNo));
            this.SetSpriteC(PN_MSetuWin, Menu_H_UIPath + "Memory/SmnMiniWin", smPostion._x, smPostion._y, 255);
            this.SpriteStrC(PN_MSetuTxt, textStr, 18, smPostion._x, smPostion._y, 255);
            if (TouchInput.isTriggered() && MemoryViewCk(_CkArrNo - 1)) {
                if (menuAutoCloseFlame > 0) { menuAutoCloseFlame = 1; return; }
                SoundManager.playOk(); 
                Menu_EditLayer = 2; 
                Menu_Memory_Mode = 1; 
                this.Menu_H_Memory_DetailView(_CkArrNo);
            }
        }
    } else {
        if ($gameTemp.isPlaytest()) { 
            this.DelSprite(PN_MsBack - 1);
        }
        this.DelSprite(PN_MSetuWin); 
        this.DelSprite(PN_MSetuTxt);
    }
};
let GetMemoryData = function (No) {
    for (let i = 0; i < MemoryDatas.length; i++) {
        if (MemoryDatas[i]._No == No) return MemoryDatas[i];
    }
}
let memoryDetailViewNo = -1;
let memoryDtailPos = new Pos2D(memoryBasePos._x + 24, memoryBasePos._y - 58);
let memoryDtailSelectPatternNo = 0; 
let memoryDtailClickMapArr = [];
Game_Interpreter.prototype.Menu_H_Memory_DetailView = function (selectNo) {
    D_Text_Cng_font = "Makinas";
    MenuCngOkFlg = false; 
    memoryDetailViewNo = selectNo;
    memoryDtailSelectPatternNo = -1; 
    let ViewMemoryData = GetMemoryData(memoryDetailViewNo);
    _Mr選択回想番号 = memoryDetailViewNo - 1;
    this.SetSprite(PN_MsBack, "Black", 0, 0, 170);
    this.SetSprite(PN_MsSelBase, Menu_H_UIPath + "Memory/M_BMBack", memoryDtailPos._x, memoryDtailPos._y);
    this.SetSprite(PN_MsOkBtn, Menu_H_UIPath + "Memory/M_BMokBtn", memoryDtailPos._x + 57, memoryDtailPos._y + 350);
    this.SetSprite(PN_MsCloseBtn, Menu_H_UIPath + "Memory/M_BMnoBtn", memoryDtailPos._x + 200, memoryDtailPos._y + 350);
    this.SetSprite(PN_MsSmune, Menu_H_UIPath + "Memory/MImage/M_Image" + ViewMemoryData._No, memoryDtailPos._x + 374, memoryDtailPos._y + 88);
    memoryDtailClickMapArr = []; 
    for (let i = 0; i <= ViewMemoryData._Ptn.length - 1; i++) {
        if (ViewMemoryData._Ptn[i] == "") continue;
        let setX = memoryDtailPos._x + 547 + (70 * i);
        let setY = memoryDtailPos._y + 380;
        let opacity = 90;
        if (MemoryViewArr[memoryDetailViewNo - 1][i] == "1") {
            opacity = 255;
            if (memoryDtailSelectPatternNo == -1) memoryDtailSelectPatternNo = i;
        }
        this.SetSpriteC(PN_MsPtn + i, Menu_H_UIPath + "Memory/M_PtnBtn" + (i + 1), setX, setY, opacity);
        memoryDtailClickMapArr.push([(setX - 35 - memoryDtailPos._x), (setY - 35 - memoryDtailPos._y), 70, 70]); 
    }
    D_Text_Cng_font = "";
    this.Menu_H_Memory_DetailパターンView(true);
};
Game_Interpreter.prototype.Menu_H_Memory_DetailパターンView = function (firstViewFlg) {
    D_Text_Cng_font = "Makinas";
    let ViewMemoryData = GetMemoryData(memoryDetailViewNo);
    let titleStr = ViewMemoryData._Title;
    DText_NRZureY = -1; 
    this.SpriteStrC(PN_MsTitleTxt, titleStr, 22, memoryDtailPos._x + 206, memoryDtailPos._y + 71, 255);
    let drawSetuStr = ViewMemoryData.BaseData._DtlCheck[memoryDtailSelectPatternNo]._Setu;
    this.SpriteStr(PN_MsSetuTxt, drawSetuStr, 20, memoryDtailPos._x + 75, memoryDtailPos._y + 115, 255);
    this.SpriteStr(PN_MsPtnTxt, "パターン" + (memoryDtailSelectPatternNo + 1) + "：" + ViewMemoryData._Ptn[memoryDtailSelectPatternNo], 18
        , memoryDtailPos._x + 422, memoryDtailPos._y + 400);
    this.SetSpriteC(PN_MsPtnSel, Menu_H_UIPath + "Memory/M_PatternSel" ,
        memoryDtailPos._x + 547 + (70 * memoryDtailSelectPatternNo) , memoryDtailPos._y + 380);
    this.SetSprite(PN_MsSmWaku, Menu_H_UIPath + "Memory/M_Waku", memoryDtailPos._x + 370, memoryDtailPos._y + 84);
    this.Menu_H_Memory_DetailCheckBoxDraw(firstViewFlg);
    D_Text_Cng_font = "";
    DText_NRZureY = 0; 
}
let _KamiArr_PicArr = [];
let _ISyoArr_PicArr = [];
let _VirsArr_PicArr = [];
let _HMenu_髪_選択No = -1;
let _HMenu_衣装_選択No = -1;
let _HMenu_ウィルス_選択Arr = [];
const VN_回想髪型No = 1022;
const VN_回想衣装No = VN_回想髪型No + 1;
let DrawBuraSelectFlg = false;
let DrawPanSelectFlg = false;
Game_Interpreter.prototype.Menu_H_Memory_DetailCheckBoxDraw = function (firstViewFlg) {
    firstViewFlg = typeof firstViewFlg !== 'undefined' ? firstViewFlg : false;
    if (firstViewFlg) {
        _HMenu_髪_選択No = -1;
        _HMenu_衣装_選択No = -1;
        _HMenu_ウィルス_選択Arr = [false, false, false, false, false];
    }
    _KamiArr_PicArr = [];
    _ISyoArr_PicArr = [];
    _VirsArr_PicArr = [];
    let ViewMemoryData = GetMemoryData(memoryDetailViewNo);
    var DrawMemoryData = ViewMemoryData._DtlCheck[memoryDtailSelectPatternNo];
    for (let i = 0; i <= DrawMemoryData._KamiArr.length - 1; i++) {
        if (!DrawMemoryData._KamiArr[i]) {
            if (i == _HMenu_髪_選択No) _HMenu_髪_選択No = -1;
        }
    }
    for (let i = 0; i <= DrawMemoryData._ISyoArr.length - 1; i++) {
        if (!DrawMemoryData._ISyoArr[i]) {
            if (i == _HMenu_衣装_選択No) _HMenu_衣装_選択No = -1;
        }
    }
    for (let i = 0; i <= DrawMemoryData._KamiArr.length - 1; i++) {
        if (DrawMemoryData._KamiArr[i]) {
            _KamiArr_PicArr.push(PN_MsSetKami + i);
            let _CStr = "";
            if (_HMenu_髪_選択No == -1) _HMenu_髪_選択No = i;
            if (_HMenu_髪_選択No == i) _CStr = "b";
            this.SetSprite(PN_MsSetKami + i, MenuUIPath + "Equip/E_Kami" + (i + 1) + _CStr,
                memoryDtailPos._x + 30 + 70 * i, memoryDtailPos._y + 517, 255, 66, 66);
        } else {
            this.SetSprite(PN_MsSetKami + i, MenuUIPath + "Equip/E_Kami" + (i + 1) + "c",
                memoryDtailPos._x + 30 + 70 * i, memoryDtailPos._y + 517, 255, 66, 66);
        }
    }
    for (let i = 0; i <= DrawMemoryData._ISyoArr.length - 1; i++) {
        let _MemoryIsyoStr = MenuUIPath + "Equip/E_ISyo" + (i + 1);
        if (i > 4) _MemoryIsyoStr = MenuUIPath + "Equip/E_ISyoA";
        if (i > 5) _MemoryIsyoStr = MenuUIPath + "Equip/E_ISyoEx" + (i + 1 - 6);
        if (DrawMemoryData._ISyoArr[i]) {
            _ISyoArr_PicArr.push(PN_MsSetIsyo + i);
            let _CStr = "";
            if (_HMenu_衣装_選択No == -1) _HMenu_衣装_選択No = i;
            if (_HMenu_衣装_選択No == i) _CStr = "b";
            this.SetSprite(PN_MsSetIsyo + i, _MemoryIsyoStr + _CStr,
                memoryDtailPos._x + 182 + 70 * i, memoryDtailPos._y + 517, 255, 66, 66);
        } else {
            this.SetSprite(PN_MsSetIsyo + i, _MemoryIsyoStr + "c",
                memoryDtailPos._x + 182 + 70 * i, memoryDtailPos._y + 517, 255, 66, 66);
        }
    }
    this.DelSpriteSpan(PN_MsSetVirs , PN_MsSetVirs + 4);
    for (let i = 0; i <= DrawMemoryData._VirsArr.length - 1; i++) {
        let _CkImgStr = Menu_H_UIPath + "Memory/PN_Check" + (i + 1);
        if (DrawMemoryData._VirsArr[i]) {
            _VirsArr_PicArr.push(PN_MsSetVirs + i);
            let _CStr = "";
            if (_HMenu_ウィルス_選択Arr[i]) {
                _CStr = "b";
            }
            this.SetSprite(PN_MsSetVirs + i, _CkImgStr + _CStr, memoryDtailPos._x + 32 + 150 * i, memoryDtailPos._y + 615);
        } else {
            _HMenu_ウィルス_選択Arr[i] = false;
        }
    }
    DrawBuraSelectFlg = false;
    DrawPanSelectFlg = false;
    this.DelSpriteSpan(PN_MsBuraWin , PN_MsBuraSelect + 1);
    $gameSwitches.setValue(SW_回想ブラパン選択した , DrawMemoryData._Bura || DrawMemoryData._Pan);
    if (DrawMemoryData._Bura) {
        this.Menu_H_Memory_Draw回想ブラ選択();
        DrawBuraSelectFlg = true;
    } else {
        this.Menu_H_memory_Delete回想ブラ選択();
    }
    if (DrawMemoryData._Pan) {
        this.Menu_H_memory_Draw回想パン選択();
        DrawPanSelectFlg = true;
    } else {
        this.Menu_H_memory_Delete回想パン選択();
    }
}
Game_Interpreter.prototype.Menu_H_Memory_Draw回想ブラ選択 = function () {
    this.SetSprite(PN_MsBuraWin, Menu_H_UIPath + "Memory/PN_MsBuraWin");
    let setPosBuraCurX = 708;
    let setPosCurY = 597;
    if ($gameSwitches.value(SW_回想ブラOFF)) setPosBuraCurX += 63;
    this.SetSprite(PN_MsBuraSelect + 0, Menu_H_UIPath + "Memory/PN_MsBuraSelect" , setPosBuraCurX , setPosCurY);
}
Game_Interpreter.prototype.Menu_H_memory_Draw回想パン選択 = function () {
    this.SetSprite(PN_MsPanWin, Menu_H_UIPath + "Memory/PN_MsPanWin");
    let setPosBuraCurX = 942;
    let setPosCurY = 597;
    if ($gameSwitches.value(SW_回想パンツOFF)) setPosBuraCurX += 63;
    this.SetSprite(PN_MsBuraSelect + 1, Menu_H_UIPath + "Memory/PN_MsBuraSelect" , setPosBuraCurX , setPosCurY);
}
Game_Interpreter.prototype.Menu_H_memory_Delete回想ブラ選択 = function () {
    this.DelSprite(PN_MsBuraWin);
    this.DelSprite(PN_MsBuraSelect + 0);
}
Game_Interpreter.prototype.Menu_H_memory_Delete回想パン選択 = function () {
    this.DelSprite(PN_MsPanWin);
    this.DelSprite(PN_MsBuraSelect + 1);
}
let Memory_ブラパン選択CbmArr= [
    [708,597,61,32], [708 + 63,597,61,32],
    [942,597,61,32], [942 + 63,597,61,32]
];
Game_Interpreter.prototype.Menu_H_Memory_DetailUpdate = function () {
    let _cancelBtnFlg = false;
    let _MrOverPArr = [PN_MsOkBtn, PN_MsCloseBtn];
    let ViewMemoryData = GetMemoryData(memoryDetailViewNo);
    for (let _i = 0; _i <= _MrOverPArr.length - 1; _i++) {
        this.SpriteCngColor(_MrOverPArr[_i]);
    }
    let _OverNo = overPointerSpCkArr(_MrOverPArr);
    if (_OverNo != -1) {
        this.SpriteCngColor(_OverNo, [100, 100, 100, 0]);
        if (TouchInput.isTriggered()) {
            if (menuAutoCloseFlame > 0) { menuAutoCloseFlame = 1; return; }
            SoundManager.playOk(); 
            switch (_OverNo) {
                case PN_MsOkBtn: 
                    _Mr選択パターン = memoryDtailSelectPatternNo;
                    MenuStopFlg = true; 
                    $gameVariables.setValue(VN_回想髪型No, _HMenu_髪_選択No + 1);
                    let IsyoNo = _HMenu_衣装_選択No + 1;
                    switch (IsyoNo) {
                    }
                    $gameVariables.setValue(VN_回想衣装No, _HMenu_衣装_選択No + 1);
                    for (let i = 0; i <= _HMenu_ウィルス_選択Arr.length - 1; i++) {
                        $gameSwitches.setValue(SW_回想チェック + i, _HMenu_ウィルス_選択Arr[i]);
                    }
                    this.EnFadeIN("Black"); 
                    this.SetCmnEventSc(CN_MemClick); 
                    break;
                case PN_MsCloseBtn: 
                    _cancelBtnFlg = true;
                    Menu_EditLayer = 1; 
                    break;
            }
        }
    }
    let _PtnCkNo = overSpriteClickable(PN_MsSelBase, memoryDtailClickMapArr);
    if (_PtnCkNo != -1) { 
        if (TouchInput.isTriggered()) {
            if (menuAutoCloseFlame > 0) { menuAutoCloseFlame = 1; return; }
            SoundManager.playOk(); 
            if (MemoryViewArr[memoryDetailViewNo - 1][_PtnCkNo] == "1") {
                if (memoryDtailSelectPatternNo != _PtnCkNo) {
                    memoryDtailSelectPatternNo = _PtnCkNo;
                }
                let _SSetX = memoryDtailPos._x + 547 + (70 * _PtnCkNo);
                let _SSetY = memoryDtailPos._y + 380;
                this.MoveSprite(PN_MsPtnSel, _SSetX, _SSetY, 5);
                D_Text_Cng_font = "Makinas";
                this.SpriteStr(PN_MsPtnTxt,
                    "パターン" + (memoryDtailSelectPatternNo + 1) + "：" +
                    ViewMemoryData._Ptn[memoryDtailSelectPatternNo], 18
                    , memoryDtailPos._x + 422, memoryDtailPos._y + 400);
                D_Text_Cng_font = "";
                this.Menu_H_Memory_DetailパターンView(false);
            }
        }
    }
    if ($gameSwitches.value(SW_回想ブラパン選択した)) {
        if (DrawBuraSelectFlg) {
            let _cbmNo = overSpriteClickable( PN_MsBuraWin , Memory_ブラパン選択CbmArr);
            if (_cbmNo != -1) {
                if (TouchInput.isTriggered()) {
                    switch (_cbmNo) {
                        case 0: 
                            if (DrawBuraSelectFlg) {
                                $gameSwitches.setValue(SW_回想ブラOFF , false);
                                SoundManager.playOk(); 
                            }
                            break;
                        case 1: 
                            if (DrawBuraSelectFlg) {
                                $gameSwitches.setValue(SW_回想ブラOFF , true);
                                SoundManager.playOk(); 
                            }
                            break;
                    }
                    this.Menu_H_Memory_Draw回想ブラ選択();
                }
            }
        }
        if (DrawPanSelectFlg) {
            let _cbmNo = overSpriteClickable( PN_MsPanWin , Memory_ブラパン選択CbmArr);
            if (_cbmNo != -1) {
                if (TouchInput.isTriggered()) {
                    switch (_cbmNo) {
                        case 2: 
                            if (DrawPanSelectFlg) {
                                $gameSwitches.setValue(SW_回想パンツOFF , false);
                                SoundManager.playOk(); 
                            }
                            break;
                        case 3: 
                            if (DrawPanSelectFlg) {
                                $gameSwitches.setValue(SW_回想パンツOFF , true);
                                SoundManager.playOk(); 
                            }
                            break;
                    }
                    this.Menu_H_memory_Draw回想パン選択();
                }
            }
        }
    }
    let _CNo = 0;
    let _cngFlg = false;
    let _LightArr = [100, 100, 50, 0];
    this.SpriteCngColorArr(_KamiArr_PicArr);
    _CNo = overPointerSpCkArr(_KamiArr_PicArr);
    if (_CNo != -1) {
        this.SpriteCngColor(_CNo, _LightArr);
        if (TouchInput.isTriggered()) {
            if (menuAutoCloseFlame > 0) { menuAutoCloseFlame = 1; return; }
            _HMenu_髪_選択No = _CNo - PN_MsSetKami;
            _cngFlg = true;
        }
    }
    this.SpriteCngColorArr(_ISyoArr_PicArr);
    _CNo = overPointerSpCkArr(_ISyoArr_PicArr);
    if (_CNo != -1) {
        this.SpriteCngColor(_CNo, _LightArr);
        if (TouchInput.isTriggered()) {
            if (menuAutoCloseFlame > 0) { menuAutoCloseFlame = 1; return; }
            _HMenu_衣装_選択No = _CNo - PN_MsSetIsyo;
            _cngFlg = true;
        }
    }
    this.SpriteCngColorArr(_VirsArr_PicArr);
    _CNo = overPointerSpCkArr(_VirsArr_PicArr);
    if (_CNo != -1) {
        this.SpriteCngColor(_CNo, _LightArr);
        if (TouchInput.isTriggered()) {
            if (menuAutoCloseFlame > 0) { menuAutoCloseFlame = 1; return; }
            _HMenu_ウィルス_選択Arr[_CNo - PN_MsSetVirs] = !_HMenu_ウィルス_選択Arr[_CNo - PN_MsSetVirs];
            _cngFlg = true;
        }
    }
    if (_cngFlg) {
        this.Menu_H_Memory_DetailCheckBoxDraw();
    }
    if (Input.isTriggered('menu') || TouchInput.isCancelled() || _cancelBtnFlg) {
        this.Layer1_DelTopTop(PN_MsBack); 
        Menu_Memory_Mode = 0;
        memoryDetailViewNo = -1;
        this.DelSpriteSpan(PN_MsSetKami, PN_MsSetVirs + 3);
    }
};
let _HMem閲覧Flg = false;
Game_Interpreter.prototype.Memory_Start = function () {
    this.InstantSave(); 
    if (!_HMem閲覧Flg) {
        _HMem閲覧Flg = true;
        Menu_EditLayer = 1; 
        $gameSwitches.setValue(SW_回想中 , true);
        let args = new Array("off");
        this.pluginCommand("waitBlur", args);
    } else {
        _HMem閲覧Flg = false;
        MenuStopFlg = false; 
        Memory_EndFlg = true; 
        $gameSwitches.setValue(SW_回想中 , false);
        this.EnFadeOut(); 
        let args = new Array("on");
        this.pluginCommand("waitBlur", args);
        MenuFlgSwich = true; 
        return false;
    }
    return true;
}
Game_Interpreter.prototype.Memory_FadeOut = function () {
    this.MenuPicDelAll(); 
    this.EnFadeOut();
}
let Memory_EndFlg = false;
Game_Interpreter.prototype.Memory_End = function () {
    this.InstantLoad(); 
    Memory_EndFlg = true;
}
