コード例 #1
0
        void UpdateLZ77Info()
        {
            string error = "";
            string text  = "Un-LZ77 ";
            uint   frame = U.toOffset((uint)N_P16.Value);
            uint   oam   = U.toOffset((uint)N_P20.Value);

            if (U.isSafetyOffset(frame))
            {
                uint size = LZ77.getUncompressSize(Program.ROM.Data, frame);
                text += "Frame: " + size + " ";

                string r = ImageUtilOAM.checkFrameSizeSimple((int)size);
                if (r != "")
                {
                    error += r;
                }
            }
            if (U.isSafetyOffset(oam))
            {
                uint size = LZ77.getUncompressSize(Program.ROM.Data, oam);
                text += "OAM: " + size + " ";

                string r = ImageUtilOAM.checkOAMSizeSimple((int)size);
                if (r != "")
                {
                    error += r;
                }
            }

            X_LZ77_INFO.Text         = text;
            X_LZ77_INFO.ErrorMessage = error;
        }
コード例 #2
0
        void UpdateLZ77Info(bool errorOver16Anime)
        {
            string error = "";
            string text  = "Un-LZ77 ";
            uint   frame = U.toOffset((uint)N_P16.Value);
            uint   oam   = U.toOffset((uint)N_P20.Value);

            if (U.isSafetyOffset(frame))
            {
                uint size = LZ77.getUncompressSize(Program.ROM.Data, frame);
                text += "Frame: " + size + " ";

                string r = ImageUtilOAM.checkFrameSizeSimple((int)size);
                if (r != "")
                {
                    error += r;
                }
            }
            if (U.isSafetyOffset(oam))
            {
                uint size = LZ77.getUncompressSize(Program.ROM.Data, oam);
                text += "OAM: " + size + " ";

                string r = ImageUtilOAM.checkOAMSizeSimple((int)size);
                if (r != "")
                {
                    error += r;
                }
            }
            if (error != "")
            {
                error = error + "\r\n" + R._("これは警告であり、エラーではありません。\r\n大きいアニメーションは動かないことがあるので警告を表示しています。\r\n警告が出ていても動作することもあります。");
            }

            if (errorOver16Anime)
            {
                text = R._("16色を超える戦闘アニメーションです。") + " " + text;
            }

            X_LZ77_INFO.Text         = text;
            X_LZ77_INFO.ErrorMessage = error;
        }