//エラー検出
        public static void MakeCheckErrors(uint mapid, List <FELint.ErrorSt> errors)
        {
            List <uint> tracelist = new List <uint>();
            uint        wmapid    = MapSettingForm.GetWorldMapEventIDWhereMapID(mapid);

            if (wmapid == 0)
            {//存在しない
                return;
            }
            //FE7はINDEX
            uint         p;
            InputFormRef InputFormRef = N_Init(null);

            p = InputFormRef.IDToAddr(wmapid);
            if (p == U.NOT_FOUND)
            {
                errors.Add(new FELint.ErrorSt(FELint.Type.MAPSETTING_WORLDMAP, U.NOT_FOUND
                                              , R._("対応するワールドマップイベント({0})が存在しません。", U.To0xHexString(wmapid))));
            }
            else
            {
                uint event_addr = Program.ROM.u32(p);
                FELint.CheckEventPointer(event_addr, errors, FELint.Type.WORLDMAP_EVENT, p, true, tracelist);
            }
        }
Ejemplo n.º 2
0
        public static void MakeCheckError(List <FELint.ErrorSt> errors)
        {
            InputFormRef InputFormRef = Init(null);

            if (InputFormRef.DataCount < 10)
            {
                errors.Add(new FELint.ErrorSt(FELint.Type.BATTTLE_TALK, U.NOT_FOUND
                                              , R._("交戦会話が極端に少ないです。破損している可能性があります。")));
            }

            List <uint> tracelist       = new List <uint>();
            uint        battletalk_addr = InputFormRef.BaseAddress;

            for (uint i = 0; i < InputFormRef.DataCount; i++, battletalk_addr += InputFormRef.BlockSize)
            {
                uint flag = Program.ROM.u16(battletalk_addr + 6);
                FELint.CheckFlag(flag, errors, FELint.Type.BATTTLE_TALK, battletalk_addr, i);

                uint textid = Program.ROM.u16(battletalk_addr + 8);
                FELint.DeathQuoteTextMessage(textid, errors, FELint.Type.BATTTLE_TALK, battletalk_addr, i);

                if (textid <= 0)
                {
                    uint event_addr = Program.ROM.u32(battletalk_addr + 12);
                    FELint.CheckEventPointer(event_addr, errors, FELint.Type.BATTTLE_TALK, battletalk_addr, false, tracelist);
                }
            }
        }